[ 
https://issues.apache.org/jira/browse/PIG-4505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14497370#comment-14497370
 ] 

Rohini Palaniswamy edited comment on PIG-4505 at 4/16/15 3:28 PM:
------------------------------------------------------------------

AM creates one thread for each nodemanager it needs to talk to and can be high 
in a big cluster with more nodes when number of tasks is high requiring more 
native memory (thread stack size). More threads will not only use up pmem, but 
also will allocate lot more vmem most of which mostly go unused. In fact jdk8 
and 64bit jvms use lot more virtual address space. Since pmem-vmem ratio is 
usually being turned off or set to a higher value in Hadoop 2.x when jdk8 is 
being used, virtual address space usage exceeding container size or pmem-vmem 
ratio is not an issue for 64 bit jvms. But with 32-bit jvm (irrespective of 
value of pmem-vmem ratio), jvm cannot go beyond 4G limit for allocating virtual 
address space and that is where it hits the problem. So need to keep the heap 
size small giving room for it to not hit 4G limit.


was (Author: rohini):
AM creates one thread for each nodemanager it needs to talk to and can be high 
in a big cluster with more nodes when number of tasks is high requiring more 
native memory (thread stack size). More threads will not only use up pmem, but 
also will allocate lot more vmem most of which mostly go unused. In fact jdk8 
and 64bit jvms use lot more virtual address space. Since pmem-vmem ratio is 
turned off in Hadoop 2.x, virtual address space usage exceeding container size 
or pmem-vmem ratio is not an issue. But with 32-bit jvm, jvm cannot go beyond 
4G limit for allocating virtual address space and that is where it hits the 
problem. So need to keep the heap size small giving room for it to not hit 4G 
limit.

> [Pig on Tez] Auto adjust AM memory can hit OOM with 3.5GXmx
> -----------------------------------------------------------
>
>                 Key: PIG-4505
>                 URL: https://issues.apache.org/jira/browse/PIG-4505
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Rohini Palaniswamy
>            Assignee: Rohini Palaniswamy
>             Fix For: 0.15.0
>
>         Attachments: PIG-4505-1.patch
>
>
>   If the cluster is big and can launch many containers, Tez can try to create 
> more threads to talk to the nodes and that can cause 
> java.lang.OutOfMemoryError: unable to create new native thread as there is 
> only 512MB of native memory (4GB limit due to 32-bit jvm) to create threads. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to