Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recommendations for a heap analysis tool for Java? [closed]

People also ask

Which tool is specially designed for analyzing Java heap dumps?

The recommended tool is IBM Monitoring and Diagnostic Tools for Java - Memory Analyzer. Note that heap dumps are platform agnostic and can be analysed on any platform regardless of where they were created.

How do you Analyse a Java heap dump?

Eclipse Memory Analyzer Tool ( MAT ) is used for analyzing heap dump files ( see Capturing heap dumps before FullGCs to troubleshoot memory problems ) which contain objects in memory. Each heap dump file can be thought of as a snapshot in time and details the memory occupied by specific JVM threads.

How do you do heap memory analysis?

Open the heap dump in Eclipse Memory Analyzer using the option File --> Open Heap Dump. First, it will prompt you to create a leak suspect report. The user can create it or skip it. The "overview" tab of the memory analyzer will show the total size of the heap and a pie chart of object size.

When should I take a heap dump?

A heap dump is a snapshot of all the objects that are in memory in the JVM at a certain moment. They are very useful to troubleshoot memory-leak problems and optimize memory usage in Java applications. Heap dumps are usually stored in binary format hprof files.


Eclipse Memory analyzer http://www.eclipse.org/mat/

  • Support for multiple JVMs
  • Help with identifying sources for memory leaks (see http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/6856)
  • Open source and actively developed by major vendors (SAP and IBM)
  • Part of Galileo release of Eclipse

Java VisualVM, jvisualvm, included with the JDK. A pathologic Swing program is examined here.


YourKit : http://www.yourkit.com/

Pros:

  • The interface is clean and it's fast
  • It opened a large 5-gig heap dump where jProfiler grined to a halt. And it only needed 1-2 gigs of JVM ram to do so.

Cons: Of course... it's not free :(


BHeapSampler http://dr-brenschede.de/bheapsampler/

  • generates a class-level heap-graph as a really intuitive display of the dominant memory structures
  • can process really large heap dumps
  • command-line tool, usable on server side without transfering the dump to the developer's desk