gpt4 book ai didi

hadoop - 如何使 Hadoop/EMR 每个节点使用更多容器

转载 作者:可可西里 更新时间:2023-11-01 15:27:53 25 4
gpt4 key购买 nike

我正在将我们的应用程序从 Hadoop 1.0.3 迁移到 EMR v5.1.0 上的 2.7。我让它运行起来了,但我仍然无法理解 Yarn 中的资源分配系统。使用 EMR 提供的默认设置,Hadoop 只为每个节点分配一个容器,即使我为节点选择了更大的实例类型。这是一个问题,因为我们现在将使用两倍的节点来完成相同数量的工作。

我想将更多容器压缩到一个节点中,并且确保我们使用所有可用资源。我假设我不应该触摸 yarn.nodemanager.resource.memory-mbyarn.nodemanager.resource.cpu-vcores,因为它们是由 EMR 设置的以反射(reflect)实际可用的资源。我必须更改哪些设置?

最佳答案

您的容器大小是通过设置内存(容器的默认标准)和 vcores 来定义的。可以配置以下内容:

  1. yarn-scheduler.minimum-allocation-mb
  2. yarn-scheduler.maximum-allocation-mb
  3. yarn-scheduler.increment-allocation-mb

  4. yarn-scheduler.minimum-allocation-vcores

  5. yarn-scheduler.maximum-allocation-vcores
  6. yarn-scheduler.increment-allocation-vcores

必须满足以下所有条件(它们是针对每个容器的,除了 yarn.nodemanager.resource.cpu-vcores 和 yarn.nodemanager.resource.memory-mb 是针对每个 NodeManager 因此针对每个 DataNode):

1 <= yarn-scheduler.minimum-allocation-vcores <= yarn-scheduler.maximum-allocation-vcores

yarn-scheduler.maximum-allocation-vcores <= yarn.nodemanager.resource.cpu-vcores

yarn-scheduler.increment-allocation-vcores = 1

1024 <= yarn-scheduler.minimum-allocation-mb <= yarn-scheduler.maximum-allocation-mb

yarn-scheduler.maximum-allocation-mb <= yarn.nodemanager.resource.memory-mb

yarn-scheduler.increment-allocation-mb = 512

您还可以看到这个有用的链接 https://www.cloudera.com/documentation/enterprise/5-4-x/topics/cdh_ig_yarn_tuning.html

关于hadoop - 如何使 Hadoop/EMR 每个节点使用更多容器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40870497/

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