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

He Tianyi edited comment on YARN-5510 at 8/12/16 5:49 AM:
----------------------------------------------------------

A preliminary implementation. 
Tests is not included yet. Looking for suggestions & comments.

A simple benchmark in a simulated case with 2,000 nodes, 300 running apps:
(CPU: Intel Core i7 @ 2.5GHz; Oracle JDK 1.8; Java heap size: 4096M)
*rewritten ResourceImplPB*
Total time elapsed: 19877 ms
Total number of heartbeats: 1773000
Cost per heartbeat: 11.210941906373378 us

*original ResourceImplPB*
Total time elapsed: 25909 ms
Total number of heartbeats: 1773000
Cost per heartbeat: 14.613085166384659 us



was (Author: he tianyi):
A preliminary implementation. 
Tests is not included yet. Looking for suggestions & comments.

A simple benchmark in a simulated case with 2,000 nodes, 300 running apps:
*rewritten ResourceImplPB*
Total time elapsed: 19877 ms
Total number of heartbeats: 1773000
Cost per heartbeat: 11.210941906373378 us

*original ResourceImplPB*
Total time elapsed: 25909 ms
Total number of heartbeats: 1773000
Cost per heartbeat: 14.613085166384659 us


> Optimize Resource implementation for instantiation
> --------------------------------------------------
>
>                 Key: YARN-5510
>                 URL: https://issues.apache.org/jira/browse/YARN-5510
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>    Affects Versions: 2.6.0
>            Reporter: He Tianyi
>            Assignee: He Tianyi
>         Attachments: YARN-5510.0001.patch
>
>
> According to YARN-5479, many {{Resource}} instances are created as 
> intermediate result of calculating in scheduler (as a result of 
> {{Resources.subtract}} and {{Resources.add}}). This introduces pressure on 
> garbage collector as well as CPU cycles for scheduling.
> Therefore, the issue proposes a lightweight implementation of {{Resource}}, 
> which optimized for scheduler usage. That is, making instantiation of 
> {{Resource}} cheaper.
> In discussion of {{YARN-5479}}, we thought maybe sticking to one version of 
> implementation avoids unnecessary complexity.
> In current implementation {{ResourceImplPB}}, a builder is also created 
> during construction. Also, {{maybeInitBuilder}} get called during each 
> {{setMemory}} or {{setVirtualCores}}. The {{builder}} get prepared regardless 
> whether {{Resource}} will be exchanged via IPC or not. 
> However, in scheduler (which performance is critical), most of these 
> instances are just intermediate result and not exposed.
> Suppose we could move builder related code into {{getProto}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to