the easiest way is to use something like OptimizeIt, but not everyone has a copy. Your 
other option is to use -Xloggc and save the gc to a file. The thing you want to look 
for are frequency of GC and gc behavior. what I mean by gc behavior is when are minor 
and major collections garbaged.  If you see major collections garbaged at regular 
intervals that have a frequency of several seconds or half a minute, it's good.
 
if you see major collections getting garbaged every second, something is wrong. If you 
have any code that is multi-threaded, print out the number of threads every 10ms and 
see if the threads are getting garbaged correctly or hanging around.
In general, I use VM options with JMeter to expose load issues. Basically I set the gc 
options I want, start tomcat and then use JMeter to simulate a flood of requests. Some 
leaks are slow and won't occur until a long time or extreme load. hope that helps.
 
peter lin
 
 Paul Tomsic <[EMAIL PROTECTED]> wrote:Is there a way to tell what's going on in the 
heap
from within Tomcat?

I've tried putting JAVA_OPTS="-Xrunhprof:heap=all"

but this doesn't seem to be doing it. Perhaps I'm not
using it correctly. Thoughts?

What I'm looking to do is cure an OutOfMemory
exception, but I'm having trouble tracking down the
exact location of the problem.

thanks,
Paul


__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day

Reply via email to