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

When increasing the young gen to a size larger than seen before, the prediction often is too optimistic

XMLWordPrintable

    • gc

      G1 determines the number of young gen regions using a prediction based on survivor ratio of the n'th allocated region.

      I.e. when determining whether the next collection can meet the pause time to collect the n'th allocated region, it uses a prediction of the survival rate of previous n'th allocated regions.

      If G1 never before encountered a young gen size (e.g. for a young gen size n+1, where n is the maximum young gen size encountered so far), it linearly interpolates from the prediction of the last known young gen region n to n+1.

      This causes issues sometimes overestimates the amount of young gen regions it can expand to, as that last data point might not represent the n+1'th region, or it might be based on very little samples.

      Improve the prediction in this case, trying to avoid being too greedy with the number of young gen regions.

      Some potential solutions
      - cap the amount of young gen expansion by x% of the previous young gen so that extreme cases can not occur
      - use more samples (like from last five regions n-4...n) to determine the n+x'th survivor rate.
      - other solutions

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

              Created:
              Updated: