Heap dump is always around 8G on process with 80G heap

Per Liden per.liden at oracle.com
Fri Nov 22 08:31:03 UTC 2019


On 11/22/19 12:37 AM, Sundara Mohan M wrote:
> Hi,
>     I am trying to take a heap dump of java process with 80G heap with ZGC,
> this is always giving me around 8G dump file.
> Same application with ParallelGC running with 48G heap i am getting around
> 30G dump file.
> I am using following command on both process and verified both process has
> same no of request processed and Used memory from gc log is similar
>     jcmd <pid> GC.heap_dump <filename>
> 
> 1. Why is ZGC heap dump always less compared to process running with
> ParallelGC?
> 2. Is there something i am missing?
> 

There are various reasons why a heap dump from one GC is larger or 
smaller compared to another GC. For example, ZGC only ever dumps 
reachable objects, while PrallelGC can also dump unreachable objects 
under some conditions (even though you didn't ask for them).

It's hard to tell where the difference comes from in your case, without 
further inspection/debugging.

/Per


More information about the zgc-dev mailing list