Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8317755

G1: Periodic GC interval should test for the last whole heap GC

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • P4
    • tbd
    • 17, 21, 22
    • hotspot
    • gc

    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.

      Attachments

        Issue Links

          Activity

            People

              shade Aleksey Shipilev
              shade Aleksey Shipilev
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: