hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-6673) Add cpu cgroup configurations for opportunistic containers
Date Thu, 22 Jun 2017 19:26:00 GMT

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

ASF GitHub Bot commented on YARN-6673:
--------------------------------------

Github user haibchen commented on a diff in the pull request:

    https://github.com/apache/hadoop/pull/232#discussion_r123601076
  
    --- Diff: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/resources/CGroupsCpuResourceHandlerImpl.java
---
    @@ -181,16 +184,23 @@ public static boolean cpuLimitsExist(String path)
       @Override
       public List<PrivilegedOperation> preStart(Container container)
           throws ResourceHandlerException {
    -
         String cgroupId = container.getContainerId().toString();
         Resource containerResource = container.getResource();
         cGroupsHandler.createCGroup(CPU, cgroupId);
         try {
           int containerVCores = containerResource.getVirtualCores();
    -      int cpuShares = CPU_DEFAULT_WEIGHT * containerVCores;
    -      cGroupsHandler
    -          .updateCGroupParam(CPU, cgroupId, CGroupsHandler.CGROUP_CPU_SHARES,
    -              String.valueOf(cpuShares));
    +      ContainerTokenIdentifier id = container.getContainerTokenIdentifier();
    +      if (id != null && id.getExecutionType() ==
    +          ExecutionType.OPPORTUNISTIC) {
    --- End diff --
    
    yeah. In some sense, it is to be more descriptive than code reuse. Maybe we could have
an inline boolean variable with such name?


> Add cpu cgroup configurations for opportunistic containers
> ----------------------------------------------------------
>
>                 Key: YARN-6673
>                 URL: https://issues.apache.org/jira/browse/YARN-6673
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Haibo Chen
>            Assignee: Miklos Szegedi
>
> In addition to setting cpu.cfs_period_us on a per-container basis, we could also set
cpu.shares to 2 for opportunistic containers so they are run on a best-effort basis



--
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