RFR: 8316299: GenShen: Reduce frequency of expedited GC
Kelvin Nilsen
kdnilsen at openjdk.org
Thu Sep 14 15:40:39 UTC 2023
On Thu, 14 Sep 2023 15:32:20 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> src/hotspot/share/gc/shenandoah/heuristics/shenandoahYoungHeuristics.cpp line 139:
>>
>>> 137: ShenandoahHeap* heap = ShenandoahHeap::heap();
>>> 138:
>>> 139: size_t promo_expedite_threshold = (heap->young_generation()->max_capacity() * ShenandoahEvacReserve) / 512;
>>
>> What's the reasoning behind `512` divisor here? Since `ShenandoahEvacReserve` is percents of young/total heap size, this makes `promo_expedite_threshold` about 20% of heap size. Is that what we want?
>
> Err, miscomputed. That would be only `1%` of heap size.
Yes. 20% of 5%. The idea: In the rare scenario that we anticipate that promotion will consume over 20% of the evacuation reserve, we'll expedite the cycle so as to improve the likelihood that GC will replenish young allocation pool before it becomes exhausted.
-------------
PR Review Comment: https://git.openjdk.org/shenandoah/pull/325#discussion_r1326142487
More information about the shenandoah-dev
mailing list