RFR: 8224185: ZGC: Introduce "High Usage" rule
Thomas Schatzl
thomas.schatzl at oracle.com
Mon May 20 09:34:12 UTC 2019
Hi Per,
On Mon, 2019-05-20 at 10:11 +0200, Per Liden wrote:
> Start a GC cycle if the amount of free memory is 5% or less. This is
> a preventive measure in the case where the application has a very
> low allocation rate, such that the allocation rate rule doesn't
> trigger, but the amount of free memory is still slowly but surely
> heading towards zero. In this situation, we should start a GC cycle
> to avoid a potential allocation stall later.
>
> Testing: New jtreg test added. Currently running tier 1-6.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8224185
> Webrev: http://cr.openjdk.java.net/~pliden/8224185/webrev.0
>
just pointing out the obvious: this means that ZGC will potentially
never use 5-Epsilon% of the heap.
I do not recommend such a threshold being a fixed, compiled in constant
size: while I understand that you want to have as few options as
possible with ZGC, 5% of 100GB are still 5GB which may be better used
for use in the application in some cases.
I.e. G1 has a similar (10%) threshold, and we've run in a few
situations where this has been too much and unneeded, particularly with
large heaps.
Now I know that ZGC pauses are by far less intrusive than G1's, but
still the concurrent marking has its cost. Making it configurable would
allow people getting the last bit of performance out of it if they
want.
Thanks,
Thomas
More information about the hotspot-gc-dev
mailing list