Java 64 bit consumes excessive native memory (c-heap) due to JIT Compilation
Andrew Haley
aph at redhat.com
Wed Aug 22 08:33:53 PDT 2012
On 08/21/2012 05:29 PM, Ashish Saxena wrote:
> In our Java 64 bit application, we are observing that JIT Compiler is
> allocating about 10 anonymous blocks of 64 MB each as soon as it
> begins compilation. Due to these extra native memory the Resident set
> size (RSS) of the linux process goes upto 2 GB. I have xmx setting of
> 1 GB and PermGen of 128 MB. So, i expect the JVM Process to use
> nearly 1GB + 128 MB + JVM ovehead = 1.2 GB However, the value is 2
> GB. On looking at the pmap output, it shows that this high memory it
> shows many 64 MB Blocks.
> To identify the cause of these blocks, we tried different JVM JIT
> Compiler related options. On using -Xcomp to statically compile the
> application, RSS is 1.2 GB and only 1 anon block of 65 MB is seen in
> pmap output.
> Code Cache size is around 15 MB only. Why JIT is having so much
> overhead ? Is it the Data Cache ? I think it is usually a subset of
> CodeCache.
>
> Note: this behaviour is seen on all updates of JVM 1.6 and 1.7.
If this is Linux, these are thread-local C heaps. They are 64M in size,
and you'll get one for each thread.
Andrew.
More information about the hotspot-compiler-dev
mailing list