JDK-8317755 : G1: Periodic GC interval should test for the last whole heap GC
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 17,21,22
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2023-10-09
  • Updated: 2024-09-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Description
We have seen the issue in production where GC crept up to concurrent cycle initiations for days, all this time leaving the collectable garbage behind, wasting memory. There are periodic GCs that can kick out long-lived cruft from the heap. 

Users would like to set the periodic GCs, say, every hour, but it currently does not always work: G1 Periodic collections are triggered if the time since last GC is larger than the G1PeriodicGCInterval, but the "time since last GC" includes the young GCs as well. Which means, we can get into unlucky situations where G1 runs only young collections for a long time, without touching the rest of the heap. These young GCs would block periodic GC from triggering.

As the solution, periodic GCs should ignore young GC events and only look at GC events that touched the whole heap.
Comments
A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/16107 Date: 2023-10-09 20:46:44 +0000
09-10-2023