Free ratio based heap shrinking in the parallel collector
yamauchi at google.com
Wed Mar 10 23:17:25 UTC 2010
I'd like to have this patch
contributed, if appropriate.
It implements a simple heap shrinking logic based on the free ratio
(MaxHeapFreeRatio) in the parallel collector. The way it works is the
following: If the free ratio, (1.0 - <used> / <capacity>) * 100 >
MaxHeapFreeRatio, this logic kicks in. Otherwise, the (default) adaptive
size policy runs the show (as before). This feature is turned off by
default. There are two new flags to turn it on:
UseFreeRatioForParallelGC - this enables it.
UseFreeRatioOnlyInSystemGCForParallelGC - this enables it only in explicit
System.gc() calls. This is more useful in apps that call System.gc() when
it's idle and don't want shrinking to happen at all other times.
In our tests, it appears to work well in a simple test and to help a real
app reduce its footprint (RSS) when it's idle.
Thanks to Chuck Rasbold who uploaded the webrev on my behalf.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-gc-dev