RFR: 8335126: Shenandoah: Improve OOM handling [v2]
Kelvin Nilsen
kdnilsen at openjdk.org
Mon Jul 8 17:09:48 UTC 2024
> 1. Throw OOM after failed allocation request following a Full GC (rather
> than retrying as long as Full GC makes good progress because
> repeatedly retrying the allocation request creates brown-out behavior
> with no identified benefits on real-world workloads)
>
> 2. Count a successful allocation following a blocking
> handle_allocation_failure() request to be good GC progress.
> Otherwise, we increment gc_no_progress_count in full GCs that
> have bad progress but successful allocations, and this causes
> unwanted failure to even try a full GC in a different thread after
> an out-of-memory condition might have been resolved in this thread.
>
> 3. Count a completed concurrent GC cycle as good progress, regardless
> of how much memory it might have been able to reclaim. The fact that
> concurrent GC succeeded without allocation failure and without
> degeneration is considered good progress. Successful concurrent
> GCs between Full GCs will reset the gc_no_progress_count to zero.
>
> 4. Do not count degenerated cycles as having no-progress. If a
> degenerated cycle has no progress, it will upgrade to full GC.
> The upgraded full GC will evaluate its own progress. We don't
> want to count this "same [upgraded] cycle" twice.
>
> These changes have been tested over a variety of workloads and standard tests. These changes have also been tested with the generational mode of Shenandoah. It appears these changes provide more robust and consistent handling across a diversity of scenarios than the original implementation.
Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
Change TODO comment to reference JBS issue
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/19912/files
- new: https://git.openjdk.org/jdk/pull/19912/files/439d394c..24cd0fa6
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=19912&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=19912&range=00-01
Stats: 15 lines in 1 file changed: 0 ins; 14 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/19912.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/19912/head:pull/19912
PR: https://git.openjdk.org/jdk/pull/19912
More information about the hotspot-gc-dev
mailing list