RFR: Enable biased locking for Shenandoah by default
Aleksey Shipilev
shade at redhat.com
Mon Nov 20 11:36:56 UTC 2017
Was following up on some passive vs Parallel experiments trying to understand the where the
difference is coming from. Turns out, biased locking matters a lot in those tests. For example,
XmlTransform:
Parallel GC, -XX:-UseBiasedLocking: 117 +- 3 ops/min
Parallel GC, -XX:+UseBiasedLocking: 137 +- 2 ops/min
Shenandoah passive, -XX:-UseBiasedLocking: 117 +- 3 ops/min
Shenandoah passive, -XX:+UseBiasedLocking: 134 +- 3 ops/min
Shenandoah adaptive, -XX:-UseBiasedLocking: 98 +- 2 ops/min
Shenandoah adaptive, -XX:+UseBiasedLocking: 112 +- 2 ops/min
Half a year ago, we amended Shenandoah code to disable biased locking, because it has potential to
disrupt latency improvements. Since then, a few things happened: we have improved performance enough
for biased locking improvements to be visible, thread-local handshakes that can make biased locking
revocation less harmful arrived upstream, and wider testing that runs into artificial slowdowns
because of this was observed. So, I propose we enable biased locking back with Shenandoah.
diff -r 18bada116c5f src/hotspot/share/runtime/arguments.cpp
--- a/src/hotspot/share/runtime/arguments.cpp Fri Nov 17 18:28:16 2017 +0100
+++ b/src/hotspot/share/runtime/arguments.cpp Mon Nov 20 12:31:22 2017 +0100
@@ -2076,14 +2076,6 @@
FLAG_SET_DEFAULT(ShenandoahUncommitDelay, max_uintx);
}
- // Current Hotspot machinery for biased locking may introduce lots of latency hiccups
- // that negate the benefits of low-latency GC. The throughput improvements granted by
- // biased locking on modern hardware are not covering the latency problems induced by
- // it. Therefore, unless user really wants it, disable biased locking.
- if (FLAG_IS_DEFAULT(UseBiasedLocking)) {
- FLAG_SET_DEFAULT(UseBiasedLocking, false);
- }
-
if (UseStringDeduplication) {
warning("String Deduplication is unstable with Shenandoah, forcefully disabled.");
FLAG_SET_DEFAULT(UseStringDeduplication, false);
Testing: hotspot_gc_shenandoah
Thanks,
-Aleksey
More information about the shenandoah-dev
mailing list