Free ratio based heap shrinking in the parallel collector

Hiroshi Yamauchi yamauchi at google.com
Wed Mar 10 23:17:25 UTC 2010


Hi,

I'd like to have this patch

  http://cr.openjdk.java.net/~rasbold/69XXXXX/webrev.00/

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.

Thanks,
Hiroshi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20100310/3d945360/attachment.htm>


More information about the hotspot-gc-dev mailing list