Heap dump is always around 8G on process with 80G heap
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? Thanks Sundar
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
Hi Per, "ZGC only ever dumps reachable objects" Does that mean we can never dump unreachable objects in ZGC or there is some options that can be passed to get it? I will try to see if the dump from other GC has unreachable object which is showing as large file. Thanks Sundar On Fri, Nov 22, 2019 at 12:31 AM Per Liden <per.liden@oracle.com> wrote:
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
participants (2)
-
Per Liden
-
Sundara Mohan M