RFR: 8222182: ZGC: Use SoftMaxHeapSize to guide GC heuristics

Thomas Schatzl thomas.schatzl at oracle.com
Thu Apr 11 10:30:05 UTC 2019


Hi,

On Wed, 2019-04-10 at 19:23 +0200, Per Liden wrote:
> The ZDriector currently uses max heap size (-Xmx) as input when
> deciding 
> on when to start a GC cycle. We should start using SoftMaxHeapSize 
> instead. Of course, this change depends on JDK-8222145 "Add 
> -XX:SoftMaxHeapSize flag", which is currently out for review.
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8222182
> Webrev: http://cr.openjdk.java.net/~pliden/8222182/webrev.0

  to be able to review this, what is the expected reaction (and
limitations) of the collector on this, particularly in unusual cases,
like what should happen if an allocation request goes over the soft
limit?

>From what I understand, allocation of ZPages will fail as normal, and
an allocation stall will occur as normal. This does not sound like a
"soft" max heap size.

Which also means that there is opportunity for some allocating Java
threads not having recognized the new value of SoftMaxHeapSize as it is
read without synchronization - so some allocations will go beyond that
soft limit, while others may fail (and seem to cause an allocation
stall).

Neither the flag CSR nor the CR talks about this.

What testing has been done for this? There is no test.

Thanks,
  Thomas




More information about the hotspot-gc-dev mailing list