RFR: TLAB sizing policy should converge faster with Shenandoah

Aleksey Shipilev shade at redhat.com
Thu Jul 19 10:08:12 UTC 2018


Hopefully the comment describes the intent:

diff -r 8bf8ec71f1ed src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp   Thu Jul 19 11:39:01 2018 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp   Thu Jul 19 12:05:29 2018 +0200
@@ -185,10 +185,18 @@
   // It would introduce another heap memory access for reading the forwarding
   // pointer, which would have to be guarded by the signal handler machinery.
   // See:
   // http://mail.openjdk.java.net/pipermail/hotspot-dev/2018-June/032763.html
   FLAG_SET_DEFAULT(UseFastJNIAccessors, false);
+
+  // TLAB sizing policy makes resizing decisions before each GC cycle. Current default
+  // is good for generational collectors that run frequent young GCs. With Shenandoah,
+  // GC cycles are much less frequent, so we need we need sizing policy to converge
+  // faster over smaller number of resizing decisions.
+  if (FLAG_IS_DEFAULT(TLABAllocationWeight)) {
+    FLAG_SET_DEFAULT(TLABAllocationWeight, 90);
+  }
 }

 size_t ShenandoahArguments::conservative_max_heap_alignment() {
   return ShenandoahMaxRegionSize;
 }

Testing: tier3_gc_shenandoah (running), specjbb

Sample converge profile on specjbb:

-XX:TLABAllocationWeight=35 (default):

[5.964s][info][gc     ]    GC(0)  5547367K alloc,  3794716K ( 68.4%) waste, <total>
[43.840s][info][gc     ]   GC(1) 71520255K alloc,  9425871K ( 13.2%) waste, <total>
[59.744s][info][gc     ]   GC(2) 66247156K alloc, 11184613K ( 16.9%) waste, <total>
[77.215s][info][gc     ]   GC(3) 66107372K alloc,  5018141K (  7.6%) waste, <total>
[96.226s][info][gc     ]   GC(4) 71251947K alloc,  4292455K (  6.0%) waste, <total>
[115.468s][info][gc     ]  GC(5) 70219055K alloc,  3037810K (  4.3%) waste, <total>
[134.659s][info][gc     ]  GC(6) 70204415K alloc,  2303291K (  3.3%) waste, <total>
[153.776s][info][gc     ]  GC(7) 69086205K alloc,  1995898K (  2.9%) waste, <total>
[174.098s][info][gc     ]  GC(8) 73296270K alloc,  1584543K (  2.2%) waste, <total>
[194.223s][info][gc     ]  GC(9) 72219343K alloc,  1339633K (  1.9%) waste, <total>
[214.587s][info][gc     ] GC(10) 72239103K alloc,  1256133K (  1.7%) waste, <total>
[235.459s][info][gc     ] GC(11) 72261591K alloc,  1099827K (  1.5%) waste, <total>
[256.633s][info][gc     ] GC(12) 67980176K alloc,  1111746K (  1.6%) waste, <total>
[274.746s][info][gc     ] GC(13) 71141443K alloc,  1116117K (  1.6%) waste, <total>
[293.081s][info][gc     ] GC(14) 69097097K alloc,  1002767K (  1.5%) waste, <total>

-XX:TLABAllocationWeight=90 (proposed):

[6.028s][info][gc     ]    GC(0)  5647719K alloc,  3893740K ( 68.9%) waste, <total>
[45.053s][info][gc     ]   GC(1) 71727512K alloc,  4904507K (  6.8%) waste, <total>
[64.089s][info][gc     ]   GC(2) 68201471K alloc,  2053577K (  3.0%) waste, <total>
[83.213s][info][gc     ]   GC(3) 68174221K alloc,  1103770K (  1.6%) waste, <total>
[103.845s][info][gc     ]  GC(4) 73359431K alloc,   969213K (  1.3%) waste, <total>
[124.365s][info][gc     ]  GC(5) 72290310K alloc,  1079922K (  1.5%) waste, <total>
[144.259s][info][gc     ]  GC(6) 71254820K alloc,  1067018K (  1.5%) waste, <total>
[164.045s][info][gc     ]  GC(7) 71189612K alloc,  1007500K (  1.4%) waste, <total>
[184.026s][info][gc     ]  GC(8) 72229606K alloc,  1018692K (  1.4%) waste, <total>
[203.845s][info][gc     ]  GC(9) 71152205K alloc,  1157353K (  1.6%) waste, <total>
[223.912s][info][gc     ] GC(10) 71114968K alloc,  1129352K (  1.6%) waste, <total>
[243.614s][info][gc     ] GC(11) 71137488K alloc,  1114681K (  1.6%) waste, <total>
[264.095s][info][gc     ] GC(12) 72183037K alloc,  1188819K (  1.6%) waste, <total>
[283.977s][info][gc     ] GC(13) 71136158K alloc,  1031335K (  1.4%) waste, <total>
[303.566s][info][gc     ] GC(14) 70070050K alloc,  1090805K (  1.6%) waste, <total>

-XX:TLABAllocationWeight=100 (max possible):

[6.226s][info][gc     ]    GC(0)  5619711K alloc,  3861185K ( 68.7%) waste, <total>
[45.366s][info][gc     ]   GC(1) 71790109K alloc,  4805484K (  6.7%) waste, <total>
[65.876s][info][gc     ]   GC(2) 71359252K alloc,   932641K (  1.3%) waste, <total>
[86.086s][info][gc     ]   GC(3) 71310199K alloc,  1021007K (  1.4%) waste, <total>
[106.210s][info][gc     ]  GC(4) 71284383K alloc,  1018055K (  1.4%) waste, <total>
[126.121s][info][gc     ]  GC(5) 71218487K alloc,  1055455K (  1.5%) waste, <total>
[145.516s][info][gc     ]  GC(6) 70164595K alloc,  1160611K (  1.7%) waste, <total>
[165.603s][info][gc     ]  GC(7) 71189456K alloc,  1018712K (  1.4%) waste, <total>
[185.861s][info][gc     ]  GC(8) 71227537K alloc,  1058248K (  1.5%) waste, <total>
[205.929s][info][gc     ]  GC(9) 71183499K alloc,  1223558K (  1.7%) waste, <total>
[225.986s][info][gc     ] GC(10) 71213609K alloc,  1098095K (  1.5%) waste, <total>
[246.960s][info][gc     ] GC(11) 73285848K alloc,  1081612K (  1.5%) waste, <total>
[266.483s][info][gc     ] GC(12) 70128460K alloc,  1137446K (  1.6%) waste, <total>
[286.073s][info][gc     ] GC(13) 70141784K alloc,  1130847K (  1.6%) waste, <total>
[305.810s][info][gc     ] GC(14) 70099826K alloc,  1015626K (  1.4%) waste, <total>

Thanks,
-Aleksey



More information about the shenandoah-dev mailing list