Can anyone recommend a good tool for performance profiling Java web applications? (Hibernate, Spring, on Tomcat. you know the kind of thing.)
I've been playing with JiP, but I can't seem to get anything useful out of it. The remote control seems to do nothing at all, so I have to start up the server with it on, which takes a while - then I seem to get no output most of the time. Small runs - no problem. Big runs - which is where I get my performance issues - nothing. Irritating to get no output after waiting several hours for a big test run to complete!
Update: Or, perhaps the fact that Tomcat is still running an hour after I've asked it to shut down indicates that JiP is trying to do something? Who knows?
Posted to Java by Simon Brunning at October 17, 2006 03:48 PMCheck out the NetBeans Profiler :
http://profiler.netbeans.org/
Basic Tutorial
http://www.netbeans.org/kb/articles/nb-profiler-tutor-8.html
Attaching Profiler to Remote JVM
http://profiler.netbeans.org/docs/help/attach.html
Flash Demo of Profiling a web application
http://testwww.netbeans.org/kb/50/profiler-demo2.html
Attaching Profiler to Various J2EE Web/Application Servers
http://profiler.netbeans.org/docs/help/j2ee_server_integration.html
You didn't say if it had to be free - at work we use 'Dev Partner for Java.' for this sort of thing. I was skeptical at first, but after it found a silly construct that was slowing down the app, I've changed my mind and am now quite happy with it.
Posted by: Kevin Dahlhausen on October 17, 2006 07:41 PMYou could try Glassbox to diagnose high-level problems before moving to method/call level profiling.
Glassbox looks for certain classes of problems (slow JDBC operations, slow HTTP response, and so on). From there you get a good idea what to look at with the other code profiling tools.
Posted by: John Heintz on October 17, 2006 11:08 PMHi,
I would recommend you Yourkit.
Go and get the EAP release at http://yourkit.com/eap/.
Regards,
Markus
We've used the Eclispe one and JProbe.
http://www.eclipse.org/tptp/
http://www.quest.com/jprobe/
The JProbe one was more stable, but pretty expensive and I don't like their sales people. There is a 'freeware' version, but I don't know if it has the same features and expires (which I find odd for something labeled 'freeware').
The Eclipse one was kind of quirky at times (could be that I was using an older version, don't remember). And I *think* it requires Java 1.5 (but check me on that), which might be an issue.
Posted by: Ben on October 18, 2006 05:48 PMJProfiler gets my vote -> http://weblogs.java.net/blog/simongbrown/archive/2005/02/jprofiler_minir_1.html
Posted by: Simon Brown on October 19, 2006 12:29 PMThe best that i had found is the Eclipse based, and the other is JProfiler.
Posted by: mansoor on October 19, 2006 07:49 PMJProfiler and YourKit are both easy to use, but JProfiler has more tools with which to diagnose problems, so it tends to be my preference of the two. JProbe is old, expensive, not aging well, and much harder to use, although quite capable.
Posted by: Geoffrey Wiseman on October 19, 2006 08:46 PM