ZGC and disabled biased locking
Per Liden
per.liden at oracle.com
Mon Dec 18 14:19:18 UTC 2017
On 2017-12-15 22:32, Aleksey Shipilev wrote:
> Hi,
>
> Have you found a compelling reason to disable Biased Locking by default with ZGC?
>
> 52 if (FLAG_IS_DEFAULT(UseBiasedLocking)) {
> 53 FLAG_SET_DEFAULT(UseBiasedLocking, false);
> 54 }
>
> In Shenandoah, we went back and forth on this, first we disabled it [1] on the hunch that biased
> locking safepoints make up for significant pause time, and then reverted back [2] because some of
> our adopters have complained that Shenandoah is much slower than expected -- and having the
> workloads that benefit greatly from biased locking throughput-wise. In some cases it was
> demonstrated that disabled biased locking completely blew over any additional GC barrier overhead.
>
> So I wonder if ZGC disables it on the same hunch, or is it a design/implementation quirk at this point?
It's basically the same reason. On modern hardware biased locking
doesn't seem to be as useful as it once was. There's even been talks
about removing it completely from hotspot. By disabling it we also avoid
a few safepoint. If we're proven wrong here we'll change that default.
cheers,
Per
>
> Thanks,
> -Aleksey
>
> [1] http://mail.openjdk.java.net/pipermail/shenandoah-dev/2017-September/003491.html
> [2] http://mail.openjdk.java.net/pipermail/shenandoah-dev/2017-November/004333.html
>
More information about the zgc-dev
mailing list