2

My application is causing heap thrashing. I have the heap dump but I don't know how and where should I start to look for problems?

This is a 6 GB dump. Please recommend some suitable heap analysis software?

dzieciou
  • 10,512
  • 9
  • 47
  • 100
Asad Iqbal
  • 133
  • 4
  • Have you tried any of the Java heap analyzer tools listed under http://bit.ly/Y1phHO? –  Jan 24 '13 at 18:54
  • Thanks. I started with JProfiler but it was getting stuck while loading the heap. Now, I am using Eclipse MAT. I thought it is good to ask, as some tools can be more optimal for high scale. – Asad Iqbal Jan 24 '13 at 18:57
  • 1
    Any chance you could reproduce the problem with a smaller maximum heap size? –  Jan 24 '13 at 19:11
  • The issue was identified in a production environment, and I didn't know the specific user input. After some investigation using Eclipse MAT, it seemed that one thread was holding to a HashMap for maintaining context. And one user-input processor (one of many handlers which process user input) had 800,000 objects of one class in that map. For now, I handed over the problem to author of that class. Either, it was a very big input which should be stopped before it enters our system OR we need to change design in that handler. – Asad Iqbal Jan 25 '13 at 22:47

1 Answers1

0

Can I suggest using techniques to reduce heap size at compile-time or runtime in order to force this situation to reproduce on smaller scale testing? I used to do this many years ago on an embedded platform with a lot of success, although lately it's not that easy to do without special work if you are using Windows platform. Hope this helps.

Conrad B
  • 213
  • 1
  • 6