RFR (S): 8150629: Initializing all ParScanThreadStates causes significant unaccounted "Other" times

Thomas Schatzl thomas.schatzl at oracle.com
Thu Feb 25 13:35:28 UTC 2016

Hi all,

  some recent measurements on large # threads and large heap machines
(like hundreds of threads, and high double-digit GB area) showed that
initializing the ParScanThreadStates takes a few milliseconds of time
in the VM thread (which only shows as unaccounted "Other" time).

This is because the work that needs to be done is O(#threads *
#size(young gen)), which is just getting worse the larger machines we
run G1 with.

The fix pursued in this change is to let the worker threads lazily
allocate and initialize the PSS instances. The way it is implemented,
it also allows more dynamic use of PSS instances, i.e. ones that are
not used for some reason are never allocated, initialized, and later
merged with the global statistics.

jprt, local benchmark runs


More information about the hotspot-gc-dev mailing list