Yarn资源配置需要平衡服务器cpu,内存,磁盘资源。Hortonworks推荐两个Container使用1个cpu,1块磁盘能达到很好平衡。
Hortonworks提供了yarn内存参数设置脚本,执行yarn-utils.sh(下载地址https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.1.1/bk_installing_manually_book/content/rpm-chap1-9.html)脚本生成配置参数。
示例:python yarn-utils.py -c 40 -m 224 -d 12 -k False
参数:
Option |
Description |
-c CORES |
The number of cores on each host. |
-m MEMORY |
The amount of memory on each host in GB. |
-d DISKS |
The number of disks on each host. |
-k HBASE |
"True" if HBase is installed, "False" if not. |
内存配置:
系统及hbase预留内存参考:
Total Memory per Node |
Recommended Reserved System Memory |
Recommended Reserved HBase Memory |