Advance notice of an imminent Full GC

Jon Masamitsu Jon.Masamitsu at Sun.COM
Wed May 9 14:39:01 UTC 2007


Denis Baranov wrote:

>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!
>  
>
Take a look at

http://java.sun.com/j2se/1.5.0/docs/guide/management/mxbeans.html#low_memory

There is a section that talks about detecting low memory which
might be of interest.  That page has links that might also be
useful. This is the jdk5 documentation. 

The jdk6 monitoring guide will be more current but I don't think it
is linked to other interesting stuff.

http://java.sun.com/javase/6/docs/technotes/guides/management/MonitoringGuide.pdf
<http://onesearch.sun.com/search/clickthru?qt=low+memory+detection&url=http%3A%2F%2Fjava.sun.com%2Fjavase%2F6%2Fdocs%2Ftechnotes%2Fguides%2Fmanagement%2FMonitoringGuide.pdf&pathInfo=%2Fsearch%2Fonesearch%2Findex.jsp&hitNum=3&col=developer-reference>




More information about the hotspot-gc-dev mailing list