Advance notice of an imminent Full GC

Denis Baranov denka.b at gmail.com
Mon May 14 20:41:22 UTC 2007


That sort of probability would be fine. Much easier than monitoring
individual memory pools for variety of collectors, for sure.

Thanks,
Denis.

On 5/14/07, Tony Printezis <tony.printezis at sun.com> wrote:
> On Tue, 8 May 2007, Denis Baranov wrote:
>
> Denis,
>
> (apologies for the late e-mail)
>
> So, it was me who suggested this. To give a bit of background: it's
> probably not possible to notify a user through JMX that "be careful, we
> are about to do a full GC". When we decide to do a full GC, on many
> occasions, we are already in a stop-the-world pause and we typically carry
> on and do a full GC. So, any Java-level code would have no chance in
> actually getting the notification before the full GC completes.
>
> So, I think the best alternative is to just publish a probability of how
> likely a full GC is. Then it's up to the user to decide how conservative
> they want to be when handling this probability. I _think_ such a
> probability will be quite easy to calculate with the statistics we
> maintain in our GCs (but, maybe, we do not make enough of them public in
> order for the user to be able to calculate it?).
>
> Thoughts / suggestions would be appreciated.
>
> Tony
>
> > Hi!
> >
> > I was told at the JavaOne booth that it may be possible to expose
> > HotSpot's inner workings to the degree that when HotSpot makes the
> > decision to collect or not, those values it bases its decision upon
> > can be exposed via JMX and some application may be notified when
> > certain threshold is crossed. I think this would be helpful (in
> > absence of RealTime JVM) to be able to notify load balancer in
> > load-balanced configuration to stop sending requests to this instance,
> > force GC or wait for it to occur naturally, and then notify load
> > balancer again that the instance is ready to process requests.
> > Otherwise we observe situation when requests pile up at the "gate" and
> > cause an abrupt spike in load after Full GC.
> >
> > Thanks!
> >
>
> ---------------------------------------------------------------------------
> | Tony Printezis, Staff Engineer, Java SE | Sun Microsystems Inc.         |
> |                                         | MS BUR02-311                  |
> | e-mail: tony.printezis at sun.com          | 1 Network Drive               |
> | office: +1 781 442 0998 (x20998)        | Burlington, MA01803-0902, USA |
> ---------------------------------------------------------------------------
>
>



More information about the hotspot-gc-dev mailing list