G1 GC : JEP proposal for increased max region size and card size for very large heaps

Vishal Chand vishalchand2492 at gmail.com
Mon Aug 9 07:08:52 UTC 2021


Greetings!

*Problem Statement *- I was investigating G1 GC performance on large heaps
( > 64g). The max. region size is 32m, which gives > 4k regions and card
size is 512b (fixed). The time taken by Post Evacuate Collection set phase
is ~10 percent of the total GC time, while the same phase takes ~5 percent
for smaller heaps. I experimented with larger regions sizes (64m and 128m)
and larger card size (1024b) to check the impact.

*Experiment *- SpecJbb2015 with G1 GC. With 8 groups and 119g memory per
backend. I changed the max. configurable region size to 128m and card size
to 1024b (requires code changes in the hotspot). The results are shown in
the table below.

G1GC <RegionSize> <CardSize> G1GC 32m 512b G1GC 64m 512b G1GC 128m 512b G1GC
32m 1024b G1GC 64m 1024b G1GC 128m 1024b
Heap Size per Backend 119g 119g 119g 119g 119g 119g
max-jOPS 273028 273028 274743 273028 273028 273028
critical-jOPS *211701 (Baseline)* 212266 212670 212771 *217150 (+2.5%)*
216494
Avg. GC time (ms) 142.03 136.75 139.04 135.64 133.37 128.62
GC Phases Pre Evacuate Collection Set (ms) 1.92 1.381 1.13 1.92 1.32 1.01
Merge Heap Roots (ms) 3.16 2.56 2.99 2.59 2.02 1.57
Evacuate Collection Set (ms) 124.59 119.6 124.85 125.16 121.49 118.46
Post Evacuate Collection Set (ms) 13.09 (10%) 12.51 11.79 7.71 6.68 (5%)
6.73
Other (ms) 1.22 1.15 1.14 1.5 1.14 1.08
*Conclusion *- Critical-jOPS improved by 2.5% by using 64m regions and
1024b cards. The time taken by Post Evacuate Collection set phase is
reduced from 10% of total GC time to 5% of total GC time.

*Remarks *- I'm proposing to have a tunable for large cards and larger
regions for very large heaps (>64g). I would like to contribute to these
changes. I've done the POC and looking for someone to create a JEP for this
enhancement and assign me the JEP.


Thanks and Regards,
Vishal Chand



More information about the hotspot-gc-dev mailing list