Java 64 bit consumes excessive native memory (c-heap) due to JIT Compilation

Ashish Saxena anantiitrke at gmail.com
Tue Aug 21 09:29:55 PDT 2012


Hi Team,

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.
Thanks,
Ashish Anant Saxena


More information about the hotspot-compiler-dev mailing list