RFR: 8209894: ZGC: Cap number of GC workers based on heap size

Erik Helin erik.helin at oracle.com
Fri Aug 24 07:35:13 UTC 2018


On 08/23/2018 04:43 PM, Per Liden wrote:
> The ergonomics for selecting number of GC workers does not take 
> HeapSizePerGCThread into account. This is sub-optimal and can even lead 
> to pre-mature OOME when using a tiny heap on a very large machine, since 
> ZGC reserves 2M of the heap per GC worker.
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8209894
> Webrev: http://cr.openjdk.java.net/~pliden/8209894/webrev.0

Looks good to me, nice incremental improvement! Perhaps a future patch 
might want to look into re-evaluating these calculations at a safepoint 
in case number of CPUs/cores changes (like for virtual machines, 
containers, etc)?

Thanks,
Erik

> /Per



More information about the hotspot-gc-dev mailing list