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

hackeruncle發表於2016-05-09

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:
<property>
<name>yarn.nodemanager.resource.memory-mb</name>
<value>32768</value>
</property>
<property>
<name>yarn.nodemanager.resource.cpu-vcores</name>
<value>12</value>
</property>
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:
<name>yarn.scheduler.minimum-allocation-mb</name>
<value>2048</value>
B.
Modify yarn-sites.xml with the following property:
<name>yarn.scheduler.minimum-allocation-mb</name>
<value>4096</value>
C.
Modify yarn-site.xml with the following property:
<name>yarn.nodemanager.resource.cpu-vccores</name>
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

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30089851/viewspace-2096676/,如需轉載,請註明出處,否則將追究法律責任。

相關文章