Performance Zone is brought to you in partnership with:

I am founder and Master Developer of Plumbr, memory leaking detection tool. I enjoy solving problems, raising self-awareness and professional pride of developers around me. In my out-of-office time I am bookworm and computer games addict. Nikita is a DZone MVB and is not an employee of DZone and has posted 93 posts at DZone. You can read more from them at their website. View Full User Profile

No Tool will Solve the OutOfMemoryError

08.10.2012
| 5559 views |
  • submit to reddit
By now we have published seven articles in the Solving OutOfMemoryError series and covered different aspects of the problem, as well as tested different possible solutions. Before wrapping this all up, we decided to briefly summarize our experience with the different tools out there.

tl;dr; No tools out there will really help you to solve the leak. At best you get a lot of data. But no solution.

What we discovered was that none of the existing tools does precisely what one might expect them to do – you get vast amount of data but only seldom an actual solution to your problem. Whether you use a memory profiler, a heap dump analyzer or an APM solution – you need to be both lucky and a performance expert to get useful data and be able to interpret it.

We have tried seven different tools over the course of the series: three memory profilers, two command line tools bundled with the JDK, a heap dump analyzer and an APM solution. Even getting our hands on some of them was not an easy quest. From five APM products in our list we were able to get only one in our labs, and that took us a week! Kudos AppDynamics, you are not afraid to show your product. But the rest of you guys out there – why do I end up in your sales dept if I just want to evaluate your product. Like, really?

Installing all those tools was somewhat easier. “Only” two of them required more than four hours to get them up and running. Again – guys – what are you thinking? Why do I have to go through all this mess to get things up and running?

Still, completing these tasks was often the only reason to rejoice. From the seven tools we tested only one (one!), gave us adequate information  on how to solve the leak. With the others we had a variance of results:

  1. crashes, sometimes together with the application;
  2. tons of flickering dashboards, graphics, buttons, bells and whistles, but no answer;
  3. console full of cryptic text and java class names;
  4. … or application adapted for snails and turtles, with response times increased 5-350 times.

I do agree that if you have solved hundred memory leaks in your life prior to the one currently at hand then you do stand a chance. But Kirk Pepperdine aside, how many developers actually stand a chance of noticing the patterns in something that looks like a complete gibberish?

All that proves that when a year ago we decided to bring our own memory leak detector to the market, with the aim to shedding some light into this shadowy valley of misery and despair, our assessment of the current situation was correct. Now, when Plumbr has detected 300+ memory leaks for our customers already, it seems that the dawn is coming.

Published at DZone with permission of Nikita Salnikov-tarnovski, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Zhu Disller replied on Sun, 2012/08/12 - 4:12pm

So what is the difference between your detector and others profilers?

Nikita Salnikov... replied on Tue, 2012/08/14 - 4:21am in response to: Zhu Disller

It is our opition, that profilers give you a lot of information and insights into your running code. Top consumers, heap usage dynamics, that kind of stuff. Using all this information and your knowledge of the application you can make some guesses as to what is the source of the problem. Then you need to confirm those guesses and fix the problem.

In Plumbr it is our aim to give the exact answer: what objects are leaking, where they were created and where do they reside in memory now.

You can find more information in our other blog post: Plumbr case study

Andreas Grabner replied on Tue, 2012/09/04 - 2:29am

Hi. My team wrote a book about Java Enterprise Performance with one chapter on Memory Management. You may want to check it out. It covers topics such as "how the different JVMs and GCs work", "Tuning GCs", "Root cause of High Memory Utilization", "Classloader related memory issues", ... - start reading the full book here: Java Enterprise Performance

Click on the "Table of Contents" to get direct access to the memory releated topics

Hope this is useful

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.