[
https://issues.apache.org/jira/browse/YARN-8452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16523246#comment-16523246
]
Wilfred Spiegelenburg commented on YARN-8452:
---------------------------------------------
[~szegedim] thank you looking at this optimisation.
I was wondering if we can not make the change even simpler:
* The {{weight == -1}} check is only used the first time after that it is
always true, why not use the {{memoryWeight}} or {{priorityWeight}} not being
set to trigger the first calculation? After the first run those two values will
just be used
{code}
private float weight = 0;
private long weightMemory = -1;
private int weightPriority = -1;
{code}
* The synchronised lock seems to be unneeded.
> FairScheduler.update can take long time if
> yarn.scheduler.fair.sizebasedweight is on
> ------------------------------------------------------------------------------------
>
> Key: YARN-8452
> URL: https://issues.apache.org/jira/browse/YARN-8452
> Project: Hadoop YARN
> Issue Type: Bug
> Components: fairscheduler
> Reporter: Miklos Szegedi
> Assignee: Miklos Szegedi
> Priority: Major
> Attachments: YARN-8452.000.patch
>
>
> Basically we recalculate the weight every time, even if the inputs did not
> change. This causes high cpu usage, if the cluster has lots of apps.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]