At this years JavaPolis I endeavored to have the audience work through a performance tuning exercise during our University session. In planning for this session I fretted over just how hard a problem I should give. In the process of setting the level of difficulty I came to the conclusion that the difficulty was not with the problem but rather with the tools I was using (I used quite a few different ones including the usual suspects).
What I was looking for was a reliable way to locate the leak using a set of instructions that I could give to my mother (ok,, maybe not that simple but...). Problem was, it just wasn't happening and I didn't want to stand up in front of 300+ people and say, to diagnose a memory leak you need to perform some black magic. Unfortunately this is just about what I did during that session. So, since then I've been doing a lot of thinking about the problem. I've also had some interesting conversations on the subject with a number of people and know have some idea's I'd like to try out.
The true test is; can I find the leak with minimal interaction with the code. I.E. I want to do this using instrumentation only looking to the code at the end of the exercise. So, I'd like to try it out on a few use cases.
If you have or had a particularly nasty memory leak in your Java application, I'd be interested in hearing from you. I should add that any derived technique will end up in the public domain.
tags: java memory leak