3

I have a curious problem, I need to analyze a Java heap dump (from an IBM JRE) which has 1.5GB in size, the problem is that while analyzing the dump (I've tried HeapAnalyzer and the IBM Memory Analyzer 0.5) the tools runs out of memory I can't really analyze the dump. I have 3GB of RAM in my machine, but seems like it's not enough to analyze the 1.5 GB dump,

My question is, do you know a specific tool for heap dump analysis (supporting IBM JRE dumps) that I could run with the amount of memory I have?

Thanks.

Abel Morelos
  • 1,228
  • 5
  • 20
  • 31
  • What is the max heap size for the JVM set to when you are running these tools? Ensure it is set to at least 2GB. – Mark Jun 07 '10 at 15:18
  • I've been manipulating that setting, actually the max I've been able to use when starting the tools is 1600 MB (-Xmx1600m) from my machine, if I specify I bigger value I get an error specifying that is was not possible to allocate the requested amount of memory. – Abel Morelos Jun 07 '10 at 15:32
  • 2
    Borrow a 64-bit machine for half an hour. – Pete Kirkham Jun 07 '10 at 15:44
  • Yes, you need a 64 bit JVM and cpu. – zckman Jun 07 '10 at 16:27

2 Answers2

4

Try the SAP memory analyzer tool, which also has an eclipse plugin. This tool creates index files on disk as it processes the dump file and requires much less memory than your other options. I'm pretty sure it supports the newer IBM JRE's. That being said - with a 1.5 GB dump file, you might have no other option but to run a 64-bit JVM to analyze this file - I usually estimate that a heap dump file of size n takes 5*n memory to open using standard tools, and 3*n memory to open using MAT, but your milage will vary depending on what the dump actually contains.

Amir Afghani
  • 37,814
  • 16
  • 84
  • 124
  • Agree with MAT. I have been able to open 1.5Gb heap dumps but it was using a 64-bit JVM on a machine with 4GB memory. – Mark Jun 07 '10 at 20:34
  • I was able to run MAT in a Linux box, this one is a 32-bits box, but looks like Linux is actually able to handle processes of 3GB (I used -Xmx3000m), I finally could parse the dump and now I'm able to analyze from Windows =) – Abel Morelos Jun 10 '10 at 14:47
1

It's going to difficult to analyze 1.5GB heap dump on a 3GB RAM. Because in that 3GB your OS, other processes, services,... easily would occupy 0.5 GB. So you are left with only 2.5GB. heapHero tool is efficient in analyzing heap dumps. It should take only 0.5GB more than the size of heap dump to analyze. You can give it try. But best recommendation is to analyze heap dump on a machine which has adequate memory OR you can get an AWS ec2 instance just for the period of analyzing heap dumps. After analyzing heap dumps, you can terminate the instance.