RFR: Balance evacuation

Kelvin Nilsen kdnilsen at openjdk.java.net
Thu Mar 24 17:37:57 UTC 2022


We found that a cause for too-frequent degenerated GCs was allocation failures during evacuation.  We chased this down to two root causes, both of which are addressed in this new commit:

1. When thread-local promotion labs (PLAB and GCLAB) are allowed to expand indiscriminately, we end up with a situation under which a small number of threads hold too much of the evacuation budget within their private caches, leaving other threads unable to allocate memory to hold evacuation copies.  This is addressed by introducing a new ShenandoahMaxEvacLABRatio parameter, with default value 16.

2. Enforcement of evacuation budgets was previously introduced into the generational mode of Shenandoah.  This allows more proactive management of available memory resources during particular phases of operation.  For example, it allows us to safely loan memory from old-gen to young-gen during evacuation and update-refs phases of execution.  However, with this enforcement, we found that the default values for ShenandoahEvacWaste that work well with traditional Shenandoah are too low for generational mode of Shenandoah.  So we introduced a new ShenandoahGenerationalEvacWaste parameter with default value 2.0.

This branch has been tested on a variety of workloads and shown to reduce the number of degenerated GCs with generational mode of Shenandoah below the values of traditional Shenandoah for most cases (holding heap size constant).

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

Commit messages:
 - Increase default value of ShenandoahGenerationalEvacWaste
 - Merge branch 'shenandoah' of ssh://git.amazon.com/pkg/OpenJDKTipSrc into rectify-evacuation-imbalance
 - Merge upstream  into shenandoah
 - Merge upstream into shenandoah
 - Add options to control evacuation efficiency
 - Revert "Mutator may fail to evacuate"

Changes: https://git.openjdk.java.net/shenandoah/pull/127/files
 Webrev: https://webrevs.openjdk.java.net/?repo=shenandoah&pr=127&range=00
  Stats: 49 lines in 2 files changed: 46 ins; 2 del; 1 mod
  Patch: https://git.openjdk.java.net/shenandoah/pull/127.diff
  Fetch: git fetch https://git.openjdk.java.net/shenandoah pull/127/head:pull/127

PR: https://git.openjdk.java.net/shenandoah/pull/127


More information about the shenandoah-dev mailing list