profiling webapps under tomcat - threads and samples?

Discussion in 'Java' started by bugbear, Jun 12, 2007.

  1. bugbear

    bugbear Guest

    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
    bugbear, Jun 12, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. charly
    Replies:
    5
    Views:
    1,794
  2. Martin Eberle
    Replies:
    2
    Views:
    828
  3. Frederic
    Replies:
    0
    Views:
    421
    Frederic
    Feb 23, 2005
  4. WD
    Replies:
    1
    Views:
    1,969
    Raymond DeCampo
    Aug 19, 2005
  5. PeterH
    Replies:
    2
    Views:
    2,089
    Juha Laiho
    Oct 9, 2005
Loading...

Share This Page