RFR: 8317755: G1: Periodic GC interval should test for the last whole heap GC [v2]
Aleksey Shipilev
shade at openjdk.org
Thu Nov 9 12:53:59 UTC 2023
On Wed, 8 Nov 2023 13:48:39 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
> I think there is still a misconception with the current "periodic gcs" here: it is first and foremost thought to be applicable for catching the idle case with all its options (also consider cpu idle, do full or concurrent gc).
Yes, "idle case". This PR adds another option that lets users to further fine-tune what "idle case" is.
> This is the reason for the suggestion to phase out the current option `G1PeriodicGCInterval` to use a different name,
IMO, the cost/benefit for renaming flags is too high to be worthwhile here. It would add to further confusion for users, as we change more and more flags across JDK releases. I would argue that proposed scheme fits the existing amendments to the periodic GC configurations:
1. `-XX:G1PeriodicGCInterval=X`: "do periodic GCs with this frequency, unless we had other GCs recently"
2. `-XX:G1PeriodicGCSystemLoadThreshold=X`: "...except when the CPU load is this high"
3. `-XX:+G1PeriodicGCCheckWholeHeap`: "...except when other GCs did not inspect the whole heap"
> and add this functionality (regular whole heap analysis to clean out cruft) as a new option (something like WholeHeapAnalysisInterval, or something more aligned with other collectors)
All right, so Shenandoah has `ShenandoahGuaranteedGCInterval` to control periodic GCs. Generational Shenandoah has `ShenandoahGuaranteedOldGCInterval` and `ShenandoahGuaranteedYoungGCInterval`. Would you like to have `G1GuaranteedOldGCInterval` and `G1GuaranteedYoungGCInterval` (which is nearly what `G1PeriodicGCInterval` currently is)?
It looks to me as creating the parallel hierarchy of periodic GC control options. If we phase out `G1Periodic*` after this, it would be effectively a rename of `G1PeriodicGCInterval` -> `G1GuaranteedYoungGCInterval`, `G1PeriodicGCSystemLoadThreshold` -> `G1GuaranteedGCSystemLoadThreshold` right? Would it be better to just introduce `G1PeriodicOldGCInterval` to fit the existing option set?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16107#issuecomment-1803772775
More information about the hotspot-gc-dev
mailing list