-
Enhancement
-
Resolution: Unresolved
-
P4
-
17, 21, 22
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.
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.
- relates to
-
JDK-8213198 Not triggering concurrent cycle in G1 leaves string table cleanup deferred
- Open
-
JDK-8204089 JEP 346: Promptly Return Unused Committed Memory from G1
- Closed
- links to
-
Review openjdk/jdk/16107