GCViewer
[enlarge]
GCViewer is a free open source tool to visualize data produced by
the Java VM options -verbose:gc
and -Xloggc:<file>.
It also calculates garbage collection related performance
metrics (throughput, accumulated pauses, longest pause, etc.).
This can be very useful when tuning the garbage collection of a particular
application by changing generation sizes or setting the initial
heap size. See here for a useful
summary of garbage collection related JVM parameters.
For more information on tuning garbage collection on Sun JVMs, take
a look at the documentation provided by Oracle.
Supported Formats
- Sun JDK 1.4/1.5 with the options
-Xloggc:<file> [-XX:+PrintGCDetails] - Sun JDK 1.2.2/1.3.1/1.4 with the option
-verbose:gc - IBM JDK 1.3.1/1.3.0/1.2.2 with the option
-verbose:gc - IBM iSeries Classic JVM 1.4.2 with
option -verbose:gc - HP-UX JDK 1.2/1.3/1.4.x with the option
-Xverbosegc - BEA JRockit 1.4.2/1.5 with the option
-verbose:memory
Best results are achieved with: -Xloggc:<file>
-XX:+PrintGCDetails
Data Export
GCViewer can also export the data in CSV (comma separated values) format, which may easily be imported into spreadsheet applications for further processing.
Contribute/Newer Versions
I have stopped improving GCViewer in 2008, however, there is a current fork by Jörg Wüthrich at https://github.com/chewiebug/GCViewer that aims at improving compatibility with current JVMs.
Miscellaneous
GCViewer has been developed with J2SE 1.4 and is licensed under LGPL.
The icons used were created and are copyrighted by Dean S. Jones, www.gallant.com/icons.htm
To find out more about how to use GCViewer, please read the article published in Jack Shirazi's performance newsletter.
Other GC related Tools and Links
- VMFlags - Summary of parameters for IBM and Sun JVMs
- visualgc - Part of Sun's jvmstat.
- GCPortal - Article and tool.
- IBM Garbage Collection and Storage Allocation Techniques - Comprehensive document about the IBM garbage collector.
- Tuning Whitepaper - Sun's Java Tuning Whitepaper
- List of Java 6 -XX options - Very short description of each option