RFR: 8373225: GenShen: More adaptive old-generation growth heuristics

Kelvin Nilsen kdnilsen at openjdk.org
Tue Dec 9 00:06:56 UTC 2025


On Mon, 8 Dec 2025 16:41:04 GMT, William Kemper <wkemper at openjdk.org> wrote:

>> When old-gen consumes a small percentage of heap size, trigger when old-gen expands by more than ShenandoahMinOldGenGrowthPercent, with default value 50%, from the live data in old at time of previous old-gen mark.
>> 
>> When old-gen consumes a larger percentage of heap size, we trigger when old-gen expands by more than  ShenandoahMinOldGenGrowthRemainingHeapPercent, with default value 25%, of the memory not live in old at the last marking of old.
>
> src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.cpp line 252:
> 
>> 250:     (_live_bytes_after_last_mark + ((ShenandoahHeap::heap()->soft_max_capacity() - _live_bytes_after_last_mark)
>> 251:                                     * ShenandoahMinOldGenGrowthRemainingHeapPercent / 100.0));
>> 252:   size_t result = MIN2(threshold_by_relative_growth, threshold_by_growth_into_percent_remaining);
> 
> Are we comparing bytes to a percentage here? Not sure I understand the role of `FRACTIONAL_DENOMINATOR`.

I'll take this opportunity to simplify that code.  We're using a percent.  Next version of code should be more clear.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28561#discussion_r2600571373


More information about the shenandoah-dev mailing list