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

ZGC: Change ZCollectionInterval type to double

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 16
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc
    • Resolved In Build:
      b21

      Description

      ZCollectionInterval is used to trigger GCs within certain time intervals. The flag specifies how many seconds to wait, and the type is uint. That means that the user can only specify the interval as discrete seconds. This is probably fine in most cases, but during stress testing it's often beneficial to be able to set a lower value. I propose that we change the type to double, so that one can use, say, -XX:ZCollectionInterval=0.5 to trigger GC every half second.

      Note 1: that there's an effective lower-bound determined by how often the code checks if it's time to start a GC. That timer is today set to 100ms.

      Note 2: The change is backwards-compatible, so specifying the flag as an integer still works: -XX:ZCollectionInterval=5

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stefank Stefan Karlsson
              Reporter:
              stefank Stefan Karlsson
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: