RFR: 8317755: G1: Periodic GC interval should test for the last whole heap GC
Thomas Schatzl
tschatzl at openjdk.org
Thu Oct 12 10:01:13 UTC 2023
On Mon, 9 Oct 2023 20:46:44 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> See the description in the bug. Fortunately, we already track the last whole-heap GC. The new regression test verifies the behavior.
>
> Additional testing:
> - [x] Linux x86_64 fastdebug `tier1 tier2 tier3`
We discussed this issue at Oracle internally a bit, with the following thoughts:
We are still not sure about the use case you want to cover with that change, and probably the option `G1PeriodicGCInterval` is not named very well - the functionality you are modifying has always been intended to compact the heap for when the VM is almost completely idle.
Given our current understanding of the issue, this does not seem to be the case here.
Instead the intention of this change is probably something more like general cleanup (potentially including heap compaction) that is currently only performed after a whole heap analysis. Similar issues were reported in the past (like https://mail.openjdk.org/pipermail/hotspot-gc-dev/2020-March/028857.html), but nobody acted on it yet.
So the problems we see here are:
* the `G1PeriodicGCInterval` option naming is a bit misleading. It should be more specific, containing "Idle" or something in it.
* there is no real periodic whole heap and cleanup marking functionality.
What we think would be most appropriate for solving your problem (if the suggestion in an earlier post does not apply) currently would be
* rename `G1PeriodicGCInterval` to something else and start the deprecation/removal process (temporarily aliasing the old flag to the new one)
* add the new functionality (periodic concurrent whole heap analysis) using a new flag
Also note that just for heap compaction there is this CR https://bugs.openjdk.org/browse/JDK-8238687 that I've been working for a long time on and off which imo only needs testing and cleanup (hah!). If you want to look into this feel free to contact me.
Hth,
Thomas
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16107#issuecomment-1759303317
More information about the hotspot-gc-dev
mailing list