About Pierre Hugues Charbonneau

Pierre-Hugues Charbonneau (nickname P-H) is working for CGI Inc. Canada for the last 10 years as a senior IT consultant. His primary area of expertise is Java EE, middleware & JVM technologies. He is a specialist in production system troubleshooting, root cause analysis, middleware, JVM tuning, scalability and capacity improvement; including internal processes improvement for IT support teams. P-H is the principal author at Java EE Support Patterns.

GC Memory Visualizer Tutorial – Part1

As you may have read from past articles, one of the key Java programmer skills to acquire is your ability to understand and assess the health of the JVM such as the Java heap memory footprint along with the garbage collection process.

In order to achieve the above goals, all JVM vendors (Oracle, IBM…) provide, via the verbose:gc parameter, a way to generate and log the runtime JVM & GC activity. That being said, this does not mean that you will have to analyze raw GC data forever. Monitoring and log analyzer tools have emerged over the past years allowing us to better “visualize” the complexity of the JVM runtime processing.

This article is the first of a series that provides you with a tutorial on how to get started and take advantage of the IBM Garbage Collection and Memory Visualizer. Future articles will cover in more detail the different GCMV features via examples and problem simulations.

JVM fundamentals

If you are not familiar with the JVM principles and the different naming conventions, I first recommend that you go through the articles below. Improving your Java and JVM troubleshooting skills is like building a house: build a solid foundation and structure first before focussing on the finishing work.

GC and Memory Visualizer – Tool overview

GCMV is essentially a free tool, developed by IBM, which allows you to “visualize” and analyse the JVM memory usage and garbage collection activity of your Java application(s). Its reporting and data visualisation features are extremely useful to understand the Java heap memory footprint trend of your application over time and can help detect problems such as memory leaks.

Step 3 – Load and visualize your first JVM GC log sample

Now browse through your computer and select the desired GC log. The parsing and analysis process will now begin…

Once the parsing process is completed, you will see a graphical view of the GC data along with many other options.

The utilization of the different Java heap memory spaces can be found on the left side. The GCMV recommendations can be found under the graph via the Report tab.

* NOTE: instructions on how to obtain the verbose:gc logs from your JVM runtime environment can be found here.

I hope you enjoyed this short tutorial on how getting started with the IBM GCMV tool. The next article will cover in more detail a few classic JVM problem patterns such as memory leaks. In the meantime, I recommend that you load any GC log you may have from your application and start to get familiar with the different features of GCMV. Please feel free to comment or ask any question.

I will release the part #2 to JCG in about one week. It will includes real life scenarios like analyzing a true tenured space memory leak using GCMV.

For your situation, it is possible that the log sample did not contain enough data for GCMV to come up with recommendations. Please try to capture more data the next time and see if you get better results.

Newsletter

Join them now to gain exclusive access to the latest news in the Java world, as well as insights about Android, Scala, Groovy and other related technologies.

Email address:

Recent Jobs

No job listings found.

Join Us

With 1,240,600 monthly unique visitors and over 500 authors we are placed among the top Java related sites around. Constantly being on the lookout for partners; we encourage you to join us. So If you have a blog with unique and interesting content then you should check out our JCG partners program. You can also be a guest writer for Java Code Geeks and hone your writing skills!

Disclaimer

All trademarks and registered trademarks appearing on Java Code Geeks are the property of their respective owners. Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries. Examples Java Code Geeks is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.