RFR(XS): 8198510: Limit GC threads for small Java heap
thomas.schatzl at oracle.com
Wed Feb 21 15:38:17 UTC 2018
On Wed, 2018-02-21 at 14:12 +0000, Doerr, Martin wrote:
> Hi Thomas,
> thanks for the quick response.
> I think enabling -XX:+UseDynamicNumberOfGCThreads would be also fine
> if this is acceptable. I don't know why it's currently off by
We talked about this a bit internally, and nobody knows why (apart from
potential "it's a change in behavior" fears), but nobody objected. :)
> JDK-8172792 will only address G1, right?
Where it would require too much extra work, yes. G1 already has all the
infrastructure to track various metrics, and actually already tracks
many of the relevant ones found so far. It is "only" a matter of
determining the relevant metrics for the various GC phases in more
detail, wiring them to produce a number of threads, and of course
>From what I can see from the CRs linked to JDK-8172792 (which is not a
complete list), the reference processing ones do not specifically
mention g1 only. :)
We will not remove the current thread sizing policy (limit threads by
max heap size, i.e. use 1 thread for every 64MB of max heap) enabled by
-XX:+UseDynamicNumberOfGCThreads in the other collectors.
So at worst by making UseDynamicNumberOfGCThreads default, the VM would
behave as with your suggested change.
More information about the hotspot-gc-dev