Cloudera CDH/CDP 및 Hadoop EcoSystem, Semantic IoT등의 개발/운영 기술을 정리합니다. gooper@gooper.com로 문의 주세요.
Container killed on request. Exit code is 143
Container exited with a non-zero exit code 143
hortonworks에서 제공하는 메모리 설정및 계산기
http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.0.9.1/bk_installing_manually_book/content/rpm-chap1-11.html
메모리 설정값 계산 파일
wget http://public-repo-1.hortonworks.com/HDP/tools/2.0.6.0/hdp_manual_install_rpm_helper_files-2.0.6.101.tar.gz
실행/결과
[root@master scripts]$ python yarn-utils.py -c 16 -m 16 -d 1 -k True
Using cores=16 memory=16GB disks=1 hbase=True
Profile: cores=16 memory=12288MB reserved=4GB usableMem=12GB disks=1
Num Container=3
Container Ram=4096MB
Used Ram=12GB
Unused Ram=4GB
---yarn-site.xml
yarn.scheduler.minimum-allocation-mb=4096
yarn.scheduler.maximum-allocation-mb=12288
yarn.nodemanager.resource.memory-mb=12288
mapred-site.xml
mapreduce.map.memory.mb=4096
mapreduce.map.java.opts=-Xmx3276m
mapreduce.reduce.memory.mb=4096
mapreduce.reduce.java.opts=-Xmx3276m
yarn-site.xml
yarn.app.mapreduce.am.resource.mb=4096
yarn.app.mapreduce.am.command-opts=-Xmx3276m
mapred-site.xml
mapreduce.task.io.sort.mb=1638
-----------------------------------------------------------------------------------------------
yarn-site.xml에 설정
<property>
<name>yarn.nodemanager.resource.memory-mb</name>
<!-- value>8000</value -->
<value>12288</value>
</property>
<property>
<name>yarn.scheduler.minimum-allocation-mb</name>
<!-- value>512</value -->
<value>4096</value>
</property>
<property>
<name>yarn.scheduler.maximum-allocation-mb</name>
<!-- value>2048</value -->
<value>12288</value>
</property>
<property>
<name>yarn.app.mapreduce.am.resouce.mb</name>
<value>4096</value>
</property>
<property>
<name>yarn.app.mapreduce.am.command-opts</name>
<value>-Xmx3276m</value>
</property>