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

GenShen: Reset the count of degenerated cycles in a row following Full GC



    • gc


      The goal is that following a Full GC, we allow multiple productive degenerated GC cycles to complete before triggering another Full GC. This is because degenerated GCs are generally more efficient than Full GCs, except under rare conditions that can be handled "only" by Full GC. The rare conditions that justify Full GC are:

      1. Humongus regions cannot be allocated because free regions are not contiguous, and

      2. Memory and CPU time is in such short supply that we have not been able to complete concurrent old marking and/or we have not been able to promote young objects that are eligible for promotion.

      A single Full GC will generally address both of these issues and the issue will not immediately manifest again. These conditions accumulate over time.

      The reason that Degenerated GCs are "usually" more efficient than Full GCs is because Degen continues the work that has already been carried out (but not completed) by a concurrent young-gen collection. If concurrent young has already completed marking, the degenerated cycle begins with the evacuation phase, for example.

      There is code in the existing implementation that endeavors to implement the desired intention. However, the existing code does not work, because the count of consecutive degenerated cycles is maintained in multiple places, and we read from the count associated with young-generation heuristics, but reset the count associated with global generation upon completion of a Full GC.


        Issue Links



              kdnilsen Kelvin Nilsen
              kdnilsen Kelvin Nilsen
              0 Vote for this issue
              3 Start watching this issue