hadoop - 为什么我的Yarn的内存(12 GB)比主机(32)GB少

标签 hadoop yarn amazon-emr

我正在使用EMR,并且具有32 GB内存的任务节点。但是,当我登录到YARN UI时。它说它只有12 GB的备忘录。
是的,我知道操作系统和正在运行的其他服务应使用一些内存。但是,20 GB太多了。
enter image description here
在主机

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的可用空间?

最佳答案

在Google上进行一些搜索后,发现它受到 yarn 设置的限制。普拉迪普在他的评论中也提出了同样的建议。
我在群集上进行了以下操作

  • 找出任务和核心节点的实例组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'
    
  • 创建JSON配置以更新您的emr。您将必须创建两个配置文件,一个用于TASK组,另一个用于Core组。或者,您可以在每次更新后简单替换InstanceGroupId的值。
  • [
       {
          "InstanceGroupId":"<output_of_above_command>",
          "Configurations":[
             {
                "Classification":"yarn-site",
                "Properties":{
                   "yarn.nodemanager.resource.memory-mb":"32768"
                },
                "Configurations":[]
             }
          ]
       }
    ]
    
    
  • 最后运行命令以更新实例组。
  • aws emr modify-instance-groups --cluster-id j-******* --instance-groups file://instaceGroup.json
    

    关于hadoop - 为什么我的Yarn的内存(12 GB)比主机(32)GB少,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64390813/

    相关文章:

    regex - Hive:提取字符第一次出现和最后一次出现之间的字符串

    hadoop - Spark自定义序列化程序导致ClassNotFound

    hadoop - 即使终止了Application Master, yarn 应用也不会被终止

    java - EMR 集群在 Step 状态下挂起 'Running/Pending'

    python - 将文件保存到 Amazon Web Service s3

    mysql - 从我的java/mysql webapp开始 map 缩减工作

    scala - Spark:使用Scala进行HBase批量加载

    apache-spark - Spark 结构化流式传输蓝/绿部署

    hadoop - 设置伪分布式/单节点设置Apache Hadoop 2.2

    hadoop从hdfs复制到S3