RFR(X): Reduce region retirement during tlab allocation
Roman Kennke
rkennke at redhat.com
Fri May 5 21:07:48 UTC 2017
Am 05.05.2017 um 22:11 schrieb Zhengyu Gu:
> 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.
Nice one!
Please make sure you don't get funny ping-pong effects in TLAB sizing.
We have seen this before. If TLAB sizing doesn't flap around, it's good
to go from my side.
Roman
More information about the shenandoah-dev
mailing list