running beyond virtual/physical memory limits问题解决

Container killed on request. Exit code is 143
Container exited with a non-zero exit code 143


17/08/25 20:06:31 INFO mapreduce.Job: Task Id : attempt_1503705857308_0004_m_000000_0, Status : FAILED

Container [pid=1682,containerID=container_1503705857308_0004_01_000002] is running beyond virtual memory limits. Current usage: 58.1 MB of 1 GB physical memory used; 2.5 GB of 2.1 GB virtual memory used. Killing container.


问题原因: hadoop运行时使用的虚拟内存不足, hadoop物理内存默认与主机的内存一致,hadoop虚拟内存l默认是hadoop物理内存的2.1倍。


解决问题:

修改hadoop物理内存的大小可以在mapred-site.xml设置:

    mapreduce.map.memory.mb

    2048

 


 

    mapreduce.reduce.memory.mb

    2048

 

修改hadoop虚拟内存与hadoop物理内存的比率值可以在yarn-site.xml设置:

    yarn.nodemanager.vmem-pmem-ratio

    3



你可能感兴趣的:(hadoop)