hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-6870) Fix floating point inaccuracies in resource availability check in AllocationBasedResourceUtilizationTracker
Date Fri, 28 Jul 2017 23:59:00 GMT

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

Hudson commented on YARN-6870:
------------------------------

SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #12074 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/12074/])
YARN-6870. Fix floating point inaccuracies in resource availability (arun suresh: rev 890e14c02a612c772cecd5dff2411060efd418a3)
* (edit) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/scheduler/ContainerScheduler.java
* (add) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/scheduler/TestAllocationBasedResourceUtilizationTracker.java
* (edit) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/scheduler/AllocationBasedResourceUtilizationTracker.java


> Fix floating point inaccuracies in resource availability check in AllocationBasedResourceUtilizationTracker
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: YARN-6870
>                 URL: https://issues.apache.org/jira/browse/YARN-6870
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: api, nodemanager
>            Reporter: Brook Zhou
>            Assignee: Brook Zhou
>             Fix For: 2.9.0, 3.0.0-beta1
>
>         Attachments: YARN-6870-v0.patch, YARN-6870-v1.patch, YARN-6870-v2.patch, YARN-6870-v3.patch
>
>
> We have seen issues on our clusters where the current way of computing CPU usage is having
float-arithmetic inaccuracies (the bug is still there in trunk)
> Simple program to illustrate:
> {code:title=Bar.java|borderStyle=solid}
>       public static void main(String[] args) throws Exception {
>             float result = 0.0f;
>             for (int i = 0; i < 7; i++) {
>                   if (i == 6) {
>                         result += (float) 4 / (float)18;
>                   } else {
>                         result += (float) 2 / (float)18;
>                   }
>             }
>             for (int i = 0; i < 7; i++) {
>                   if (i == 6) {
>                         result -= (float) 4 / (float)18;
>                   } else {
>                         result -= (float) 2 / (float)18;
>                   }                 
>             }
>             System.out.println(result);
>       }
> {code}
> // Printed
> 4.4703484E-8
> 2017-04-12 05:43:24,014 INFO org.apache.hadoop.yarn.server.nodemanager.containermanager.monitor.ContainersMonitorImpl:
Not enough cpu for [container_e3295_1491978508342_0467_01_000030], Current CPU Allocation:
[0.8888891], Requested CPU Allocation: [0.11111111]
> There are a few places with this issue:
> 1. ResourceUtilization.java - set/getCPU both use float. When ContainerScheduler calls
ContainersMonitor.increase/decreaseResourceUtilization, this may lead to issues.
> 2. AllocationBasedResourceUtilizationTracker.java  - hasResourcesAvailable uses float
as well for CPU computation.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message