You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Naganarasimha G R (JIRA)" <ji...@apache.org> on 2016/03/08 15:49:40 UTC

[jira] [Commented] (YARN-3122) Metrics for container's actual CPU usage

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