[ https://issues.apache.org/jira/browse/YARN-4712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15185588#comment-15185588 ]
Varun Saxena commented on YARN-4712: ------------------------------------ >From the example, it seems it does make more sense to capture >cpuUsagePercentPerCore from an aggregation point of view. As I pointed out in my earlier comment, I was thinking what we report to RM as resource utilization would be a useful metric to capture as well. Maybe have it only at the container level and do not aggregate it. I was saying this because of the factor nodeCpuPercentageForYARN. However from offline discussion with Naga, it seems it isn't calculated correctly. But if it is, wouldn't it be useful ? bq. it would involve complexities when nodes go down intermittently before the aggregation and effective usage should not be more than the actual cluster cores I am assuming we will have to add some system level metrics in the future. Maybe we can capture things like reduction/addition in cluster vcores/memory there(so that we can reconcile with CPU/memory values reported from container and aggregated upwards) > CPU Usage Metric is not captured properly in YARN-2928 > ------------------------------------------------------ > > Key: YARN-4712 > URL: https://issues.apache.org/jira/browse/YARN-4712 > Project: Hadoop YARN > Issue Type: Sub-task > Components: timelineserver > Reporter: Naganarasimha G R > Assignee: Naganarasimha G R > Labels: yarn-2928-1st-milestone > Attachments: YARN-4712-YARN-2928.v1.001.patch, > YARN-4712-YARN-2928.v1.002.patch, YARN-4712-YARN-2928.v1.003.patch, > YARN-4712-YARN-2928.v1.004.patch > > > There are 2 issues with CPU usage collection > * I was able to observe that that many times CPU usage got from > {{pTree.getCpuUsagePercent()}} is > ResourceCalculatorProcessTree.UNAVAILABLE(i.e. -1) but ContainersMonitor do > the calculation i.e. {{cpuUsageTotalCoresPercentage = cpuUsagePercentPerCore > /resourceCalculatorPlugin.getNumProcessors()}} because of which UNAVAILABLE > check in {{NMTimelinePublisher.reportContainerResourceUsage}} is not > encountered. so proper checks needs to be handled > * {{EntityColumnPrefix.METRIC}} uses always LongConverter but > ContainerMonitor is publishing decimal values for the CPU usage. -- This message was sent by Atlassian JIRA (v6.3.4#6332)