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 "Haibo Chen (JIRA)" <ji...@apache.org> on 2018/10/19 21:49:00 UTC

[jira] [Comment Edited] (YARN-8911) NM incorrectly account for container cpu utilization by their number of vcores

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

Haibo Chen edited comment on YARN-8911 at 10/19/18 9:48 PM:
------------------------------------------------------------

YARN-1011 has been using the cpu portion of ResourceUtilization as a percentage, based on this java doc in ResourceUtilization source code.
{code:java}
  /**
   * Get <em>CPU</em> utilization.
   *
   * @return <em>CPU utilization</em> normalized to 1 CPU
   */
  @Public
  @Unstable
  public abstract float getCPU();

{code}


was (Author: haibochen):
YARN-1011 has been using the cpu portion of ResourceUtilization as a percentage, based on this java doc

{code:java}

  /**
   * Get <em>CPU</em> utilization.
   *
   * @return <em>CPU utilization</em> normalized to 1 CPU
   */
  @Public
  @Unstable
  public abstract float getCPU();

{code}

> NM incorrectly account for container cpu utilization by their number of vcores
> ------------------------------------------------------------------------------
>
>                 Key: YARN-8911
>                 URL: https://issues.apache.org/jira/browse/YARN-8911
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: nodemanager
>            Reporter: Haibo Chen
>            Assignee: Haibo Chen
>            Priority: Major
>         Attachments: YARN-8911.00.patch
>
>
> ResourceUtilization represents the cpu utilization with a float number in [0, 1.0], i.e. the percentage of cpu usage across the node.  However, when Containers Monitor tracks the total aggregate resource utilization of all containers, it adds up the total number of vcores used by all running containers.
>  
> (If you have 6 containers running, each consuming 1 vcore, you'd see the aggregated cpu container utilization being 6.0, but it's supposed to be always between 0 and 1.0)   See [the code|https://github.com/apache/hadoop/blob/beb850d8f7f1fefa7a6d9502df2b4a4eea372523/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/ContainersMonitorImpl.java#L672]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org