RFR: 8312116: GenShen: make instantaneous allocation rate triggers more timely [v3]

Kelvin Nilsen kdnilsen at openjdk.org
Wed Jan 7 20:56:54 UTC 2026


On Tue, 6 Jan 2026 22:27:41 GMT, William Kemper <wkemper at openjdk.org> wrote:

>> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Remove develop/debug instrumentation
>
> src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.cpp line 275:
> 
>> 273: }
>> 274: 
>> 275: void ShenandoahAdaptiveHeuristics::add_gc_time(double timestamp, double gc_time) {
> 
> Could we use `TruncatedSeq::predict_next` here?

In this PR, we keep TruncatedSeq::predict_next() functionality as that has proven to be "right" most of the time.  TruncatedSeq::predict_next() assumes the next GC time is most effectively predicted as an average over a noisy history of previously measured GC times.

This new function adds a new prediction mechanism which kicks in when we observe a "linearly increasing trend in GC times".  This has been observed to occur during initialization and startup of new phases of a service workload, where GC(N) takes 400 ms, GC(N+1) takes 425 ms, GC(N+2) takes 465 ms, etc.  The typical reason is because the workload is building up data structures and thus requires increasing amounts of time to mark and evacuate and update the increasing amounts of live data.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29039#discussion_r2670036503


More information about the shenandoah-dev mailing list