HubSpot/gc_log_visualizer

Name: gc_log_visualizer

Owner: HubSpot

Description: Generate multiple gnuplot graphs from java gc log data

Created: 2015-08-13 17:18:32.0

Updated: 2018-01-19 03:20:36.0

Pushed: 2016-05-02 18:48:18.0

Homepage: null

Size: 60

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Run a gc.log through gnuplot for multiple views of GC performance

The python script gc_log_visualizer.py will use gnuplot to graph interesting characteristics and data from the given gc log.

The shell script regionsize_vs_objectsize.sh will take a gc.log as input and return the percent of Humongous Objects that would fit into various G1RegionSize's (2mb-32mb by powers of 2).

regionsize_vs_objectsize.sh <gc.log>
86 humongous objects referenced in <gc.log>
% would not be humongous with a 2mb g1 region size
% would not be humongous with a 4mb g1 region size
0% would not be humongous with a 8mb g1 region size
0% would not be humongous with a 16mb g1 region size
0% would not be humongous with a 32mb g1 region size
How to run

The start and end dates are optional and can be any format gnuplot understands. The second argument will be used as the base name for the created png files.

thon gc_log_visualizer.py <gc log> <optional output file base name> <optional start date/time, fmt: 2015-08-12:19:36:00> <optional end date/time, fmt: 2015-08-12:19:39:00>
thon gc_log_visualizer.py gc.log
thon gc_log_visualizer.py gc.log.0.current user-app
thon gc_log_visualizer.py gc.log 3minwindow 2015-08-12:19:36:00 2015-08-12:19:39:00
gc log preparation

The script has been run on ParallelGC and G1GC logs. There may be some oddities/issues with ParallelGC as profiling it hasn't proven overly useful.

The following gc params are required for full functionality.

X:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintAdaptiveSizePolicy
required python libs

The python libs that are required can be found in the setup.py and handled in the usual manner.

ter a virtualenv or not
install -r requirements.txt
gnuplot

The gc.log is parsed into flat files which are then run through gnuplot.

osx
ew install gnuplot
ew unlink libjpeg
ew install libjpeg
ew link libjpeg
Examples

Line charts of generation sizes and total, bar for InitiatingHeapOccupancyPercent (in Mb), reclaimable amount per mixed gc event.

example of main chart with InitiatingHeapOccupancyPercent and reclaimable

Another example of the same chart but with the InitiatingHeapOccupancyPercent set below working set, which results in lots of mixed gc events shown as the reclaimable squares.

example of unhealthy main chart with InitiatingHeapOccupancyPercent and reclaimable

To-space exhaustion from traffic bursts on cache expiration events. Solution: use stampeding herd protection.

example of to-space exhaustion

This visualization of humongous objects shows the sizes in KB, as well as the vertical groupings that have the potential to cause to-space exhaustion.

example of humongous objects


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.