[
https://issues.apache.org/jira/browse/YARN-6788?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sunil G updated YARN-6788:
--------------------------
Attachment: YARN-6788-YARN-3926.020.patch
Thanks [~templedf]
Updated patch for point 2 and some part of DCL. Details comments.
bq.In Resources.addTo(), Resources.subtractFrom(), Resources.multiplyTo(),
Resources.multiplyAndAddTo(), Resources.multiplyAndRoundDown(),
Resources.fitsIn(), Resources.componentwiseMin(), and
Resources.componentwiseMax(), the variable in the foreach should be named
lhsValue instead of calling it entry
Yes. You are correct. I have given a comment for same earlier. I have a loop
optimization patch ready in this area. And i already uploaded patch in
YARN-6892 and this is handled in that patch. I would like that patch separate
and on top of this since its loop optimization for all apis in Resources and
DominantResourceCalculator class. Hence I will take this comment in that one if
its fine.
bq.In ResourceUtils you're creating an API,
I think I can merge these two, its not a pblm. Done in new patch.
bq.The DCL still won't work as implemented.
So current approach in my patch is like below.
{code}
private static volatile boolean initializedResources = false;
...
...
if (!initializedResources) {
synchronized (ResourceUtils.class) {
if (!initializedResources) {
......
......
<do some operation>
initializedResources = true;
}
}
}
{code}
ResourceUtils class is designed as a static class which could be used for any
general op. Making to Singleton will also need lazy initialization and
getInstance wont be able to resolve everything when the instance is created.
Some information may be available at serviceStart during RM init time. For now,
I would like to fix DCL as above which is not buggy, rather it may be slightly
an over kill. For a single api call to initialize, may be its fine to include
in this perf path. Since this is a critical performance patch, i think we can
discuss more of singleton approach in another jira and its not blocking.
Thoughts ? I can create that ticket if its fine and discuss further there.
> Improve performance of resource profile branch
> ----------------------------------------------
>
> Key: YARN-6788
> URL: https://issues.apache.org/jira/browse/YARN-6788
> Project: Hadoop YARN
> Issue Type: Sub-task
> Components: nodemanager, resourcemanager
> Reporter: Sunil G
> Assignee: Sunil G
> Priority: Blocker
> Attachments: YARN-6788-YARN-3926.001.patch,
> YARN-6788-YARN-3926.002.patch, YARN-6788-YARN-3926.003.patch,
> YARN-6788-YARN-3926.004.patch, YARN-6788-YARN-3926.005.patch,
> YARN-6788-YARN-3926.006.patch, YARN-6788-YARN-3926.007.patch,
> YARN-6788-YARN-3926.008.patch, YARN-6788-YARN-3926.009.patch,
> YARN-6788-YARN-3926.010.patch, YARN-6788-YARN-3926.011.patch,
> YARN-6788-YARN-3926.012.patch, YARN-6788-YARN-3926.013.patch,
> YARN-6788-YARN-3926.014.patch, YARN-6788-YARN-3926.015.patch,
> YARN-6788-YARN-3926.016.patch, YARN-6788-YARN-3926.017.patch,
> YARN-6788-YARN-3926.018.patch, YARN-6788-YARN-3926.019.patch,
> YARN-6788-YARN-3926.020.patch
>
>
> Currently we could see a 15% performance delta with this branch.
> Few performance improvements to improve the same.
> Also this patch will handle
> [comments|https://issues.apache.org/jira/browse/YARN-6761?focusedCommentId=16075418&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16075418]
> from [~leftnoteasy].
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]