Better default for ParallelGCThreads and ConcGCThreads by using number of physical cores and CPU mask.

Jungwoo Ha jwha at google.com
Tue Nov 19 23:35:22 UTC 2013


Hi,

I am sending this webrev for the review.
(On behalf of Jon Masamitsu, it is upload here)
http://cr.openjdk.java.net/~jmasa/8028554/webrev.00/

The feature is a new heuristics to calculate the default ParallelGCThreads
and ConGCThreads.
In x86, hyperthreading is generally bad for GC because of the cache
contention.
Hence, using all the hyper-threaded cores will slow down the overall GC
performance.
Current hotspot reads the number of processors that the Linux reports,
which treats all hyper-threaded cores equally.
Second problem is that when cpu mask is set, not all the cores are
available for the GC.

The patch improves the heuristics by evaluating the actual available
physical cores
from the proc filesystem and the CPU mask, and use that as the basis for
calculating the ParallelGCThreads and ConcGCThreads.

The improvements of GC pause time is significant. We evaluated on Nehalem,
Westmere, Sandybridge as well as several AMD processors. We also evaluated
on various CPU mask configuration and single/dual socket configurations.
In almost all cases, there were speed up in GC pause time by 10~50%.

We primarily use CMS collector for the evaluation, but we also tested on
other GCs as well.
Please take a look and let me know if this patch can be accepted.

Thanks,
Jungwoo Ha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20131119/32a8be01/attachment.htm>


More information about the hotspot-gc-dev mailing list