The current CMS (static) triggering strategy is:
if ((old gen occupacy % > CMSInitiatingOccupancyFraction) ||
(perm gen is subject to concurrent collection &&
(perm gen occupancy % > CMSInitiatingOccupancyFraction)) then
... start a CMS collection
By conflating old gen threshold with perm gen threshold, one might unnecessarily
do CMS collections when there is lots of free space in the old gen but relatively
little space in the perm gen. For 32-bit JVM's where address space is limited,
one may not have the luxury of a large MaxPermSize just to work around this
limitation.
Accordingaly, we want to refine the above strategy to something along the
lines of:
bool collect_old = old gen occupancy % > CMSInitiatingOccupancyFraction;
bool collect_perm = (perm gen is subject to concurrent collection &&
(perm gen occupacny % > CMSInitiatingPermOccuapncyFracton));
if (collect_perm) {
... start a CMS collection, certainly including perm gen
} else if (collect_old) {
... start a CMS collection, possibly excluding perm gen
}