RFR: Traversal should resize TLABs

Aleksey Shipilev shade at redhat.com
Wed Jul 18 17:54:44 UTC 2018


http://cr.openjdk.java.net/~shade/shenandoah/traversal-tlabs/webrev.01/

Traversal massively wastes allocated memory in TLABs, because it does not hook up to resizing
machinery. Up to 20% of allocations go wasteful, see the data below. Fix is simple, except that we
need to reach CollectedHeap protected methods from ShTraversalGC, which requires us to have adapters
in ShHeap. Actually, the whole thing should be done in some kind of "GC prolog", let's keep it for
future cleanups.

Testing: tier3_gc_shenandoah (in progress), specjbb with TLAB tracing

Thanks,
-Aleksey

------ 8< ---------------------------------------------------------------------------

# adaptive
[5.946s][info][gc     ]   GC(0)   5652479K alloc,  3893787K ( 68.9%) waste, <total>
[43.601s][info][gc     ]  GC(1)  71553526K alloc,  9370547K ( 13.1%) waste, <total>
[59.725s][info][gc     ]  GC(2)  66180095K alloc, 10988559K ( 16.6%) waste, <total>
[77.877s][info][gc     ]  GC(3)  66068479K alloc,  5222993K (  7.9%) waste, <total>
[97.925s][info][gc     ]  GC(4)  71254015K alloc,  4062446K (  5.7%) waste, <total>
[117.137s][info][gc     ] GC(5)  71286783K alloc,  2857408K (  4.0%) waste, <total>
[137.900s][info][gc     ] GC(6)  71288831K alloc,  2253194K (  3.2%) waste, <total>
[154.789s][info][gc     ] GC(7)  68042044K alloc,  1875467K (  2.8%) waste, <total>
[173.882s][info][gc     ] GC(8)  70169599K alloc,  1659220K (  2.4%) waste, <total>
[193.410s][info][gc     ] GC(9)  70141951K alloc,  1383108K (  2.0%) waste, <total>
[212.966s][info][gc     ] GC(10) 70141931K alloc,  1378965K (  2.0%) waste, <total>
[232.226s][info][gc     ] GC(11) 70154857K alloc,  1282440K (  1.8%) waste, <total>
[252.349s][info][gc     ] GC(12) 72239005K alloc,  1105413K (  1.5%) waste, <total>
[272.450s][info][gc     ] GC(13) 72202913K alloc,  1057945K (  1.5%) waste, <total>
[292.663s][info][gc     ] GC(14) 72290175K alloc,  1151170K (  1.6%) waste, <total>

# traversal (baseline)
[6.053s][info][gc     ]   GC(0)   5554175K alloc,  3797414K ( 68.4%) waste, <total>
[43.459s][info][gc     ]  GC(1)  71348223K alloc,  9385812K ( 13.2%) waste, <total>
[59.773s][info][gc     ]  GC(2)  71843839K alloc, 16682101K ( 23.2%) waste, <total>
[77.294s][info][gc     ]  GC(3)  70929407K alloc, 16762337K ( 23.6%) waste, <total>
[95.809s][info][gc     ]  GC(4)  75781100K alloc, 16558988K ( 21.9%) waste, <total>
[112.460s][info][gc     ] GC(5)  75388405K alloc, 16367333K ( 21.7%) waste, <total>
[126.806s][info][gc     ] GC(6)  75452415K alloc, 15717772K ( 20.8%) waste, <total>
[142.914s][info][gc     ] GC(7)  75321343K alloc, 16012333K ( 21.3%) waste, <total>
[160.921s][info][gc     ] GC(8)  80233471K alloc, 16553359K ( 20.6%) waste, <total>
[179.152s][info][gc     ] GC(9)  80009194K alloc, 16397760K ( 20.5%) waste, <total>
[196.942s][info][gc     ] GC(10) 79896575K alloc, 16592765K ( 20.8%) waste, <total>
[214.997s][info][gc     ] GC(11) 79801343K alloc, 15969714K ( 20.0%) waste, <total>
[234.534s][info][gc     ] GC(12) 84979692K alloc, 16523232K ( 19.4%) waste, <total>
[251.063s][info][gc     ] GC(14) 74365951K alloc, 15874486K ( 21.3%) waste, <total>
[267.591s][info][gc     ] GC(15) 74340332K alloc, 16450176K ( 22.1%) waste, <total>
[284.073s][info][gc     ] GC(16) 74270197K alloc, 16100433K ( 21.7%) waste, <total>
[300.440s][info][gc     ] GC(17) 73779199K alloc, 16653813K ( 22.6%) waste, <total>

# traversal (fixed)
[6.001s][info][gc     ]   GC(0)   5614951K alloc,  3862725K ( 68.8%) waste, <total>
[44.277s][info][gc     ]  GC(1)  71520255K alloc,  9494430K ( 13.3%) waste, <total>
[62.675s][info][gc     ]  GC(2)  71809023K alloc,  8801335K ( 12.3%) waste, <total>
[81.899s][info][gc     ]  GC(3)  70963199K alloc,  4409301K (  6.2%) waste, <total>
[102.628s][info][gc     ] GC(4)  75913783K alloc,  3310107K (  4.4%) waste, <total>
[123.468s][info][gc     ] GC(5)  75509807K alloc,  2469812K (  3.3%) waste, <total>
[144.511s][info][gc     ] GC(6)  75313089K alloc,  1738572K (  2.3%) waste, <total>
[165.515s][info][gc     ] GC(7)  75143596K alloc,  1404853K (  1.9%) waste, <total>
[187.935s][info][gc     ] GC(8)  80227327K alloc,  1227961K (  1.5%) waste, <total>
[210.558s][info][gc     ] GC(9)  80091135K alloc,  1006566K (  1.3%) waste, <total>
[234.604s][info][gc     ] GC(10) 80057234K alloc,   950299K (  1.2%) waste, <total>
[256.416s][info][gc     ] GC(11) 80006606K alloc,   871344K (  1.1%) waste, <total>
[279.285s][info][gc     ] GC(12) 85073731K alloc,   792366K (  0.9%) waste, <total>
[303.241s][info][gc     ] GC(13) 84984293K alloc,   790728K (  0.9%) waste, <total>




More information about the shenandoah-dev mailing list