RFR: 8338737: Shenandoah: Reset marking bitmaps after the cycle

Xiaolong Peng xpeng at openjdk.org
Thu Oct 17 20:52:11 UTC 2024


All the shenandoah passed, still waiting for our test farm to verify performance.

Reset marking bitmaps after collection cycle, for GenShen only do this for young generation.

I have run same workload with shenandoah in generational mode and classic mode, average average time of concurrent reset dropped significantly(283us to 109us for GenShen, 276us to 167us for classic shenandoah. 

Classic shenandoah baseline:
`
[30.973s][info][gc,stats    ] Concurrent Reset               =    0.148 s (a =      276 us) (n =   536) (lvls, us =      141,      205,      240,      291,      694)
[30.973s][info][gc,stats    ] Pause Init Mark (G)            =    0.136 s (a =      253 us) (n =   536) (lvls, us =      119,      242,      254,      264,      926)
[30.973s][info][gc,stats    ] Pause Init Mark (N)            =    0.047 s (a =       87 us) (n =   536) (lvls, us =       62,       84,       88,       91,      110)
...
`

Classic shenandoah reset bitmaps after cycle:
`
[30.967s][info][gc,stats    ] Concurrent Reset               =    0.109 s (a =      167 us) (n =   652) (lvls, us =       48,      113,      139,      160,      888)
[30.967s][info][gc,stats    ] Concurrent Reset After Collect =    0.085 s (a =      132 us) (n =   648) (lvls, us =      107,      121,      125,      131,      532)
[30.967s][info][gc,stats    ] Pause Init Mark (G)            =    0.189 s (a =      289 us) (n =   652) (lvls, us =      117,      260,      277,      291,     2297)
[30.967s][info][gc,stats    ] Pause Init Mark (N)            =    0.058 s (a =       89 us) (n =   652) (lvls, us =       62,       85,       89,       94,      143)
...
`

GenShen baseline
`
[31.008s][info][gc,stats    ] Concurrent Reset               =    0.107 s (a =      283 us) (n =   379) (lvls, us =      143,      225,      283,      330,      753)
[31.008s][info][gc,stats    ] Pause Init Mark (G)            =    0.098 s (a =      259 us) (n =   379) (lvls, us =      104,      227,      262,      305,     1033)
[31.008s][info][gc,stats    ] Pause Init Mark (N)            =    0.034 s (a =       90 us) (n =   379) (lvls, us =       67,       81,       89,       99,      130)
...
`

GenShen reset bitmaps after cycle

`
[30.977s][info][gc,stats    ] Concurrent Reset               =    0.050 s (a =      109 us) (n =   462) (lvls, us =       54,       77,      100,      125,      496)
[30.977s][info][gc,stats    ] Concurrent Reset After Collect =    0.130 s (a =      281 us) (n =   462) (lvls, us =      104,      193,      229,      326,     1120)
[30.978s][info][gc,stats    ] Pause Init Mark (G)            =    0.111 s (a =      241 us) (n =   462) (lvls, us =      105,      223,      240,      273,      631)
[30.978s][info][gc,stats    ] Pause Init Mark (N)            =    0.040 s (a =       87 us) (n =   462) (lvls, us =       64,       75,       87,       98,      122)
...
`

Throughput is also improved by ~21% if use the GC counts as proxy metrics.

-------------

Commit messages:
 - Reset bitmap after ShenandoahOldGC
 - Not rest bitmap after cycle if it needs to bootstrap old gc
 - typo in comments
 - Minimize the regions to walk when reset bitmap
 - comments
 - bug fix
 - Fix most of test failures
 - Not to set mark incomplete in reset_mark_bitmap
 - Reset mark bitmaps of global generation after old GC
 - set_need_bitmap_reset in full GC
 - ... and 14 more: https://git.openjdk.org/shenandoah/compare/81b631fb...f984398b

Changes: https://git.openjdk.org/shenandoah/pull/516/files
  Webrev: https://webrevs.openjdk.org/?repo=shenandoah&pr=516&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8338737
  Stats: 100 lines in 7 files changed: 90 ins; 2 del; 8 mod
  Patch: https://git.openjdk.org/shenandoah/pull/516.diff
  Fetch: git fetch https://git.openjdk.org/shenandoah.git pull/516/head:pull/516

PR: https://git.openjdk.org/shenandoah/pull/516


More information about the shenandoah-dev mailing list