Analyzing a Heap Dump

Using VisualVM, you learned how to take heap dumps and make simple comparisons between them. That was the tip of the iceberg when it comes to JVM tooling. More advanced heap dumps can be captured with the jmap tool, and you can do an incredibly deep analysis with a tool called Eclipse Memory Analyzer (MAT).[55]

The jmap tool comes with the JDK. If you have the java command on your PATH, then you most likely have the jmap command too. jmap is preferable in environments where VisualVM cannot be used either because of networking constraints or because you’re trying to capture metrics for a process not started with the JMX services exposed.

Before giving jmap a try, start a JRuby server:

 $ ​​bin/puma​​ ​​-C​​ ​​config/puma.rb ...

Get Deploying with JRuby 9k now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.