RFR(X): Reduce region retirement during tlab allocation
Zhengyu Gu
zgu at redhat.com
Fri May 5 20:11:50 UTC 2017
Current implementation of unsafe_max_tlab_alloc() peeks current region
size in free set and tries to use its remaining space. However, the
current region is very likely just been consumed with very little or no
memory left, then it returns region size as fallback. This can result
the calculated tlab size too big, and causes too many regions to retire
while they still have fair amount of free space.
When current region is too small for tlab, we can look ahead of next
available region and use its size as hint. The approach seems to cut
down retired region with usable space. As the result, we see less GC cycles.
Ran Derby test with 1g heap.
Before:
http://cr.openjdk.java.net/~zgu/shenandoah/region_retirement/unpatched.stats.txt
After:
http://cr.openjdk.java.net/~zgu/shenandoah/region_retirement/patched.stats.txt
Webrev:
http://cr.openjdk.java.net/~zgu/shenandoah/region_retirement/webrev.00/index.html
Test:
hotspot_gc_shenandoah.
Thanks,
-Zhengyu
More information about the shenandoah-dev
mailing list