Yarn详解
1.Yarn架构设计(MR的提交到Yarn流程)
RM: 调度器+APPS Manager
NM:
Container(容器):
1个NM-->多个容器-->只能运行一个task
APP Master|map task | reduce task
2.调优
NM:
yarn.nodemanager.resource.memory-mb: 50*1024mb (重点)
Container: memory+cpu
Memory:
yarn.scheduler.minimum-allocation-mb: 1024 1G-->2G-->3G (重点)
yarn.scheduler.maximum-allocation-mb: 8192<=50G (重点)
yarn.scheduler.increment-allocation-mb: 2048 (CDH平台)
yarn.nodemanager.pmem-check-enabled: true
yarn.nodemanager.vmem-pmem-ratio 2.1 1G内存 2.1虚拟内存
yarn.nodemanager.vmem-check-enabled true
eg:
1. 高度计算,不允许慢,允许挂掉: swap 没有
2. 允许慢,不允许任务挂掉 : swap 有
eg:
vm.swappiness=0-100
0: 不是禁用,说明调用swap的积极性是最差的
10: 调用swap的积极性是稍微好点
100: 太积极
生产: 选择2+vm.swappiness=10
Cpu:
yarn.nodemanager.resource.cpu-vcores -1
yarn.scheduler.minimum-allocation-vcores 1
yarn.scheduler.maximum-allocation-vcores 4<=32 (重点)
vcore : 虚拟核
1个物理核为2个虚拟核 CDH有个参数
3.Yarn常用命令
yarn application -list
yarn application -kill application_1513862674371_0003
YARN的Memory和CPU调优配置详解参考一下博客:
http://blog.itpub.net/30089851/viewspace-2127851/
YARN and MapReduce的【内存】优化配置详解参考一下博客:
http://blog.itpub.net/30089851/viewspace-2127850/