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

G1 decision about taking regions into the collection set is too aggressive

    XMLWordPrintable

    Details

    • Subcomponent:
      gc
    • Resolved In Build:
      b96

      Description

      In G1CollectorPolicy.cpp there is this code to determine whether to continue to put regions into the collection set:

      466 if ((2.0 * _sigma) * (double) bytes_to_copy > (double) free_bytes) {
      467 // end condition 3: out-of-space (conservatively!)
      468 }

      It happens that _sigma is 0.5 by default. So this code will take in more regions until there is really no space left, assuming that the GC can copy without any fragmentation.

      That is far from conservative and a recipe for evacuation failure. Reconsider this formula, at least taking the expected waste in buffers into account (ParallelGCBufferWastePct).

      Do not forget to add necessary documentation for the changes.

        Attachments

          Activity

            People

            Assignee:
            tschatzl Thomas Schatzl
            Reporter:
            tschatzl Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: