You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Daryn Sharp (JIRA)" <ji...@apache.org> on 2017/05/22 15:25:05 UTC

[jira] [Commented] (YARN-6245) Add FinalResource object to reduce overhead of Resource class instancing

    [ https://issues.apache.org/jira/browse/YARN-6245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16019701#comment-16019701 ] 

Daryn Sharp commented on YARN-6245:
-----------------------------------

[~jlowe] asked me to comment since we're running into 2.8 scheduler performance issues we believe are (in part) due to pb impl based objects.  I think I've designed a means for resources via RPC to remain {{ResourcePBImpl}} while internally created resources are lightweight and only converted to a PB if it will be sent over the wire.

At least as a start, it's a very simple patch that substitutes in a lightweight object via {{Resource.newInstance}} that simply contains 2 longs.  Replaced usages of {{((ResourcePBImpl)r)#getProto()}} with {{ProtoUtils.convertToProtoFormat(Resource)}} which converts the lightweight to a pb impl as required.  That's it.

We're testing today.  Will post a sample patch if it looks promising.


> Add FinalResource object to reduce overhead of Resource class instancing
> ------------------------------------------------------------------------
>
>                 Key: YARN-6245
>                 URL: https://issues.apache.org/jira/browse/YARN-6245
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Wangda Tan
>         Attachments: observable-resource.patch, YARN-6245.preliminary-staled.1.patch
>
>
> There're lots of Resource object creation in YARN Scheduler, since Resource object is backed by protobuf, creation of such objects is expensive and becomes bottleneck.
> To address the problem, we can introduce a FinalResource (Is it better to call it ImmutableResource?) object, which is not backed by PBImpl. We can use this object in frequent invoke paths in the scheduler.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org