yarn-site.xml的部分資源配置參數,主要是與內存相關

vim yarn-site.xmlnode

每一個nodemanager 可分配的內存 100G: yarn.nodemanager.resource.memory-mb
每一個nodemanager 可分配的CPU 20核 :yarn.nodemanager.resource.cpu-vcoresvim

<property>
    <name>yarn.nodemanager.resource.memory-mb</name>
    <value>102400</value>
    <description>Amount of physical memory, in MB, that can be allocated for containers.</description>
  </property>

  <property>
    <name>yarn.nodemanager.resource.cpu-vcores</name>
    <value>20</value>
    <description>Number of vcores that can be allocated for containers.</description>
  </property>

yarn.nodemanager.resource.memory-mb
表示該節點上YARN可以使用的物理內存總量,默認是8192(MB),注意,若是你的節點內存資源不夠8GB,則須要調減少這個值,而YARN不會智能的探測節點的物理內存總量。ide

yarn.nodemanager.vmem-pmem-ratio
任務每使用1MB物理內存,最多可以使用虛擬內存量,默認是2.1。線程

yarn.nodemanager.pmem-check-enabled
是否啓動一個線程檢查每一個任務正使用的物理內存量,若是任務超出分配值,則直接將其殺掉,默認是true。code

yarn.nodemanager.vmem-check-enabled
是否啓動一個線程檢查每一個任務正使用的虛擬內存量,若是任務超出分配值,則直接將其殺掉,默認是true。xml

yarn.scheduler.minimum-allocation-mb
單個任務可申請的最少物理內存量,默認是1024(MB),若是一個任務申請的物理內存量少於該值,則該對應的值改成這個數。ip

yarn.scheduler.maximum-allocation-mb
單個任務可申請的最多物理內存量,默認是8192(MB)。內存

相關文章
相關標籤/搜索