You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Frank Misa <fr...@hotmail.com> on 2007/06/28 18:20:59 UTC

Checking Memory Usage Of WebApps within a Tomcat instance



Hi All,Can someone here confirm....Does Tomcat provide tooling/API to allow checking/monitoring of how much memory usage each webapp deployed within a Tomcat instance is using?I've checked the forums and found some references to:     Java5+/Java6 tooling which uses these VM options:     -XX:HeapDumpPath=C:\Java\heapdump -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDetailsAlso some third party tools:     Hyperic HQ etc.But both these approaches look VM centric -- i.e. I don't think you'll be able to see which webapps/threads are using what resources relative to eachother ?Any thoughts would be appreciated.... can this be easily done ?ThanksFrank
_________________________________________________________________
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline

RE: Checking Memory Usage Of WebApps within a Tomcat instance

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Frank Misa [mailto:frankmisa@hotmail.com] 
> Subject: Checking Memory Usage Of WebApps within a Tomcat instance
> 
> Does Tomcat provide tooling/API to allow checking/monitoring 
> of how much memory usage each webapp deployed within a Tomcat
> instance is using?

Not directly (nor does any other web or app server).  There's one heap
per JVM, and all webapps allocate out of it.  If you have some unique
objects in each webapp, a profiler can easily show you those, but
there's no way to differentiate who allocated common objects other than
by looking at the walkback stack at the time of each allocation.
Collecting such information can be expensive, since you may have to
record quite some depth in order to get back to the significant webapp
entry.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org