Integrated: 8367708: GenShen: Reduce total evacuation burden

Kelvin Nilsen kdnilsen at openjdk.org
Thu Sep 18 16:10:18 UTC 2025


On Mon, 15 Sep 2025 04:44:24 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

> This PR provides several improvements that cumulatively reduce the amount of evacuation performed by GenShen compared to traditional Shenandoah. Specifically:
> 
> 1. Do not promote humongous arrays of primitive data.  Leaving these regions in the young generation allows them to be reclaimed more quickly when they become garbage.  There is no disadvantage to leaving these regions in the young generation as their contents does not need to be scanned by the garbage collector.
> 2. Change the default value of ShenandoahOldGarbageThreshold from 15% to 25%.  This results in smaller sets of candidate regions for mixed evacuation, less aggressive compaction of old generation.  This also increases the likelihood that a region will be promoted in place instead of promoted by evacuation.
> 3. Only promote regions in place if the used within a region exceeds ShenandoahGenerationalMinPIPUsage (default 30) percent of the heap region size.  This is enforced in combination with the preexisting requirement that the garbage within the region be less than ShenandoahOldGarbageThreshold (new default 25) percent of the heap region size.  This causes regions with very low utilization to be promoted by evacuation rather than promoted in place.  While the immediate effect of this change is to perform more copying when the region is promoted, the secondary effect is that this region does not need to be evacuated at a later time, after it has accumulated more live data, as part of an effort to defragment old-gen memory.
> 4. Only defragment old-gen memory if the command-line has requested non-zero reserves for humongous objects (ShenandoahGenerationalHumongousReserves).  Previously, we would invest in defragmenting old-gen memory every time we finished old-generation marking, even if ShenandoahGenerationalHumongousReserves equals zero.

This pull request has now been integrated.

Changeset: c597384a
Author:    Kelvin Nilsen <kdnilsen at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/c597384ad64c7107fba4e970aa435a141276b2fd
Stats:     30 lines in 4 files changed: 22 ins; 2 del; 6 mod

8367708: GenShen: Reduce total evacuation burden

Reviewed-by: wkemper

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

PR: https://git.openjdk.org/jdk/pull/27278


More information about the hotspot-gc-dev mailing list