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
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