Java Memory Leak Analysis Tool: Step-by-step procedure to install Eclipse Memory Analyzer
I have been dealing with OutOfMemory Errors on SAP J2EE applications and have used a few tools to analyze the reasons for JVM crash. I have finally settled at using Eclipse Memory Analyzer Tool. A step-by-step tutorial to install Eclipse Memory Analyzer Tool was published earlier. The menu options have changed slightly on MAT 1.3 (the latest version available to-date). Here are the instructions for MAT 1.3:
Download required files to install Memory Analyzer
- Download Memory Analyzer from http://www.eclipse.org/mat/downloads.php
- If you are analyzing heap dump generated by SAP NetWeaver J2EE, download the Memory Analyzer Extension Pack zipped update site from https://www.sdn.sap.com/irj/scn/index?rid=/webcontent/uuid/c065b342-285c-2d10-559b-dffbb1aa5904 (requires access to SCN which is free). This update site contains information about SAP deployment locations. This file is not required if you are not analyzing an SAP application.
- If analyzing .phd files, download IBM's Diagnostic Tool Framework for Java zipped update site from ftp://ftp.software.ibm.com/software/java/support/tools/dtfj/dtfj-updatesite.zip This file is not required if you are analyzing .hprof files.
Extract and configure MAT
Decompress the zip file downloaded from eclipse.org (MemoryAnalyzer-1.3.0.20130517-win32.win32.x86.zip is the latest one available) and edit MemoryAnalyzer.ini to adjust -Xmx parameter.
Change it to a value suitable to the free memory available on the computer. This value will be the maximum heap size used by MAT.
If you are NOT analyzing heap dump generated by SAP application or any application running on IBM JVM, you can stop here and start using the MAT by running MemoryAnalyzer.exe
Select Help > Install New Software to add the new plugins
Click on Add to specify the archive site (zip file containing the extension)
Select the zip file by clicking on Archive
Click on Select All to choose the new update site (If you do not see anything under Name, deselect Group Items by Category)
Review the installation
Read the license and accept the terms if you agree to the usage terms (you can't proceed without accepting the license)
Accept warning
Restart MAT
If you are NOT analyzing heap dump generated by an application running on IBM JVM, you can stop here and start using the MAT, else continue with installation of IBM DTFJ extension
That's it! The tool is now ready to help you.
Change it to a value suitable to the free memory available on the computer. This value will be the maximum heap size used by MAT.
If you are NOT analyzing heap dump generated by SAP application or any application running on IBM JVM, you can stop here and start using the MAT by running MemoryAnalyzer.exe
Add SAP Memory Analyzer extension
The SAP provided extension provides information on what the classes and methods are referring to in terms of SAP application. This SAP specific application knowledge helps in quickly concluding the reason for OOM error.Select Help > Install New Software to add the new plugins
Click on Add to specify the archive site (zip file containing the extension)
Select the zip file by clicking on Archive
Click on Select All to choose the new update site (If you do not see anything under Name, deselect Group Items by Category)
Review the installation
Read the license and accept the terms if you agree to the usage terms (you can't proceed without accepting the license)
Accept warning
Restart MAT
If you are NOT analyzing heap dump generated by an application running on IBM JVM, you can stop here and start using the MAT, else continue with installation of IBM DTFJ extension
Add IBM DTFJ extension
Follow the same steps as above, but choose the IBM DTFJ zip file this time to install the required extension.That's it! The tool is now ready to help you.
Comments
Post a Comment