RFR: Balance evacuation

William Kemper wkemper at openjdk.java.net
Thu Mar 24 18:05:11 UTC 2022


On Thu, 24 Mar 2022 17:31:02 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

> 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).

Marked as reviewed by wkemper (Committer).

src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 488:

> 486:     _old_generation->initialize_heuristics(_gc_mode);
> 487: 
> 488:     ShenandoahEvacWaste = ShenandoahGenerationalEvacWaste;

Minor nit, but this would fit better in `ShenandoahGenerationalMode::initialize_flags`.

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

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


More information about the shenandoah-dev mailing list