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 the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.