'G1GC - How to check if the humongous objects is a bottleneck in GC?
My Java application generated the following parts of logs:
[2022-04-15T08:30:22.722+0000][debug][gc,humongous ] GC(1574) Live humongous region 926 object size 3914888 start 0x0000000673c00000 with remset 2 code roots 0 is marked 0 reclaim candidate 0 type array 1
[2022-04-15T08:30:22.722+0000][debug][gc,humongous ] GC(1574) Live humongous region 942 object size 3913024 start 0x0000000675c00000 with remset 1 code roots 0 is marked 0 reclaim candidate 0 type array 1
[2022-04-15T08:30:22.722+0000][debug][gc,humongous ] GC(1574) Live humongous region 944 object size 3912448 start 0x0000000676000000 with remset 2 code roots 0 is marked 0 reclaim candidate 0 type array 1
[2022-04-15T08:30:22.722+0000][debug][gc,humongous ] GC(1574) Live humongous region 954 object size 3915320 start 0x0000000677400000 with remset 1 code roots 0 is marked 0 reclaim candidate 0 type array 1
From my understanding, it means the humongous regions are up to 954, if one region is taking 2mb then it's up to 2gb taken by the humongous regions. Am I correct?
Is there any better way/tool of finding the humongous objects?
Solution 1:[1]
Answer my own question:
Live humongous region 926
It means the live humongous objects take 926 regions.
object size 3915320
It means total humongous objects take 3,915,320(Byte)
The humongous objects don't mean it's terrible. Sometimes the frequently used cache might be kept in the old generation as humongous objects.
Souce code: https://github.com/openjdk/jdk11u/blob/master/src/hotspot/share/gc/g1/g1CollectedHeap.cpp#L4537
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
