Java Profilers - Which One Are You Using? 79
splitPersonality asks: "Our Java programmers are researching various profilers to use in-house. We would appreciate some feedback from other shops that are using Java profilers. Along with the specific product, would you please include reasons behind your choice? If you now have misgivings about the one you or your shop chose, please let me know about those, as well."
Re:Which one? Isn't it obvious... (Score:4, Informative)
For step-through-your-code debugging nothing beats Jprobe, although perhaps a fellow slashdotter
can suggest a public domain equivalent
If you want to profile your code in a "production" situation, i.e. you need minimal overhead
while instrumenting methods to understand where in your stack trace time is being spent
you have two options. Mercury Interactive sells a product that instruments all methods,
aggregates method usage and gives you a "top talker" summary. Wyle Introscope on the other
hand instruments only the methods you want, but can drill down into things like JDBC and capture
executed SQL. Their product Leakhunter can help you find memory leaks, but creates too much drag for prod usage.
Finally if want something that combines elements of Mercury's inclusive approach of instrumenting
everything and top talker summaries and with Wyles approach of watching for heap usage, GCs and so
on you want a copy of YourKit. I own all the products mentioned but have to say YourKit is my current favorite.
Re:Which one? Isn't it obvious... (Score:2)
Ruby actually comes with a built-in profiler (likewise for Python). The point? As for any profiler, discovering the bottlenecks of your applications to either change your algorithm (since you create the same functionality in 1/10ths of the time you have the time to refine your algorithms) or recode the bottleneck (and the bottleneck only) in a lower-level language (C or C++)
Re:JProfililer (Score:2)
To detect performance bottlenecks I prefer JProbe.
Those two together make a perfect suite
YourKit: awesome profiler (Score:5, Informative)
YourKit is extremely easy to use thanks to a very intuitive interface.. All the java developers I've shown it to have been as impressed as I've been. It is cheaper than most profilers -- I got a deal on it for $125 a few months ago, which I is about 25% of the normal price, but it's still cheap at $499. It's not open-source, but they have a forum where they answer they questions extremely quickly. I've had 1 or 2 bugs since I've been using it (about 10 months), since I like to use the early release version for newer features, and both have been fixed within days, with a new build released within a week or so. Memory leaks are a snap to find using it's "compare snapshot", which lets you compare 2 snapshots and shows you what the difference is -- memory leak is generally the difference if you capture your snapshots intelligently.
Anyway, I can't speak highly enough of the product. For the record, I have no affiliation with them at all. I'm just a very happy customer.
My only minor gripe is that under some circumstances, the fastest CPU profiling option (unnoticeable impact on the running app) can give inaccurate results, in which case I have to use one of the two slower CPU profiling options, which are much, much slower--but that's certainly not particular to YourKit.
Re:YourKit: awesome profiler (Score:2, Informative)
I second this. It's been a year or two since I looked, but I was happy to pay my own money for the YourKit profiler. In particular, I like the good UI. As with an IDE, I think it's worth paying for a good tool when it substantially increases my productivity, and the YourKit tool fits that.
Re:YourKit: awesome profiler (Score:2)
Re:YourKit: awesome profiler (Score:1)
As Knuth said, "Premature optimization is the root of all evil." Or as Robert Martin says, the proper order is "make it work; make it right; make it fast."
People are slightly irresponsible when putting software into production without any profiling. But hey, if it runs fast enough, then it's fast enough. But developers who optimize without measuring b
Profilers (Score:2, Informative)
OptmizeIt (Score:3, Informative)
JProbe also seemed pretty good...
I also had good luck with HAT (heap allocataion tool, built into Java) if you are just looking for memory leaks. The HProf stuff also works and again is built in.
---> Kendall
Re:OptmizeIt (Score:2)
JRat (Score:5, Informative)
A) doesn't require much overhead
B) doesn't require code changes
C) doesn't require some sort of front-end to monitor or use
D) doesn't have a rediculous cost per server
E) runs in your typical environment, not some magical profiling IDE option
We use this every day (via an ant task) to profile a Wall Street trading system that handles billions of dollars of transactions every week. Would you trust that to anything else?
Signing anon because my employment contract specifically prevents me from revealing this sort of thing
Re:JRat (Score:1)
hprof (Score:2)
JProfiler (Score:3, Informative)
I hear recent versions plus 1.5 resolve a lot of stability and performance problems, but I haven't had enough problems to warrant pulling it out in a while. It's not a perfect product, but it's told us what we need to know.
Re:JProfiler (Score:1)
Regards
elFarto
Re:JProfiler (Score:1)
Re:JProfiler (Score:2)
Re:If you care about performance... (Score:5, Insightful)
If I invented something tonight which was faster than whatever you were using today, and yet you were running into memory leaks that required restarting or rebooting servers you run 24/7, and losing thousands of dollars by the minute, but were within reach of serving your current load if you could identify the leaks, would you turn off your servers until you finished rewriting your application in my language?
He's not asking about 'performance', hes asking about how to chase memory leaks via a profiler. He's not concerned about performance, hes concerned about RAM usage due to memory leaks due to programming bugs. Please tell me people like you are not actually employed as programmers or programming project leads. You're advise is as useful as the lowest of the low tech support, "Oh, thats your problem? Well, you should just probably quit everything you're doing, and re-invest from the ground up in some other product or technology."
Its useless advice because thats not the question being asked. And just like low tech support, he probably knows more about the alternatives than you do.
Memory leaks? What are you talking about? (Score:1, Funny)
splitPersonality asks: "Our Java programmers are researching various profilers to use in-house. We would appreciate some feedback from other shops that are using Java profilers. Along with the specific product, would you please include reasons behind your choice? If you now have misgivings about the one you or your shop chose, please let me know about those, as well."
Do you see any reference to "memory", "memory leaks", "RAM consumption", and so fort
Re:Memory leaks? What are you talking about? (Score:1)
I'm also with eolson@mit.edu (above)
Re:Memory leaks? What are you talking about? (Score:2, Informative)
Re:If you care about performance... (Score:2)
Re:If you care about performance... (Score:2, Informative)
it's actually very easy to get excellent performance out of java -- just use data structures as you would use them in C:
i'm currently using java to do classical molecular dynamics simulation (and statistical analyses thereof: esra [sf.net]), and the speed (without any tweaking) is consistenly within a factor of two of what
Re:If you care about performance... (Score:1)
Do you really find a performance difference with 'final' ?
I'd be interested to hear your experiences here. I advocate 'final' as an aid to expressiveness, but understood the performance benefits were minimal these days.
Re:If you care about performance... (Score:2, Informative)
"final" allow you to state information _in code_ about what you are doing about invariants, and letting the compiler enforce this.
This allows the designer and maintainer to catch accidential assignments too. Not a bad thing.
Re:If you care about performance... (Score:2)
And that bit of information about your app is worth nothing to you? No wonder your java apps are slow.
Re:If you care about performance... (Score:4, Informative)
PerfAnal.jar (Score:5, Interesting)
alias java-prof='java -agentlib:hprof=cpu=samples,depth=8,interval=1,th
And then I view the results with PerfAnal.jar (google will find it for you), an extremely old (and even ugly) GUI that is also clean and mean. It's also free (beer? not sure.)
I've tried a number of other profilers (JFluid, YAJP, etc.), and they usually prove to be too much of a pain in the ass, or just give nonsense data.
Mind you, I'm usually interested in pure CPU performance-- tightening inner loops and things like that. I don't care too much about memory profiling or garbage collector behavior since I've long since eliminated most allocations in my performance-sensitive code.
Sadly, no profiler really satisfy me. Usually, line-by-line CPU usage just can't be computed given the optimization performed by HotSpot: you'll see trace-by-trace CPU usage, where a trace covers several lines of code. It makes it hard to know exactly where the CPU time is being spent. (You can run with -Xint, but the performance is so different without HotSpot that it's not helpful.)
For us... (Score:4, Informative)
Eclipse TPTP (Score:4, Interesting)
http://www.eclipse.org/articles/Article-TPTP-Prof
Re:Eclipse TPTP (Score:1)
Subjectively, I liked JProbe's interface more, but they only supported Java 1.4 at the time, whereas OptimizeIt and Eclipse TPTP supported 1.5 (which I was using).
I find Eclipse TPTP a little finnicky to set up though. I've set it up two or three times, and I must not be understanding the instructions properly - they're very detailed and specific, but it doesn't go smoothly for me.
Re:Eclipse TPTP (Score:1)
JProfiler (Score:2)
-1 troll +5 funny (Score:4, Funny)
Re:-1 troll +5 funny (Score:5, Funny)
Re:-1 troll +5 funny (Score:1)
Re:-1 troll +5 funny (Score:2)
If performance was important I wouldn't have written the code in Java to start with.
JMeter (Score:3, Interesting)
At Java One I talked to some fellow Swedes who were a bit disappointed with JProbe, they claimed it was a bit of a resource hog and that they had found a better more light weight open source library to use instead. I've looked through my notes, but it seems I didn't write down the name of the one they recommended. Darn.
Symantec had an app that seemed pretty impressive, though I don't know how much they charge for it. I think it was this one [symantec.com]. I remember them because unlike most who just had a lottery for prizes, you actually had to run the demo to be able to answer their quiz. Pretty clever, made people remember and gave you a better chance of winning because most people wouldn't bother. I won a PSP.
Also at Java One this year Sun had loads of labs and talks on profiling tools and frameworks that come with the JDK itself these days - JMX (especially in combination with DTrace if you run on Solaris), jconsole, jmap, jhat.
And then of course there is this whole site [javaperfor...tuning.com]...
Re:JMeter (Score:2)
JProfiler (Score:5, Interesting)
The problem I had was the following. We upgraded our system from the previous stable release of our opensource CMS to the new stable release. We knew a lot had changed in the internals, so we did a good functional testround and fixed quite a few issues. Quite confident in the new software (it appeared faster) we deployed on our live environment. Looked fine, until after a few hours it didn't stop Full-GC-ing, the symptoms of a memory leak. (and yes, I know how to tune my VM to optimum GC performance).
All I can say about JProfiler is that after only 3 or 4 days, I found all memory leaks, several performance issues (even things like 'for (int i=0; istr.length(); i++)'), and got a real good feel about the bottlenecks inside the application. My manager just bought me a $400 or so license, and it's money very well spent.
So next week we'll go live again, but now with a piece of software of which we exactly know how it behaves.
I suggest you download the evaluation version and just give it a try. I can't imagine putting a release live anymore, without having profiled it for at least a day.
Re:JProfiler (Score:3, Interesting)
- attach the profiler to a remote machine (in our case a test environment)
- trace memory allocations: you can see live which objects live in the JVM
- memory snapshot, this makes a snapshot in which you can see which objects live, which other objects have references to it, where it was allocated etc. So if you have a mem-leak, you can find out exactly why the object wasn't GC'ed
- cpu profiling: see which methods take how many percent of your processing, and f
Re:JProfiler (Score:1)
JProfiler just works, and you get the information you need really quickly. I'm not a shill, just a fan. I've introduced it to my new employer, and the developers now go through a compulsory JProfiler session before any significant changes get committed. We're working in a large, mostly legacy code base, where the impact of changes isn't always understood. Just ordered another 3 floating licenses. Yes, it's about AUD 3000, but that is repayed sooooo quickly.
I definitely recommend JProfiler (Score:1)
Hope that helps.
JProbe (Score:2)
Re:JProbe (Score:3, Interesting)
It seemed expensive at first, but in two
Re:JProbe (Score:2)
It was originally developed by a company called KL Group, which changed their name to Sitraka. Most people only knew about JProbe though, so a lot of people thought that was the company name too. In 2002 Sitraka was acquired by Quest Software.
Re:JProbe (Score:2)
Their performance profiling is great, and their remote profiling works wonderfully as well. We ha
Re:your sig (Score:2)
Symantec's Indepth for J2EE (Score:2, Interesting)
JFluid (Score:2, Informative)
1. Free
2. Trivial to configure/run (as easy as debugging in NB)
3. You can specify a subset of the app to profile, and the rest of the app runs at full speed (profilers like JProbe force you to slow down the whole VM). This also makes the output much more readable, since you're not seeing all kinds of statistics from code you're not interested in.
4. Attach/detach to a running application, which requires no special cmd line options when launching.
5. Analysis tools are good
Re:JFluid - NetBeans Profiler (Score:1)
Many thanks for the feedback (Score:1)
The replies to this post has given my team a lot of food for thought. As usual, the slashdot community replied with a lot of intelligent feedback and added a dash of humor too.
I especially appreciated the discussions on features. Many had been on our wish list, but others had been overlooked.
Thanks Again!
YourKit (Score:1)
Apple platform includes Shark (Score:1)