profiling webapps under tomcat - threads and samples?

B

bugbear

I have an application running under tomcat;
In an attempt to "make things better"
I used java's built in profiling to see what was
going on:

-Xrunhprof:cpu=samples,depth=40,thread=y

during a run where an external
script hammered the port as hard as possible.

I am most confused by the resulting
profile, which shows 72% of the time apparently
spent in java.net.PlainSocketImpl.socketAccept
and java.net.PlainSocketImpl.socketClose.

In fact, it appears that only 20% of the time is
spent in "my" code, which doesn't sit happily
with me, since if I deliberately slow
my code down by (say) 50%, the external
script (which has timing code in it)
also slows down nicely, in roughly equal proportion.

I think I'm being led astray by the java
profiler's behaviours under multi threading.

Could anybody help me, either with detailed
documentation of what the profile samples mean
(and how they relate to elapsed time, user time,
etc), or (more specifically) issues
involved in profiling webapps under tomcat?

BugBear
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,807
Latest member
ryef

Latest Threads

Top