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

G1: Reconsider G1 GCTimeRatio boosting during heap expansion for small heaps

XMLWordPrintable

    • gc

      Currently G1 boosts heap expansion, artificially reducing the target pause time threshold (i.e. the cpu time the collector is allowed to use), if the heap's current capacity is <= 1/2 of maximum capacity.

      This heuristic is (ultimately) an artifact of the original implementation where expansion at low heap sizes doubled the heap size (sans some minor other conditions) to keep throughput (benchmark scores) almost the same after JDK-8060697.

      (Aggressively scaling the heap up decreases the number of GCs to meet the GCTimeRatio, and since it then often overshoots, makes young gen potentially very large, combined with general reluctance on decreasing the heap, reducing GCs as well)

      This has several drawbacks though:
      * inflates the heap usage; G1 is often running at actual cpu usage far below what would be allowed by GCTimeRatio.
      * particularly the case where one wants to keep average memory consumption low but allow headroom for memory usage spikes (to not OOME), is underserved and/or very hard to achieve.
      * is surprising for users of GCTimeRatio that there are cases when it is not observed at all

      In combination with other suggestions like JDK-8247843, JDK-8238687, JDK-8236073 and others it may be possible to get rid of this heuristic.

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

              Created:
              Updated: