I am running a Hadoop job, and in the yarn-site.xml file I have the following configuration:
<property> <name>yarn.scheduler.minimum-allocation-mb</name> <value>2048</value> </property> <property> <name>yarn.scheduler.maximum-allocation-mb</name> <value>4096</value> </property>
However, I still sometimes get the following error:
Container [pid=63375,containerID=container_1388158490598_0001_01_000003] is running beyond physical memory limits. Current usage: 2.0 GB of 2 GB physical memory used; 2.8 GB of 4.2 GB virtual memory used. Killing container.
I found that by increasing the value of yarn.scheduler.minimum-allocation-mb, the physical memory allocated for the container is increasing. However, I do not always want 4GB to be allocated for my container, and thought that by explicitly specifying the maximum size, I could solve this problem. I understand that Hadoop cannot understand how much memory it needs to allocate for the container before running mapper, since I should allocate more memory for the container only if it needs extra memory?
hadoop
Olshansk Dec 27 '13 at 15:51 2013-12-27 15:51
source share