Free ratio based heap shrinking in the parallel collector

Jon Masamitsu Jon.Masamitsu at Sun.COM
Thu Mar 11 00:04:13 UTC 2010


Hiroshi,

Have you signed a contributor agreement?  The gentleman
who used to take care of those isn't in the group any longer
and I'll have to go hunt it down before I look at the
code.

I'm going to be out of the office doing a
presentation tomorrow so won't be able to pursue
this until Friday at the earliest.

But just in general when UseAdativeSizePolicy is
off the UseParallelGC collector doesn't do any resizing.
Can you just make this the sizing policy when
UseAdativeSizePolicy is off (instead of adding the
new flags)?

Jon


On 03/10/10 15:17, Hiroshi Yamauchi wrote:
> 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
> 



More information about the hotspot-gc-dev mailing list