cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Process memory vs. Heap memory

Babar_Qayyum
DynaMight Guru
DynaMight Guru

Dear All,

 

Suppose, a process memory heap size is configured as 8GB, and the process memory utilization is 29G (memory saturation occurred due to this, whereas, the heap size never reached the maximum size). 

 

What does actually it mean?

 

Babar_Qayyum_0-1662015516699.png

Babar_Qayyum_1-1662015606952.png

 

Regards,

Babar

5 REPLIES 5

richard_guerra
Advisor

I'm not an expert by any means, but this looks like a good explanation: https://plumbr.io/blog/memory-leaks/why-does-my-java-process-consume-more-memory-than-xmx. Essentially, the jvm has some additional overhead over the heap.

Mizső
DynaMight Leader
DynaMight Leader

Hi Babar,

 

To be honest I have never seen before such porcess memory status. As far as I know commited heap memory at jvm metrics equals all process instance (different process indentifier on the same host) heap  size. Do you have only one jvm instance on the VM?

 

Mizs_0-1662052155988.png

Is it possible to share the command line args in order to check the jvm start parameters?

Mizs_1-1662052440153.png

 

Br, Mizső

Dynatrace Community RockStar 2024, Certified Dynatrace Professional

harald_berger
Dynatrace Champion
Dynatrace Champion

Hi,

Please mind that the sum of all the Java memory pools will never be the total amount of memory the java process consumes from the OS. The JVM allocates also native memory for all the thread stacks, GC, symbols or native byte buffers (NIO).

 

Also consider that not all memory pools are heap pools. So please have a look at the detailed JVM screen where all pools are listed separately. Maybe the metaspace is getting too large.

 

It is also possible that an application is using native parts via JNI where custom native programs consume native memory that is not part of the heap.

 

Last but not least, it is also possible the program parts or the JVM itself does leak native memory. We have seen this on AIX for old JVMs.

 

best

Harry

AntonioSousa
DynaMight Guru
DynaMight Guru

@Babar_Qayyum,

You are probably in a scenario where memory leaks are occurring.

I normally follow it's behavior after a restart, and if it keeps allocating system memory over time, you are probably in for a leak detection. These are difficult scenarios to debug, but if you follow it over time, you will probably better doing a memory dump before it creates problems (like at 25GB) and then trying to check where the leak, or whatever is causing memory consumption to rise. From past experiences, not an easy task...

Antonio Sousa

BTW, this is something that happens quite frequently. One of the main reasons for having to do applications restarts after some time...

Antonio Sousa

Featured Posts