RFR: 8373894: G1: Count evacuation-failed garbage collections in gc cpu usage
Thomas Schatzl
tschatzl at openjdk.org
Thu Jan 8 14:02:38 UTC 2026
Hi all,
please review this change that makes evacuation failed garbage collections count in the gc CPU usage calculations.
The reason is that currently (since forever), G1 considers garbage collections that experience an evacuation failure to not count in the cpu usage calculations.
(Afair this has been introduced because the previously extremely slow evacuation failures would impact cpu usage based calculations too much even if very infrequent. For many releases evacuation failure handling is at least parallel and in the same order of magnitude wrt to performance).
This can cause significant distortions in GC behavior.
In the worst case, if for some reason all garbage collections experience evacuation failure, gc cpu usage (at least for the young gen evacuation pauses) is considered as (close to) zero, with repercussions on heap sizing.
Testing: tier1-5 multiple times to find tests that fail because of the UseGCOverheadLimit flag
Thanks,
Thomas
-------------
Commit messages:
- 8373894
Changes: https://git.openjdk.org/jdk/pull/29115/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29115&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8373894
Stats: 13 lines in 3 files changed: 0 ins; 4 del; 9 mod
Patch: https://git.openjdk.org/jdk/pull/29115.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/29115/head:pull/29115
PR: https://git.openjdk.org/jdk/pull/29115
More information about the hotspot-gc-dev
mailing list