I have java heap size setting max/min defined as 8 GB . System memory is 14 GB .There is no other java process running other than tomcat . I see java using approx 12 GB and hence system goes down . What kind of other things which are consuming more than 4 GB outside of java heap permsize is 256 mb only .
2 Answers 2
I got the answer . Our application was using bytearray which consumes outside heap and hence the difference in behavior .
Comments
For a 32 bit JDK, Total virtual memory address is 4G size. Ignoring Kernel space at MAX 3G can be used by java and native heap. In-case of 64 bit JDK virtual memory address is infinite. System memory you mentioned is RAM size. System memory and virtual memory are different. Java heap will not expand than specified -Xmx value. If Xmx is set to 8GB it will not expand further when it reaches 8GB and if application did not find space for allocation then java will throw OutOfMemory exception.
Comments
Explore related questions
See similar questions with these tags.
m
? I'm not familiar with that. Anyway, what i'm aiming at is that you shouldn't look at virtual memory footprint but resident set size. As for the usage, memory-mapped/direct memory buffers files can consume additional memory beyond the java heap.