PDA

View Full Version : Monitor PermSize


Kees de Kooter
29-10-2008, 10:06
For Tomcat and Eclipse (to name a few) I routinely set the jvm option -XX:MaxPermSize to some high value in order to avoid OutOfMemory exceptions.

Is it possible to use the monitor to determine if this option is set to a sensible value?

kjkoster
29-10-2008, 14:09
Dear Kees,

For Tomcat it is simple: just deploy Java-monitor on it. :-) The non-heap monitor should give you an idea of how much permgen space you need. It's not precise, because that rolls a few non-heap memory pools into one statistic.

Do you think it would be useful to monitor all of Java's memory pools and make that into a special page on Java-monitor? That way you'd have the same overview that you have now and you could delve into the various memory pools and garbage collectors as you see fit.

For Eclipse, it is more tricky. You could build your own version of the probe to work in Eclipse as a plugin.

I'm actually thinking that we need an OSGi probe bundle. That would work in Eclipse and in other OSGi enabled environments. Isn't Spring's server based on OSGi too? Would such a probe be useful?

Kees Jan

Kees de Kooter
29-10-2008, 14:18
Thanks Kees Jan.

Speaking for myself I do not need to delve into the various memory pools (for now at least) as I only superficially understand what is going on there...

But I guess it would be a nice demoable selling point for the monitor.

I don't really need to monitor Eclipse. Got enough RAM in my laptop ;-)

Yes the new spring app server is OSGi based. As is Glassfish for that matter. So it might be interesing to publish it as a bundle (that would solve your jar-bootstrapping problem btw).

kjkoster
29-10-2008, 15:12
Dear Kees,

If you just want a high-level view of the permgen space, the non-heap graphs in Java-monitor will do nicely. Here is one from one of my servers.

http://java-monitor.com/postedimages/fda4344b-040e-47b0-8b92-1b8281087e2d.png

Not exactly earth-shattering, but in a smoothly running system that should not be the case anyway. :-)

For machines that are redeployed all the time for testing, this graph should be rather more wobbly.

Kees Jan