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

G1: Prune collection set candidates early

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 17
    • 17
    • hotspot
    • gc
    • b12

    Description

      Currently G1 maintains collection set candidates from the marking phase (where it determines those) until the end of the mixed gc phase.

      Mixed gc phase ends when the amount of space that can be reclaimed in the java heap with the remaining collection set candidates is smaller than G1HeapWastePercent of the (current) heap capacity.

      This means that in some cases a significant amount of memory is used for regions that will never be evacuated. In addition to that, maintaining the remembered sets for these never evacuated regions uses execution time and more memory for the remembered set.

      In fact, in some cases, it can happen that in the first few mixed gcs of a mixed gc phase, remembered set memory consumption *increases* even though the remembered sets of recently evacuated old gen regions are freed.

      The proposed alternative is to prune the collection set candidates as early as possible, filtering out regions that are never going to be evacuated (or have a very low probability).

      In some cases doing this can save half of peak remembered set memory usage.

      Attachments

        Issue Links

          Activity

            People

              tschatzl Thomas Schatzl
              tschatzl Thomas Schatzl
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: