Threshold for PermGen cleanup

Y. Srinivas Ramakrishna y.s.ramakrishna at oracle.com
Thu Aug 19 13:05:30 PDT 2010


Hi Xiaobin --

Look at the method PermGen::mem_allocate_in_gen() to see what we
do. We allow expansion up to a (tunable) delta without a collection,
when we reach the delta, we do a collection (and possibly resize),
and the cycle repeats. There is no threshold occupancy at which
a collection is done -- the decision to expand or collect is
made when an allocation fails. It is possible that "he" was
running with MaxPermSize and PermSize set to the same value,
and yes in that case no full collection will be triggered until
the perm gen (or the old gen) gets full. In practice, since in
typical deployments the old gen allocation rates are usually much higher,
the old gen typically will get full before perm does and this
will precipitate a whole heap collection during
which the perm gen is (always, modulo CMS) also collected.

Or were you talking about the concurrent CMS collector where the
policy was designed to be different (but has a performance
bug/regression that we know of but, alas, haven't gotten around to
fixing yet).

-- ramki


Xiaobin Lu wrote:
> Hi folks,
> 
> I have a question. Do we have a size threshold for perm gen before full GC
> kicks in to clean it? Someone claimed to me that he saw perm gen usage goes
> to 99.9% and he didn't see any full GC is triggered to collect it.
> 
> Thanks so much in advance!
> 
> -Xiaobin
> 



More information about the hotspot-gc-dev mailing list