Skip to content

Fork of tagtraum industries' GCViewer. Tagtraum stopped development in 2008, I aim to improve support for Sun's java 1.6 garbage collector logs (mainly CMS and G1 collector)

License

Notifications You must be signed in to change notification settings

ludovicc/GCViewer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Readme $Id: $

GCViewer 1.31
=============

GCViewer is a little tool that visualizes verbose GC output
generated by Sun, IBM, HP and BEA Java Virtual Machines.

You can start GCViewer by simply double-clicking on gcviewer-1.3x.jar
or running java -jar gcviewer-1.3x.jar


Supported verbose:gc formats are:

- Sun JDK 1.6 with option -Xloggc:<file> [-XX:+PrintGCDetails] [-XX:+PrintGCDateStamps]
- Sun JDK 1.4/1.5 with the option -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 -XX:+PrintGCDateStamps

Hendrik Schreiber wrote GCViewer up to 1.29. What you are seeing here is based 
on his very good work.
In detail descriptions of most JVM parameters relevant to garbage collection
can be found at http://www.tagtraum.com/gcviewer-vmflags.html


GCViewer shows a number of lines etc. These are:

- Full GC Lines:
     o Black vertical line at every Full GC
- Inc GC Lines:
     o Cyan vertical line at every Incremental GC
- GC Times Line:
     o Green line that shows the length of all GCs
- GC Times Rectangles:
     o Dark grey rectangle at every Full GC
     o Light grey rectangle at every Incremental GC
     o Grey rectangle at every 'normal' GC
- Total Heap:
     o Red line that shows heap size
- Tenured Generation:
     o Magenta area that shows the size of the tenured
       generation (not available without PrintGCDetails)
- Young Generation:
     o Orange area that shows the size of the young
       generation (not available without PrintGCDetails)
- Used Heap:
     o Blue line that shows used heap size


Metrics
=======

GCViewer provides some metrics to help you interpret the graph.
Note that some metrics based on averages are shown along with
their standard deviation. If it is obvious that the standard
deviation is fairly big in comparison to the average, the values
are grayed out, indicating that actual values are much smaller
or bigger than the average.

Summary
-------

- Footprint:
     o Maximal amount of memory allocated
- Freed Memory:
     o Total amount of memory that has been freed
- Freed Mem/Min:
     o Amount of memory that has been freed per minute
- Total Time:
     o Time data was collected for (only Sun 1.5/1.4/1.2.2 and
       IBM 1.3.1/1.3.0/1.2.2)
- Acc Pauses:
     o Sum of all pauses due to GC
- Throughput:
     o Time percentage the application was NOT busy with GC
- Full GC Performance:
     o Performance of full collections. Note that all collections
       that include a collection of the tenured generation or
       are marked with "Full GC" are considered Full GC.
- GC Performance:
     o Performance of minor collections. These are collections
       that are not full according to the definition above.

Memory
------

- Total heap (min / max):
     o Minimal / Maximal amount of memory allocated (max is same as "footprint" in Summary)
- Tenured heap (min / max):
     o Minimal / Maximal amount of memory allocated in tenured space
- Young heap (min / max):
     o Minimal / Maximal amount of memory allocated in young space
- Perm heap (min / max):
     o Minimal / Maximal amount of memory allocated in permanent space
- Avg after full GC:
     o The average heap memory consumption after a full collection
- Avg after GC:
     o The average heap memory consumption after a minor collection
- Freed Memory:
     o Total amount of memory that has been freed
- Freed by full GC:
     o Amount of memory that has been freed by full collections
- Freed by GC:
     o Amount of memory that has been freed by minor collections
- Avg freed full GC:
     o Average amount of memory that has been freed by full
       collections
- Avg freed GC:
     o Average amount of memory that has been freed by minor
       collections
- Avg rel inc after FGC:
     o Average relative increase in memory consumption between full
       collections. This is the average difference between the
       memory consumption after a full collection to the memory
       consumption after the next full collection.
- Avg rel inc after GC:
     o Average relative increase in memory consumption between minor
       collections. This is the average difference between the
       memory consumption after a minor collection to the memory
       consumption after the next minor collection. This can be used
       as an indicator for the amount of memory that survives
       minor collections and has to be moved to the survivor spaces
       or the tenured generation. This value added to "Avg freed GC"
       gives you an idea about the size of the young generation in case
       you don't have PrintGCDetails turned on.
- Slope full GC:
     o Slope of the regression line for the memory consumption after
       full collections. This can be used as an indicator for the
       increase in indispensable memory consumption (base footprint)
       of an application over time.
- Slope GC:
     o Average of the slope of the regression lines for the memory
       consumption after minor collections in between full collections.
       That is, if you have two full collections and many minor
       collections in between, GCViewer will calculate the slope for
       the minor collections up to the first full collection, then the
       slope of the minor collections between the first and the second
       full collection. Then it will compute a weighted average (each
       slope wil be weighted with the number of measuring points it was
       computed with).

Pause
-----

- Acc Pauses:
     o Sum of all pauses due to any kind of GC
- Number of Pauses:
     o Count of all pauses due to any kind of GC
- Avg Pause:
     o Average length of a GC pause of any kind
- Min / max Pause:
     o Shortest /longest pause of any kind
- Avg pause interval:
     o avg interval between two pauses of any kind
- Min / max pause interval:
     o Min / max interval between two pauses of any kind

- Acc full GC:
     o Sum of all pauses due to full collections
- Number of full GC pauses:
     o Count of all pauses due to full collections
- Acc GC:
     o Sum of all full GC pauses
- Avg full GC:
     o Average length of a full GC pause
- Min / max full GC pause:
     o Shortest / longest full GC pause
     
- Acc GC:
     o Sum of all pauses due to minor collections
- Number of GC pauses:
     o Count of all pauses due to minor collections
- Avg GC:
     o Average length of a minor collection pause
- Min / max GC pause:
     o Shortest / longest minor GC pause


Notes
=====

This is not a perfect tool. However, GCViewer can help you
getting a grip on finding out what's going on in your application
with regards to garbage collection.

Here are some known limitations.


IBM JDKs
--------

If you have problems with the IBM format, please check that
every line of information is really in one line and not wrapped.

The IBM format actually provides a lot more information than is
visualized.


Sun JDK 1.3.1/1.4 with -verbose:gc
----------------------------------

Sun JDK 1.3.1/1.4 with -verbose:gc does not provide a timestamp.
Therefore values like 'Total Time', 'Throughput', and 'Freed Mem/Min'
cannot be calculated.


Sun JDK 1.5 (a.k.a. Java 5)
---------------------------

-XX:+UseConcMarkSweepGC: The concurrently collected garbage is not
correctly reflected in the data panel.


Sun JDK 1.6 (a.k.a. Java 6)
---------------------------

G1 collector sometimes mixes concurrent events with stop the world collections.
In a few cases the parser can recover from such mixed lines, often it can't and
will show an error message.

-XX:+UseConcMarkSweepGC: The concurrently collected garbage is not
correctly reflected in the data panel.


BEA JRockit 1.4.2/1.5
---------------------

Concurrently collected garbage may not be reflected correctly in the
data panel.


Export formats
--------------

The CSV format is quite useful for importing the data to a
spreadsheet application. However, it does not export all
data.


Internationalization
--------------------

Provided are a German, an English and a Swedish localStrings.properties
file. If someone feels the need to translate these to another
language, please do so. I will be more than glad, to include it
in a future version of this tool.


Start of log / absolute times
-----------------------------

If you happen to know when the application and GC log was started, you
can specify this time by right-clicking on the time ruler and entering
a start time.
Sun VMs: IF -XX:+PrintGCDateStamps was used, the proposed start time is 
read from the gc log file.

Bug reports
-----------

To file a bug report, please open an issue on 
https://github.com/chewiebug/GCViewer/issues or send me an email with a 
description of the error, the name of the JVM that produced the GC data 
and all used flags along with a sample GC log file.


Building GCViewer from Source
-----------------------------

Download and install Maven3 from http://maven.apache.org/
Download the src distribution of GCViewer.
Execute from the GCViewer base directory (same as pom.xml):

    mvn clean install

The executable jar will be placed in the target directory.


Enjoy!

Joerg Wuethrich
https://github.com/chewiebug/GCViewer
jwu@gmx.ch

About

Fork of tagtraum industries' GCViewer. Tagtraum stopped development in 2008, I aim to improve support for Sun's java 1.6 garbage collector logs (mainly CMS and G1 collector)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published