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

Implement JEP 490: ZGC: Remove the Non-Generational Mode

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 24
    • hotspot
    • None
    • gc
    • behavioral
    • low
    • Hide
      Users that specify `UseZGC` alongside `-ZGenerational` and migrate from an earlier release will start using Generational ZGC and observer that serviceability systems like memory pools and memory counters will report new names and metrics.
      User running with the flag `ZGenerational` set will see an obsoletion message.
      Show
      Users that specify `UseZGC` alongside `-ZGenerational` and migrate from an earlier release will start using Generational ZGC and observer that serviceability systems like memory pools and memory counters will report new names and metrics. User running with the flag `ZGenerational` set will see an obsoletion message.
    • add/remove/modify command line option
    • JDK

      Summary

      The proposed change removes the use of non-generational ZGC by obsoleting the ZGenerational option.

      Problem

      Maintaining two different modes of ZGC comes at a cost. As a step in reducing the future maintenance burden and technical debt the non-generational mode of ZGC will be phased out through the deprecation process.

      For more details see JEP 474: ZGC: Generational Mode by Default (JDK-8326667) and JEP 490: ZGC: Remove the Non-Generational Mode (JDK-8335850).

      Solution

      JEP 439: https://openjdk.org/jeps/439 introduced Generational ZGC as a second mode of ZGC to allow for a smoother transition for users from the non-generational ZGC. JEP 474: https://openjdk.org/jeps/474 made the generational mode the default mode of ZGC and the flag ZGenerational deprecated. As the final step in phasing out non-generational ZGC the flag ZGenerational will be made obsolete.

      This will entail obsoleting ZGenerational via the standard HotSpot Command-line Flag lifecycle process.

      For more details see JEP 490: ZGC: Remove the Non-Generational Mode (JDK-8335850).

      Specification

      Draft PR: https://github.com/openjdk/jdk/pull/21401

      After the change specifying -XX:+UseZGC will always run in the generational mode. Specifying ZGenerational will result in a obsolete VM option warning.

      • All product flags (except ZGenerational and ZVerifyViews) will have similar behavior
        • The flag ZCollectionInterval can be specified with finer granularity via:
          • ZCollectionIntervalMinor - "Force Minor GC at a fixed time interval (in seconds)"
          • ZCollectionIntervalMajor - "Force GC at a fixed time interval (in seconds)"
        • The flag ConcGCThreads can be specified with generational granularity via:
          • ZYoungGCThreads - "Number of GC threads for the young generation"
          • ZOldGCThreads - "Number of GC threads for the old generation"
        • The flag ZFragmentationLimit is used for the old generation, young generations is configured via:
          • ZYoungCompactionLimit - "Maximum allowed garbage in young pages"
        • The diagnostic ZVerifyViews option will be removed.
        • The ZGenerational option will be obsolete.

      Because Generational ZGC has two generations and the non-generational ZGC only has one, there will be a difference in the number entities in various serviceability layers:

      Memory Pools:

      • "ZGC Young Generation", "ZGC Old Generation"

      Memory Managers:

      • "ZGC Minor Cycles", "ZGC Minor Pauses", "ZGC Major Cycles", "ZGC Major Pauses"

      The same is true for the HotSpot performance counters.

            aboldtch Axel Boldt-Christmas
            aboldtch Axel Boldt-Christmas
            Stefan Karlsson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: