Sunday, August 24, 2008

Graphing Java Garbage Collection part 1 - using IBM's Memory Visualizer

Graphing Garbage Collection (GC) has always been tough. Since you need to see each entry, SiteScope is useless do to its periodic collection method. In fact, there are very few tools which will analyze it and even fewer which will graph it out. For the past few years, myself as well as many others have come up with custom tools to do this parsing and report generation. However, it is difficult to find the time to maintain the scripts. When the transition to WebSphere 6.1 broke all our automation ... again, it was time to look around again to see if there was another tool.

It had been awhile since I had looked at IBM's tool. I think the initial version (it might have even been a different tool) only parsed IBM's JVM and didn't parse Sun's (IBM's version of Java on Solaris is just Sun's with an additional library vs. a totally different version for Z/OS). A few years and versions later I remember having to load a library depending on what version of WebSphere I had (this could have also been a different tool). This was again cumbersome and since my automation worked well, I didn't pay much attention to it.

Now we have IBM's ISA version 4 and MV version 2. The tool is still quirky (after all it is written in Java), but it is by far the best (only?) tool I've seen that can parse and graph GC data for Sun's JVM. Hopefully this post will help navigate you through its quirkiness so you can overlook its obvious design faults.


If you've never analyzed GC Data before:
  • Make sure the JVM has the following arguments set: -XX:+PrintGCTimeStamp -XX:+PrintGCDetails. This prints out a timestamp for each GC based off of when the server was started (yeah, I know this is weird, but there is no option to do system time) and the details of the three generations of memory

  • Download the nativestdout.log from your app server. This is where all the data from the settings will be dumped out to.



  1. First Install IBM's ISA Tool and the accompanying Add-on for the Memory Visualizer.

  2. Open up ISA:

  3. Click: Analyze Problem

  4. Click browse, Select "Remote Artifact Browse" and find the log file. (More quirkiness. It may take several minutes - not exaggerating - for you to navigate to your folder so make sure it isn't too deep or copy the path into the textbox which might not work.)

  5. Now you can begin analyzing the log - see next post!

Thursday, August 21, 2008

Installing IBM Support Assistant and performance tools

  1. Download and install IBM's ISA framework
  2. Open up ISA and go to Update > "Find New.." > Tools Add-ons



  3. Select "IBM Monitoring and Diagnostic Tools for Java - Garbage Collection and Memory Visualizer" and "IBM Thread and Monitor Dump Analyzer for Java (Tech Preview)." Click Next through the remaining screens. It will ask you to restart itself.