【问题标题】:How to make Hadoop/EMR use more containers per node如何让 Hadoop/EMR 每个节点使用更多容器
【发布时间】:2016-11-29 16:10:25
【问题描述】:

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

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

【问题讨论】:

  • yarn.nodemanager.resource.memory-mb默认设置的值是多少,每个节点有多少内存?

标签: hadoop hadoop2 emr


【解决方案1】:

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

  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.maximum-allocation-vcores

yarn-scheduler.increment-allocation-vcores = 1

1024

yarn-scheduler.maximum-allocation-mb

yarn-scheduler.increment-allocation-mb = 512

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多