Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

committed heap vs max heap

Hi JVM configuration is :

  • Xmx = 4096
  • Xms = 1024

In my monitoring tools : I have always a committed heap at 2g and my server goes to OutOfMemory errors .

I don't understand why my JVM committed heap is limited to 2g and didn't grow up to 4g (Max heap)

Why the free heap is not used and my server goes to OutOfMemory exception ?

NB:

  • My application server is websphere 8.5.
  • My server is Linux 64 Bits .

Thanks in advance

like image 940
Nabil Avatar asked Feb 07 '26 03:02

Nabil


1 Answers

While setting preferredHeapBase may resolve the problem, there could be a number of other reasons for OOM:

  • A very large memory request could not be satisfied - check the verboseGC output just before OOM timestamp.
  • Inadequate User Limits Insufficient ulimit -u (NPROC) Value Contributes to Native OutOfMemory. Check the user limits.
  • The requirement from the application for more than 4gb native memory. In that case, -Xnocompressedrefs will resolve the problem (but with a larger java memory footprint and performance impact).

There are other reasons but I find those to be the top hits when diagnosing OOM when there is plenty of java heap space free.

like image 69
macalcav Avatar answered Feb 09 '26 16:02

macalcav



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!