hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sunil G (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-4308) ContainersAggregated CPU resource utilization reports negative usage in first few heartbeats
Date Wed, 28 Oct 2015 16:20:27 GMT

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

Sunil G commented on YARN-4308:
-------------------------------

In {{CpuTimeTrackerCpuTimeTracker}}, Below code snippet can send {{UNAVAILABLE}} for first
time as {{lastSampleTime}} will be {{UNAVAILABLE}} for first time calculation.

This caused for a -ve return value and caused NM to send a -ve CPU usages in its heartbeats
for a brief time

{code}
  public float getCpuTrackerUsagePercent() {
    if (lastSampleTime == UNAVAILABLE ||
        lastSampleTime > sampleTime) {
      // lastSampleTime > sampleTime may happen when the system time is changed
      lastSampleTime = sampleTime;
      lastCumulativeCpuTime = cumulativeCpuTime;
      return cpuUsage;
    }
....
....
{code}

> ContainersAggregated CPU resource utilization reports negative usage in first few heartbeats
> --------------------------------------------------------------------------------------------
>
>                 Key: YARN-4308
>                 URL: https://issues.apache.org/jira/browse/YARN-4308
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: nodemanager
>    Affects Versions: 2.7.1
>            Reporter: Sunil G
>            Assignee: Sunil G
>
> NodeManager reports ContainerAggregated CPU resource utilization as -ve value in first
few heartbeats cycles. I added a new debug print and received below values from heartbeats.
> {noformat}
> INFO org.apache.hadoop.yarn.server.nodemanager.containermanager.monitor.ContainersMonitorImpl:
ContainersResource Utilization : CpuTrackerUsagePercent : -1.0 
> INFO org.apache.hadoop.yarn.server.nodemanager.containermanager.monitor.ContainersMonitorImpl:ContainersResource
Utilization :  CpuTrackerUsagePercent : 198.94598
> {noformat}
> Its better we send 0 as CPU usage rather than sending a negative values in heartbeats
eventhough its happening in only first few heartbeats.



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

Mime
View raw message