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

Karthik Kambatla commented on YARN-4866:
----------------------------------------

Patch looks close.
# Shouldn't isVCoreOverMaxResource be added to FSQueue and not FSLeafQueue as a 
protected method? That way, we don't have to pass the queue. 
# Nit: Javadoc for FSLeafQueue#canRunAppAM mentions Fifo and Fair policy *don't 
care* about vcores. I would probably reword and reuse the comment closer to the 
check - " Check whether this queue can run this application master under the 
maxAMShare limit. For FIFO and FAIR policies, check if the vcore usage takes up 
the entire cluster or maxResources for the queue".
# Would the check for FAIR and FIFO in the method be more readable if we change 
the order of boolean expressions? 
{code}
overMaxAMShareLimit = isVCoreOverMaxResource(ifRunAMResource) ||
      ifRunAMResource.getVirtualCores() >= 
          scheduler.getRootQueueMetrics().getAvailableVirtualCores();
{code}

> FairScheduler: AMs can consume all vcores leading to a livelock when using 
> FAIR policy
> --------------------------------------------------------------------------------------
>
>                 Key: YARN-4866
>                 URL: https://issues.apache.org/jira/browse/YARN-4866
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: fairscheduler
>    Affects Versions: 2.8.0
>            Reporter: Karthik Kambatla
>            Assignee: Yufei Gu
>         Attachments: YARN-4866.001.patch, YARN-4866.002.patch, 
> YARN-4866.003.patch, YARN-4866.004.patch, YARN-4866.005.patch, 
> YARN-4866.006.patch
>
>
> The maxAMShare uses the queue's policy for enforcing limits. When using FAIR 
> policy, this considers only memory. If there are fewer vcores on the cluster, 
> the AMs can end up taking all the vcores leading to a livelock. 



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

---------------------------------------------------------------------
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