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

Change default value of HeapSizePerGCThread

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P3
    • Resolution: Approved
    • Fix Version/s: 11
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      gc
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      Slightly different resource usage.
    • Interface Kind:
      Other
    • Scope:
      Implementation

      Description

      Summary

      Improve pause times for small heaps by changing the default value for HeapSizePerGCThread.

      Problem

      There is ongoing work to improve the resource usage in Hotspot, especially during startup. One of the recent changes in this area was to make UseDynamicNumberOfGCThreads true by default in JDK-8198547. Since this change the flag HeapSizePerGCThread is now considered when calculating the number of GC threads to use during GC. Recent measurements show that for small heaps the current default value of 64M seems a bit too big. We get can get both shorter young and full collections pause times when decreasing the default value a bit. We think that 32M is the best tradeoff between resource usage and garbage collection times on a selection of benchmarks for small heaps.

      Solution

      Change the default value of HeapSizePerGCThread to 32M instead of 64M.

      Specification

      --- old/src/hotspot/share/runtime/globals.hpp   2018-03-28 15:47:42.588758908 +0200
      +++ new/src/hotspot/share/runtime/globals.hpp   2018-03-28 15:47:42.264746120 +0200
      @@ -1446,7 +1446,7 @@
                 "Force dynamic selection of the number of "                       \
                 "parallel threads parallel gc will use to aid debugging")         \
                                                                                   \
      -  product(size_t, HeapSizePerGCThread, ScaleForWordSize(64*M),              \
      +  product(size_t, HeapSizePerGCThread, ScaleForWordSize(32*M),              \
                 "Size of heap (bytes) per GC thread used in calculating the "     \
                 "number of GC threads")                                           \
                 range((size_t)os::vm_page_size(), (size_t)max_uintx)              \

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sjohanss Stefan Johansson
              Reporter:
              sjohanss Stefan Johansson
              Reviewed By:
              Thomas Schatzl
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: