While debugging a production crash with huge Xms(24GB) and Xmx(30GB) sizes, we got a heap dump of 18GB to analyse for out of memory root cause. We were not having any big machines to run the MAT(Memory Analysis Tool) to analyse the heap dump and all the time we were getting out of memory in MAT itself in midway of analysis. While searching on google we got few good references like this but there also we found we have to put huge Xms and Xmx for MAT itself and our laptops were not well equipped to do so.
We had 8GB laptops to analyse a 18GB dump and we had to set garbage collection alogoritms to keep the MAT getting out of memory while running it in command line mode instead of GUI as it takes more memory to analyse.
Below are few steps which you need to follow to analyse the huge heap dumps with out Out of memory errors in MAT.
1. Download the latest MAT for here
2. cd to the MAT installation folder and open the MemoryAnalyzer.ini file and update below settings.
Note: Here we are using a 8GB laptop so settings are set accordingly. If you have higher configuration or lower you have to set the Xms and Xmx accordingly.