RFR: 8317755: G1: Periodic GC interval should test for the last whole heap GC [v2]

Aleksey Shipilev shade at openjdk.org
Thu Oct 19 17:43:47 UTC 2023


On Thu, 19 Oct 2023 08:06:02 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> This is corroborated by experience from me working with end users actually doing that (i.e. force a whole heap analysis externally). 

Yes, and that is the beauty of periodic GCs that are driven by GC itself, when it knows it should not start the periodic GCs if there was recent activity. That part if captured in JEP, I think. What this PR does, is extends the usefulness of periodic GCs to the cases where you need a whole heap analysis to make the best call about what to do next. In G1 case, maybe discovering that we need to start running mixed collections to unclutter the heap.

We can indeed make an external agent that calls `System.gc()` with `+ExplicitGCInvokesConcurrent`, but that IMO ignores the purpose, usefulness and reliability of periodic GCs... if we make sure they cover the use cases we care about. Otherwise, off to explicit GCs we go! That would feel like a major step backwards.

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

PR Comment: https://git.openjdk.org/jdk/pull/16107#issuecomment-1771415840


More information about the hotspot-gc-dev mailing list