RFR: 8224185: ZGC: Introduce "High Usage" rule
Thomas Schatzl
thomas.schatzl at oracle.com
Mon May 20 09:54:38 UTC 2019
Hi Per,
On Mon, 2019-05-20 at 11:44 +0200, Per Liden wrote:
> Hi Thomas,
>
> On 5/20/19 11:34 AM, Thomas Schatzl wrote:
> > 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
> > >
> > [...]
> >
> > 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.
>
> The situation is slightly different for ZGC. This rule typically
> kicks in when the allocation rate is very low. If the allocation rate
> is very high, we typically collect a lot earlier than 95% full heap
> anyway.
This is the same situation G1 uses G1ReservePercent for determining
start of concurrent cycle (it won't poll it in the background though,
so it's a little different) in such applications. G1ReservePercent's
current description does not spell out the impact as nicely as this
threshold does, but it automatically follows from that.
> Regarding a flag. We've discussed this within the team, and decided
> to not have one for now. It can be added later if it turns out to be
> a need for it.
That's fine, I was merely pointing out this potential caveat for
introducing such a threshold.
Thanks,
Thomas
More information about the hotspot-gc-dev
mailing list