Ensuring short lived objects remain short lived
Jeffrey Sinclair
jeff at cooljeff.co.uk
Wed May 19 09:29:32 PDT 2010
hotspot-dev,
Many of the Java server side applications I see involve message
pipelines. In an ideal world all of the transient objects involved in
processing the message would remain in the young generation to be
collected efficiently.
Quite often what I see is that some of these transient objects either
survive too long (and hence promoted to tenured) for longer message
pipelines and others survive when the system is under load because they
are promoted straight to the tenured generation.
Something I've always been curious about is optimizing the young
generation to prevent these use-cases arising. The only mechanism I'm
aware of is to use jmap -heap to monitor young/tenured as messages flow
and then alter the maxnewsize until you get something that kind of
works. However I'd like to have something more quantitative that can be
used to scale correctly. For example it would be good for me to be able
to say that for this message execution flow, XMb is used per message and
here is a breakdown of the objects used.
Is there any built-in mechanism or methodology that would allow me to
determine more quantitatively that my short lived objects are being
regarded as short-lived and not being promoted?
Jeffrey Sinclair
More information about the hotspot-dev
mailing list