CCAH-CCA-500-6题:You want YARN to launch no more than 16 containers per node.

6.What should you do?
Each node in your Hadoop cluster, running YARN, has 64GB memory and 24 cores.
Your yarn.site.xml has the following configuration:

yarn.nodemanager.resource.memory-mb
32768


yarn.nodemanager.resource.cpu-vcores
12

You want YARN to launch no more than 16 containers per node. What should you do?

A.
Modify yarn-site.xml with the following property:
yarn.scheduler.minimum-allocation-mb
2048
B.
Modify yarn-sites.xml with the following property:
yarn.scheduler.minimum-allocation-mb
4096
C.
Modify yarn-site.xml with the following property:
yarn.nodemanager.resource.cpu-vccores
D.
No action is needed: YARN’s dynamic resource allocation automatically optimizes the node
memory and cores


问题:
      Hadoop集群的每台节点内存64G,CPU 24核。当前一个节点可分配的物理内存总量是32768M(32G),可分配的虚拟cpu总个数是12。
   那么yarn在每个节点上,发起不超过16个容器,我们应该怎样配置?

分析:A

   yarn.scheduler.minimum-allocation-mb:最小可申请内存量,默认是1024,我们设置2048M,见如下计算公式

       Maximum memory YARN can utilize on the node
    ————————————————————————————————————————————— = minimum memory per container
       Number of containers
    
配置文件                     配置项名称                                  配置项值
yarn-site.xml        yarn.nodemanager.resource.memory-mb        = Containers个数* 每个Container内存
yarn-site.xml        yarn.scheduler.minimum-allocation-mb        = 每个Container内存
yarn-site.xml        yarn.scheduler.maximum-allocation-mb        = Containers个数* 每个Container内存
mapred-site.xml        mapreduce.map.memory.mb        = 每个Container内存
mapred-site.xml        mapreduce.reduce.memory.mb        = 2 * 每个Container内存
mapred-site.xml        mapreduce.map.java.opts        = 0.8 * 每个Container内存
mapred-site.xml        mapreduce.reduce.java.opts        = 0.8 * 2 * 每个Container内存
yarn-site.xml (check)        yarn.app.mapreduce.am.resource.mb        = 2 * 每个Container内存
yarn-site.xml (check)        yarn.app.mapreduce.am.command-opts        = 0.8 * 2 * 每个Container内存

http://developer.51cto.com/art/201401/426610.htm

请使用浏览器的分享功能分享到微信等