Runtime.getRuntime().freeMemory() with ZGC

Mike Rettig mike.rettig at gmail.com
Fri Jun 4 15:25:52 UTC 2021


On Thu, Jun 3, 2021 at 11:25 AM Per Liden <per.liden at oracle.com> wrote:

> If "Proactive" GCs kick more frequently than the ZCollectionInterval you
> want to use, then disabling it (-XX:-ZProactive) is a good idea.
>
>
As you said before, ZProactive collections run when impact should be
minimal. Is there any other criteria for it to run? I disabled it because
it was too aggressive. It was running frequently even if the heap usage was
really low. Is there a heap usage (current heap not -Xmx) threshold?  I
think that could be even better than a max pause threshold.  If I could
configure proactive collections to run only if the current heap usage > 75%
then GC performance would be ideal. ZGC would be able to grow/shrink the
heap as needed while also minimizing the impact on the app.

Mike


More information about the zgc-dev mailing list