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

Wangda Tan commented on YARN-6245:
----------------------------------

[~kasha],

Sorry for the long delay of response, I missed your previous comment.

I think we are talking about two different things.

1) The FinalResource object is target to solve the overhead of PBImpl. It's a 
read-only copy of the original PB-based resource object.
2) The getObservableCopy can achieve the similar object however it cannot solve 
the multi-ops calculation, like {{d = (res_a * float_x + res_b) / res_c}}. 
During the calculation, we need to create some temporary resource instances. A 
observable copy is not enough because we need to write resource values of these 
temp resource instances.

I agree YARN-3926 is tricker, it might be more expensive to construct 
"FinalResource". We need to be careful to get comparable performance.

> 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-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to