RFR: Use peak occupancy to optimize/pessimize free_threshold in adaptive heuristics
Aleksey Shipilev
shade at redhat.com
Thu May 4 17:31:25 UTC 2017
On 05/04/2017 07:17 PM, Roman Kennke wrote:
> That means, observe the peak occupancy (right before
> reclamation) and pessimize if peak occupancy is less than a threshold.
> Here I'm re-using ShenandoahMinFreeThreshold for this. This should
> balance our GC cycles around that threshold and leave some room for
> alloc spikes, thus leading to fewer degen cycles or full-gcs.
>
> http://cr.openjdk.java.net/~rkennke/adaptive-minfree/webrev.00/
Good stuff, I have zero degens on Compiler.compiler now.
I think the capturing is slightly wrong though: it records occupancy at final
mark and before update-refs, overwriting the value. Which means if update-refs
managed to clean up enough (as they do), we may be blind about the case when
there is not enough space right after the mark. That would not be visible on
workloads where there is enough immediate garbage reclaimed after mark.
I think we need to store MAX of observed occupancies, and reset it to zero when
we claim it in heuristics.
Thanks,
-Aleksey
More information about the shenandoah-dev
mailing list