RFR: 8255984: Shenandoah: "adaptive" heuristic is prone to missing load spikes [v2]

earthling-amzn github.com+71722661+earthling-amzn at openjdk.java.net
Fri Nov 13 22:26:58 UTC 2020


On Thu, 12 Nov 2020 22:57:12 GMT, earthling-amzn <github.com+71722661+earthling-amzn at openjdk.org> wrote:

>> This change adds a "reactive" heuristic for triggering concurrent GC cycles.
>> 
>> The reactive heuristic maintains a margin of error and an allocation spike detection mechanism to trigger cycles somewhat more aggressively than the 'adaptive' heuristic. This heuristic 'reacts' to the outcome of GC cycles by adjusting the sensitivity of the triggers.
>> 
>> JBS ticket is here: https://bugs.openjdk.java.net/browse/JDK-8255984
>> 
>> The "adaptive" heuristic remains the default.
>> 
>> Steps to reproduce and test will follow shortly (there are no new jtreg test failures for Shenandoah with this change).
>
> earthling-amzn has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Remove const qualifier from should_start_gc
>    
>    This lets the heuristics update state without const_casts.
>  - Rename ShenandoahReactive flags to ShenandoahAdaptive flags.

src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.cpp line 335:

> 333:   _last_sample_value(0),
> 334:   _interval_ns(NANOUNITS / ShenandoahAdaptiveSampleFrequencyHz),
> 335:   _rate(ShenandoahAdaptiveSampleSizeSeconds * ShenandoahAdaptiveSampleFrequencyHz, ShenandoahAdaptiveDecayFactor),

I get a warning here because `TruncatedSeq` constructor takes a signed `int` for length (SampleSize and Frequency are unsigned). Could we change that constructor?

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

PR: https://git.openjdk.java.net/jdk/pull/1099


More information about the hotspot-gc-dev mailing list