Application troubleshooting is always exciting and challenging. However, if you were not equipped with required tools, then it would be frustrating.
If you are working on WebSphere then most of the time during project phase, you need to spend troubleshooting and tweaking application performance.
Most of the time for performance-related issue, you will work with a developer, and you will be asked to take the heap dump for analysis.
There are various ways to take a heap dump. If you are wondering how to take in WebSphere, then this guide will help you.
Once you have the heap dump, you need to analyze, and unfortunately, you can’t open that in notepad, so you got to use the tools. But don’t worry following tools will help you to read the heap dump file for analysis.
They are all FREE!
HeapAnalyzer by IBM helps you to find the possible Java heap leak area, and you can download from here.
- Once downloaded the jar file, you can run them like below.
java -Xmx4g -jar ha456.jar
- It will open the Analyzer. To open the heap dump, Go to File >> Option and select the heap dump. Based on file size, it may take few seconds and then give you summary view.
The quickest way to suspect for any leak would be:
- Go to Analysis menu >> Analysis view
If no leak found then, it will display something like this.
So go ahead and try out the various options under “Analysis” to get familiar with the tool.
Eclipse Memory Analyzer (MAT)
MAT analyze heap dump with hundreds of millions of objects, and it’s fast. Quickly check the suspected leaks and run excellent graphical reports in a minute.
MAT by default doesn’t support WebSphere generated heap dump, so you need to use the plugins.
- Once downloaded MAT, you can open by executing
- To analyze heap dump file, Go to File >> Open Heap Dump and select the file
- It will take few seconds and prompt “Getting Started Wizard.”
You can select whatever you want and click on Finish. Ah, it found two leak suspects.
MAT is very powerful and can analyze some metrics.
- Top consumers by biggest objects
- Biggest top-level dominator classes
- Biggest top-level dominator packages
- Threads overview
- Heap Dumps overview
If you are using another J2EE application server, then you may use VisualVM to analyze the heap dump.
You may also be interested in learning about Java memory management.
More great readings on WebSphere
What is Thread Dump and How to Analyze them?Asad Ali on June 29, 2020
IBM WebSphere Application Server Beginner’s GuideChandan Kumar on June 9, 2022
How to Monitor IBM WebSphere using Application Manager?Chandan Kumar on June 9, 2022
How to Use Nginx with WebSphere Application Server?Chandan Kumar on June 9, 2022
How to Create Cluster in IBM WebSphere ND?Chandan Kumar on June 9, 2022
What’s New in WebSphere MQ 9 & Installation GuideChandan Kumar on June 10, 2022
Join Geekflare Newsletter
Every week we share trending articles and tools in our newsletter. More than 10,000 people enjoy reading, and you will love it too.