RFR: Performance improvements for non-generational modes

William Kemper wkemper at openjdk.org
Mon Mar 6 22:08:48 UTC 2023


On Mon, 6 Mar 2023 20:15:42 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

>> There are a basket of changes here:
>> * Make heuristics a bit less aggressive:
>>    * Revert threshold triggers to use `available` rather than adjusted head room.
>>    * Remove code that adjusted average gc time, it was causing wild fluctuations and making heuristic behave erratically
>> * Skip over more generational mode constraints on the allocation path
>> * Disable `ShenadoahEvacLABRatio` by default as it causes unused bytes in survivors regions, which in turn leads to these regions to being included in the mutator view of free memory. This contributed to higher fragmentation rates.
>> * More detailed debugging messages under the `gc+free` tags.
>
> src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.cpp line 432:
> 
>> 430: 
>> 431:   double avg_cycle_time = _gc_cycle_time_history->davg() + (_margin_of_error_sd * _gc_cycle_time_history->dsd());
>> 432: 
> 
> Here again, we seem to have ended up with a discrepancy between the comments and the control flow that those comments applied to, but which has now disappeared? I'd remove the comments in case they are no longer applicable. If the idea is to revisit this in the future, might it be better to capture in a ticket rather than leaving in obsolete comments? In any case, it might make sense to go over these comments and make sure they reflect current reality and clearly call out future plans.

I'm not sure why you think the comment doesn't match the control flow. I left in the `TODO` intentionally. The preceding comment does describe how the heuristic operates - maintaining a model of an average allocation rate, but also looking for 'spikes' that are outside of what the model expects.

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

PR: https://git.openjdk.org/shenandoah/pull/220


More information about the shenandoah-dev mailing list