gpt4 book ai didi

containers - "yarn.scheduler.minimum-allocation-vcores"和 yarn.scheduler.maximum-allocation-vcores"在决定容器/节点数量方面的作用?

转载 作者:行者123 更新时间:2023-12-03 16:35:54 26 4
gpt4 key购买 nike

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

最佳答案

yarn 中的默认资源调度程序是 Capacity Scheduler .

容量调度器有两个资源计算器

  • DefaultResourceCalculator (默认)
  • DominantResourceCalculator

  • 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在决定每个节点的容器数量方面不发挥任何直接作用。

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

    在 mapreduce 中,我们指定了 mapreduce.map.cpu.vcores 所需的 vcores和 mapreduce.reduce.cpu.vcores
    在 spark 中,我们指定了 spark.executor.cores 所需的 vcores
    yarn.scheduler.minimum-allocation-vcoresyarn.scheduler.maximum-allocation-vcores用于定义每个容器可以分配的最小和最大 vcores 数。

    关于containers - "yarn.scheduler.minimum-allocation-vcores"和 yarn.scheduler.maximum-allocation-vcores"在决定容器/节点数量方面的作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29692618/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com