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

Naganarasimha G R commented on YARN-3122:
-----------------------------------------

Hi [~adhoot] & [~kasha],
I had one query over here wrt milliVcoresUsed calculation 
{code}
 int milliVcoresUsed = (int) (cpuUsageTotalCoresPercentage * 1000
                * maxVCoresAllottedForContainers /nodeCpuPercentageForYARN);
{code}
*maxVCoresAllottedForContainers* is calculated from 
*NodeManagerHardwareUtils.getVCores* -> *NodeManagerHardwareUtils.getVCores*  
gets physical cores from *NodeManagerHardwareUtils.getContainersCPUs* and here 
we are returning 
{code}
    int numProcessors = getNodeCPUs(plugin, conf);
    int nodeCpuPercentage = getNodeCpuPercentage(conf);
    return (nodeCpuPercentage * numProcessors) / 100.0f;
{code}
so effectively milliVcoresUsed cancelling nodeCpuPercentage which was earlier 
evaluated, Please correct if my understanding is wrong.


> Metrics for container's actual CPU usage
> ----------------------------------------
>
>                 Key: YARN-3122
>                 URL: https://issues.apache.org/jira/browse/YARN-3122
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: nodemanager
>    Affects Versions: 2.6.0
>            Reporter: Anubhav Dhoot
>            Assignee: Anubhav Dhoot
>             Fix For: 2.7.0
>
>         Attachments: YARN-3122.001.patch, YARN-3122.002.patch, 
> YARN-3122.003.patch, YARN-3122.004.patch, YARN-3122.005.patch, 
> YARN-3122.006.patch, YARN-3122.007.patch, YARN-3122.prelim.patch, 
> YARN-3122.prelim.patch
>
>
> It would be nice to capture resource usage per container, for a variety of 
> reasons. This JIRA is to track CPU usage. 
> YARN-2965 tracks the resource usage on the node, and the two implementations 
> should reuse code as much as possible. 



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

Reply via email to