【问题标题】:Why my Yarn shows less memory (12 GB) than host machine (32) GB为什么我的 Yarn 显示的内存 (12 GB) 比主机 (32) GB 少
【发布时间】:2021-01-31 01:45:54
【问题描述】:

我正在使用 EMR,并且我有 32 GB 内存的任务节点。但是,当我登录到我的 YARN UI 时。它说它只有 12 GB 的内存。

是的,我知道操作系统和其他运行的服务应该使用一些内存。但是,20 GB 太多了。

在主机上

free -h
             total       used       free     shared    buffers     cached
Mem:           30G        18G        12G        88K       128M        12G
-/+ buffers/cache:       5.6G        25G
Swap:           0B         0B         0B

在其他机器上。

 free -h
             total       used       free     shared    buffers     cached
Mem:           30G        11G        18G        88K        75M       8.5G
-/+ buffers/cache:       3.4G        27G
Swap:           0B         0B         0B

所以即使有 18 GB 可用空间,为什么 Yarn 显示只有 12 GB 可用空间?

【问题讨论】:

  • 我不熟悉 EMR,但请检查您的 yarn.nodemanager.resource.memory-mb 设置。这是控制分配给节点管理器多少内存的设置

标签: hadoop hadoop-yarn amazon-emr


【解决方案1】:

在谷歌上进行一些搜索后,它受到纱线设置的限制。 pradeep 在他的评论中也提出了同样的建议。

我在集群上做了以下设置

  1. 找出您的任务和核心节点的实例组 ID。为此,请使用以下命令。
aws emr describe-cluster --cluster-id j-xxxxxx | jq -r '.Cluster.InstanceGroups[] | select(.InstanceGroupType == "CORE").Id'
aws emr describe-cluster --cluster-id j-xxxxxx | jq -r '.Cluster.InstanceGroups[] | select(.InstanceGroupType == "TASK").Id'
  1. 创建 JSON 配置以更新您的 emr。您将必须创建两个配置文件,一个用于 TASK 组,另一个用于 Core 组。或者您可以在每次更新后简单地替换 InstanceGroupId 的值。
[
   {
      "InstanceGroupId":"<output_of_above_command>",
      "Configurations":[
         {
            "Classification":"yarn-site",
            "Properties":{
               "yarn.nodemanager.resource.memory-mb":"32768"
            },
            "Configurations":[]
         }
      ]
   }
]

  1. 最后运行命令更新实例组。
aws emr modify-instance-groups --cluster-id j-******* --instance-groups file://instaceGroup.json

【讨论】:

    猜你喜欢
    • 2013-02-27
    • 1970-01-01
    • 2018-05-03
    • 1970-01-01
    • 2017-04-08
    • 2019-11-06
    • 1970-01-01
    • 2021-10-15
    • 1970-01-01
    相关资源
    最近更新 更多