JDK-8190937 : Always lazily allocate threads in G1
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9,10
  • Priority: P3
  • Status: Closed
  • Resolution: Won't Fix
  • Submitted: 2017-11-08
  • Updated: 2018-03-07
  • Resolved: 2018-03-07
Related Reports
Relates :  
Relates :  
Relates :  
Description
Currently only when enabling -XX:+UseDynamicNumberOfGCThreads all sets of worker threads (gc workers, marking, refinement) are allocated and started lazily, i.e. when they are needed.

Doing so improves time to start up the VM significantly, in the range of up to 10% depending on GC.

Lazy allocation does not change the number of threads actually in use, just when they are allocated, so this mechanism is quite disjoint with actually changing the number of threads for the different GC phases. By always allocating the threads lazily we would get these startup benefits always.
Comments
As JDK-8198510 is setting UseDynamicNumberOfGCThreads = true, this change would not necessary as the same goal is achieved differently. So closing as WON'T FIX.
07-03-2018