Direct promotion to old gen

Y.S.Ramakrishna at Sun.COM Y.S.Ramakrishna at Sun.COM
Mon Aug 3 12:36:46 PDT 2009


On 08/ 3/09 11:38 AM, Peter B. Kessler wrote:
...
> 
> A minor correction:  I'm pretty sure that one object failing to fit in to-space doesn't imply that all further attempts will result in promotion.  E.g., if you have one big object that fails to fit in the to-space, then it will be put in the old-space, but after that smaller objects may well fit in the to-space so we will put them there.  That is, each object is considered individually: if the policy says we should put it in the old generation then we do, but otherwise we try to put it in the to-space.  If it fits, we're happy, if it doesn't fit we put it in the old generation.
> 
> The point of the age bits and the tenuring threshold policy is to advise us which relatively older objects should be promoted so that there's room for the relatively younger objects to fit in the to-space.  We need a policy like that because we don't consider the objects in age order.

Exactly; and furthermore, the "Survivor PLABs" used by our parallel
scavengers can exacerbate that effect, especially in the presence of object
size distributions with longer/fatter tails, where we can make the
error of keeping an old large object (which might typically live
a long time) in a survivor space at the expense of many smaller
younger objects that will die soon. Such survivor space overflow is,
as many of our users know, the bane of non-moving old gen
collectors such as CMS, where they exacerbate fragmentation.

-- ramki



More information about the hotspot-gc-use mailing list