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

G1: Disable preventive GCs by default

XMLWordPrintable

    • gc
    • b16

      JDK-8257774 added "preventive" garbage collections in G1: speculative garbage collections added to avoid costly evacuation failures due to allocation bursts filling up the heap quickly.

      These preventive garbage collections have some issues: the main issue is that it's an additional gc:

      * object aging is based on number of gcs, so additional gcs cause premature promotion
      * more promotion means more mixed gc phases
      * additional, potentially unnecessary gc pause

      This is somewhat compounded by that the current prediction to trigger preventive garbage collections is very conservative, triggering preventive garbage collections too often and too early.

      As we have gathered experience with this feature, we found that in many cases it is a net loss - particularly since its introduction the reason for existing, evacuation failures, got extremely fast (e.g. JDK-8256265).

      At this point the suggestion is to disable this feature by default. In the future it might be completely removed.

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

              Created:
              Updated:
              Resolved: