views:

8154

answers:

19

Which profiler is better for general purpose profiling and heap analysis? 90% of our apps are standalone command line programs with substantial database and numeric processing. The other 10% are webapps/servlet container apps (with very little JSP and NO SCRIPLETS!). Target user would be Sr Software Engineer with 5-10 years of industry experience. We need support only for Sun JDK 5 and.

As of writing this question (2008-10-02), JProfiler was at 5.1.4 and YourKit was 7.5. Looks like YourKit 8.0 will be released soon.

+6  A: 

If you're on jdk >=1.6_07 you might also want to look at jvisualvm which comes bundled.

Steve B.
For "general purpose" profiling, jvisualvm is great. no extra building or setup or anything, just attach and go. once you find something, you might need to go to one of these other apps to get real in depth coverage, though.
John Gardner
+1  A: 

For quick and dirty profiling of command-line programs, JIP works really well.

thoroughly
A: 

I've only used JProfiler (and some JProbe). As far as I can tell, one limitation of YourKit is that they don't appear to support JDK 1.4.2. That's not an issue for many people, but it might be.

David M. Karr
I've used yourkit on 1.4.2. it supports it BUT NOT QUITE SO WELL as 1.5.x
anjanb
+2  A: 

i've used yourkit and it is a very nice profiler, the best i've ever used in java (i've used a variety of others over the years). that being said, i've never used jprofiler, so i can't give a direct comparison.

james
+1  A: 

Been using JProfiler for years and very happy with it. IntelliJ seems to switch their recommendation back and forth between YourKit and JProfiler so I would guess their feature sets are similar. I believe they both have trial version.

Javamann
+14  A: 

I've used both JProfiler 4 and YourKit 7.5, and YourKit wins hands down. It's so much less invasive than JProfile, in that I'll happy run production servers with the YourKit agent installed, which I would never do with JProfiler.

Also, the analysis tool that comes with YourKit is more intuitive (in my opinion), making it easier to get the root cause of problems.

skaffman
A: 

+1 for yourkit --- using 7.0 on dev boxes in windows
not used JProfiler for a while -- cannot comment since they might have improved in the meantime.

anjanb
+1  A: 

DISCLAIMER : Alternate answer.

they have various products for production monitoring/profiling UNLIKE other mostly development time tools : http://www.jinspired.com/products/jxinsight/
This post on theserverside on JDBInsight : http://www.theserverside.com/news/thread.tss?thread_id=13488

DISCLAIMER : I am NOT associated with this company at any level.

anjanb
A: 

Just as an aside, you may want to consider the Netbeans profiler -- it's pretty good. But I've not used either of the two you mentioned.

Will Hartung
+1  A: 

I have used YourKit. I have not used JProfiler. I have used OptimizeIt before. I have very good opinion about YourKit. It is very stable and good GUI and good feature list. One unique feature I have noticed is CPU profiling with and without wait time (like I/O wais) including.

It is priced also very reasonably (about about $1100 for 5 licenses I think)

Rejeev Divakaran
+3  A: 

I've used JProbe, OptimizeIt, and YourKit all extensively and they're all capable tools. Of the 3, my all around favorite is YourKit.

The one killer feature in JProbe is the ability to move from a perf snapshot to annotated source (with counts and timings). I found that to be exceptionally useful.

Alex Miller
A: 

YourKit is great. You might also want to check out the profiler built into NetBeans--it's pretty cool.

stephmara
+1  A: 

Yourkit It's low overhead, stable, easy to install on the JVM to be profiled (just one dll) and powerful. For analyzing heap dumps it's the only profiler that comes close to the Eclipse Memory Analyzer.

kohlerm
+4  A: 

None of the tools other than JXInsight perform real database transaction analysis:

http://www.jinspired.com/products/jxinsight/concurrency.html http://www.jinspired.com/products/jxinsight/olapvsoltp.html

JXInsight's Probes technology is also the only one that could even run in production considering that we out perform netbeans profiler by 20x and yourkit 100x in SPECjvm2008 benchmarks.

http://blog.jinspired.com/?p=272

I am the architect of JXInsight so of course I am completely biased but at the same time I am probably more qualified than most in the Java industry to make such a claim since I have devoted the last 8 years to performance analysis for some of the most demanding of Java/J2EE application in production.

I should be point out that JXInsight is designed for software performance engineers and not just for the occasional adhoc profiling session. We have more than 4000+ system properties to configure the runtime and 600+ technology extensions libraries so it might be overkill unless one has a complex problem to solve and/or using the same tool across development, test and production is paramount.

Kind regards,

William

A: 

I am using JProfiler and find it overall OK. It's "dynamical instrumentation" feature is terribly biased for small methods, though.

quant_dev
A: 

I am using the TPTP profiler. the best feature it has that this can be integrated very easily in Eclipse but the bad thing is that it makes the Eclipse run slower.

+1  A: 

Definitely YourKit ... It was able to open 4 gigs heap dump with just 1g of heap used. While Jprofiler with same heap allocation crashed!

Adnan Memon
+1  A: 

I have used both and my vote now is definitely JProfiler (in the current version 6) as it is easier to use and has a lot of useful additional features. In previous releases YourKit had some advantages with larger snaphots, but this is gone now.

larsk
+1  A: 

Having used both JProfiler and Yourkit recently I find that yourkit is far superior for memory problem analysis and strongly prefer jprofiler for performance analysis. Yourkit's memory analysis seems to be much easier and intuitive. For performance analysis on yourkit I have been unsuccessful in resolving any performance issue I have tried to resolve with yourkit. JProfiler shows more accurate and concise information for performance analysis with the exact number of method invocations and percent time spent in each method. I have yet to find this in yourkit. It seems yourkit just gives sampling information which is not accurate unless you are measuring thousands of invocations.

Jeramyn