JVisualVM and Eclipse Memory Analyzer a Java Dev Tools

JVisualVM is an open source software to analyze CPU Usage / Memory Usage in real time of a JVM application.

Eclipse Memory Analyzer is an open source software to analyze memory leaks. By passing the Java heap dump this tool will help to pinpoint where is the memory leaks and producing the report which aids developers to fix the bugs.

I am experienced using Eclipse Memory Analyzer along with JVisualVM in a production environment. Last time the production server will went down after running one weeks without any signs. We couldn’t find any clues how the system went down. We then used JVisualVM to monitor the JVM based application server. We got the memory and CPU usage in real time. Then when the server was went down, we quickly open JVisualVM and generate heap dump file. We then passed this heap dump feed into Eclipse Memory Analyzer. After that, Memory Analyzer will tell us where is the memory leaks, which Java object/instances eating up most spaces, then we know how to solve the problem. Finally, after the fix, no more server went down issue.

Additional note, I experienced solved a memory leaks issues on an Apache Tomcat. Technically, in order to enable JVisualVM Monitoring on Apache Tomcat, we need to enable JMX Port in Apache Tomcat conf/server.xml setting. Then open JVisualVM to connect to this JMX Port. Enable JVisualVM Monitoring via JMX on production server is safe as this will not degrade server performance. Same can applies to other JVM based application. This is proven by industry standard. So I strongly recommends.

JVisualVM: http://docs.oracle.com/javase/6/docs/technotes/tools/share/jvisualvm.html

Eclipse Memory Analyzer: http://www.eclipse.org/mat/

Feel free contact me if you need any expertise suggestions.

Author: fyhao

Jebsen & Jessen Comms Singapore INTI University College Bsc (Hon) of Computer Science, Coventry University

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.