" yarn.scheduler.minimum-allocation-vcores"和yarn.scheduler.maximum-allocation-vcores"在决定不。容器/节点?

时间:2015-04-17 07:14:14

标签: containers yarn

我实际上是想弄清楚单个节点管理器中有多少个容器。它取决于哪些因素?在确定每个节点的容器数量时,“yarn.scheduler.minimum-allocation-vcores”和“yarn.scheduler.maximum-allocation-vcores”的作用是什么?

1 个答案:

答案 0 :(得分:2)

纱线中的默认资源调度程序为Capacity Scheduler

Capacity Scheduler有两个资源计算器

  1. DefaultResourceCalculator(默认)

  2. DominantResourceCalculator

  3. DefaultResourceCalculator仅使用内存来计算可用容器

    public int computeAvailableContainers(Resource available, Resource required) {
    // Only consider memory
    return available.getMemory() / required.getMemory();
      }
    

    DominantResourceCalculator使用内存和核心

      public int computeAvailableContainers(Resource available, Resource required) {
        return Math.min(
            available.getMemory() / required.getMemory(), 
            available.getVirtualCores() / required.getVirtualCores());
      }
    

    yarn.scheduler.minimum-allocation-vcoresyarn.scheduler.maximum-allocation-vcores在决定每个节点的容器数量方面没有任何直接的作用。

    虽然请求资源应用程序告诉纱线内存和核心,但它需要每个容器

    在mapreduce中,我们指定了mapreduce.map.cpu.vcoresmapreduce.reduce.cpu.vcores

    所需的vcores

    在spark中,我们指定spark.executor.cores

    所需的vcores

    yarn.scheduler.minimum-allocation-vcoresyarn.scheduler.maximum-allocation-vcores用于定义每个容器可分配的最小和最大vcores数。

相关问题