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

G1 sizing policy increases heap according to gc time ratio too aggressively

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • 9
    • 8u40, 9
    • hotspot
    • gc

      G1 increases the heap when the actual gc time ratio (as calculated as ratio between gc pauses and mutator operation in the last 10 gc intervals) exceeds a threshold (either GCTimeRatio or some other ratio specified e.g. by GCPauseIntervalMillis and MaxGCPauseMillis).

      If so, G1 increases the heap.

      There is a potential problem with the current mechanism: so in collection X G1 noticed that the GC took too much time, e.g. 10.7% which iswasover an example threshold of 10%. Now G1 increases the heap by some percentage.
      At collection X+1 the gc time ratio may still be over the threshold at X+1 (say, 10.4%); since the actual pause time ratio is mostly dominated by earlier intervals that did not take the heap increase into account, G1 will still think that the actual gc time is too high, expanding the heap further and further.

      However, a single heap expansion might have been sufficient to decrease the actual gc time ratio sufficiently, hence using too much space for no particular reason.

            tbenson Thomas Benson (Inactive)
            tschatzl Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: