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

G1 reuse survivor region as eden region at the end of gc



    • Enhancement
    • Resolution: Unresolved
    • P4
    • tbd
    • 13
    • hotspot
    • gc


      Currently G1 has a strict separation of survivor and eden regions in that at the end of gc it fills up that region with dummy object(s).

      This means that a lot of space (1/2 region on average) may be wasted every GC.

      Depending on the young gen and region size this can add up to a significant of space over many collections, causing unnecessary additional GCs, i.e. significant performance degradation. It may also decrease PLAB size due to that additional waste, i.e. perf degradation during GC due to increased PLAB refills (to be verified).

      Particularly in case of an extension of NUMA support where you may use a survivor allocation region per NUMA node, this would result in waste of 1/2 region per NUMA node on average which may cause single-digit throughput regressions due to more GCs and smaller PLABs compared to a single survivor allocation region with more NUMA nodes.

      Since G1 turns survivor into an eden region at the start of young gc anyway, and is otherwise mostly equal to an (otherwise unused) eden region, one option could be to instead of filling up the survivor alloc region with dummy objects to turn it into eden region(s) at the end of gc and use the remaining space immediately for next mutator allocation.


        Issue Links



              sangheki Sangheon Kim
              tschatzl Thomas Schatzl
              0 Vote for this issue
              4 Start watching this issue