"Hadoop" Running beyond virtual memory error causes and solutions

Source: Internet
Author: User

Problem Description:

Running the app in Hadoop, there's arunning beyond virtual memory错误。提示如下:

Container [pid=28920,containerID=container_1389136889967_0001_01_000121] is running beyond virtual memory limits. Current usage: 1.2 GB of 1 GB physical memory used; 2.2 GB of 2.1 GB virtual memory used. Killing container.

原因:从机上运行的
Container试图使用过多的内存,而被NodeManager kill off.
Excerpt The NodeManager is killing your container. It sounds like your trying to use Hadoop streaming which was running as a child process of the Map-reduce task. The NodeManager monitors the entire process tree of the task and if it eats up more memory than the maximum set in mapredu CE.MAP.MEMORY.MB or MAPREDUCE.REDUCE.MEMORY.MB respectively, we would expect the NodeManager to kill the task, otherwise y Our tasks are stealing memory belonging to other containers, which you don ' t want.
解决方法:
mapred-site.xml中设置map和reduce任务的内存配置如下:

<property>
<name>mapreduce.map.memory.mb</name>
<value>1536</value>
</property>
<property>
<name>mapreduce.map.java.opts</name>
<value>-Xmx1024M</value>
</property>
<property>
<name>mapreduce.reduce.memory.mb</name>
<value>3072</value>
</property>
<property>
<name>mapreduce.reduce.java.opts</name>
<value>-Xmx2560M</value>
</property>


附录:
Container is running beyond memory limits
http://stackoverflow.com/questions/21005643/container-is-running-beyond-memory-limits

"Hadoop" Running beyond virtual memory error causes and solutions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.