Tip of the day: analyzing big heap dumps

Our users sometimes try to analyze a big heap dump (say 30G) on a machine, typically their laptop, that has a much smaller RAM (say 8G). Unfortunately, for most heap dumps that doesn’t work: JXRay fails with an OutOfMemoryError. That’s sad but true: not just JXRay, but all tools for advanced heap dump analysis (Eclipse MAT, YourKit, VisualVM…) require, in the average case, the same amount of memory as the heap dump size, and preferably more. The amount of data that the tool needs to keep in memory to be able to quickly navigate the dump, and to accumulate the results of analysis, is not small and proportional to the dump size.

However, let’s ask ourselves: where do those big dumps come from? Most of the time, they are from the big servers at your company. And if a server generated a 30G dump, then its RAM is at least as big, and often (much) bigger, isn’t it?

Thus, here is a natural solution. Since JXRay is a batch tool, takes very little space itself and doesn’t require complex installation, you can easily do the following: scp jxray.zip to the server, unzip it, analyze your big heap dump and scp back the HTML file generated by JXRay. Bingo!

One possible complication here is that the server may run behind a firewall, that may prevent JXRay from contacting its license server. Here are the solutions:
1. Buy a permanent license. With a permanent license, JXRay doesn’t need to talk to the license server.
2. Email us at info@jxray.com. For a small fee, we will provide you with a workaround that will allow you to run JXRay for a few days. After that, if you decide to continue using it, you will need to buy a permanent license.

We hope that big heap dumps will never be a problem for you anymore!

Leave a Reply

Your email address will not be published. Required fields are marked *