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

Varun Vasudev commented on MAPREDUCE-5279:
------------------------------------------

Great! The patch looks mostly good to me, but I would recommend one change.

YARN-2448 exposes the resource types being considered when scheduling(is the RM 
considering cpu when scheduling). Can you please integrate that with your 
patch? For example, in your current patch, you have -
{noformat}
+  public static int computeAvailableContainers(Resource available, Resource 
required) {
+    return Math.min(
+      available.getMemory() / required.getMemory(), 
+      available.getVirtualCores() / required.getVirtualCores());
+  }
+
{noformat}

When using the CapacityScheduler with the DefaultResourceCalculator, CPU is not 
considered when scheduling so the current version of the patch can lead to 
lower throughput. All the mathematical functions in the Resources class should 
only do vcore calculations if the scheduler is using CPU as a resource.


> Jobs can deadlock if headroom is limited by cpu instead of memory
> -----------------------------------------------------------------
>
>                 Key: MAPREDUCE-5279
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-5279
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: mrv2, scheduler
>    Affects Versions: 2.0.3-alpha
>            Reporter: Peng Zhang
>            Assignee: Peng Zhang
>            Priority: Critical
>         Attachments: MAPREDUCE-5279-v2.patch, MAPREDUCE-5279.patch
>
>
> YARN-2 imported cpu dimension scheduling, but MR RMContainerAllocator doesn't 
> take into account virtual cores while scheduling reduce tasks.
> This may cause more reduce tasks to be scheduled because memory is enough. 
> And on a small cluster, this will end with deadlock, all running containers 
> are reduce tasks but map phase is not finished. 



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

Reply via email to