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

Bump default value of G1RefProcDrainInterval

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Approved
    • Fix Version/s: 11
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      gc
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      Default value change may change performance profile. While changes have been tested on a range of benchmarks with no difference, there might be some applications where this change does have a negative impact.
    • Interface Kind:
      add/remove/modify command line option
    • Scope:
      Implementation

      Description

      Summary

      Increase the default value of the flag G1RefProcDrainInterval to 1000 to improve performance of G1 reference processing.

      Problem

      The G1RefProcDrainInterval flag determines the frequency at which new references are actually processed while keeping alive references during reference processing.

      The current value is 10, i.e. every ten attempts to keep alive References G1 drains the mark stack. However, due to expensive setup and teardown of G1 marking, this seriously inhibits reference processing performance performance.

      Tests showed that with a significantly higher value, the suggested value of 1000, reference processing time can more than halve.

      Solution

      This request changes the default value of the G1RefPRocDrainInterval flag to a higher value that after some testing on a reference processing test applications shows significant improvements. The value 1000 has been chosen as a conservative measure to get most of the performance improvements by queuing up work, but not using a too high value. The CR JDK-8201527 contains a graph showing performance with different values.

      One alternatives could be to improve setup and teardown performance of G1 marking, however this is significantly more work; increasing the default value is a short term measure.

      The review thread is at http://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2018-April/021817.html.

      Specification

      This is the diff for this specification change:

        -  product(int, G1RefProcDrainInterval, 10,                                  \
        +  product(uint, G1RefProcDrainInterval, 1000,                               \
                   "The number of discovered reference objects to process before "   \
                   "draining concurrent marking work queues.")                       \
                   range(1, INT_MAX)                                                 \

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tschatzl Thomas Schatzl
              Reporter:
              tschatzl Thomas Schatzl
              Reviewed By:
              Sangheon Kim, Stefan Johansson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: