GCeasy -
We have used the Debugging tool, GCeasy in one of our projects to generate reports of performance in a particular way. GCeasy helped us to visualize the performance numbers in a better way.
Purpose to use GCeasy -
GC easy Log analyzer portal, which we will be using for report generation.
Why we use GCeasy -
We can use Garbage collection log analysis for the following purposes:
It is a wrapper Python script that generates graphs for visual inspections.
It captures the GC calls for the young generation, and old generation and metadata and gives a visual representation of each call, time spent, etc.
It also allows us to understand the memory-related performance throughout the test.
GC easy tool provides a rich set of Garbage collection, memory-related performance.
There are below Key Performance Indicators when it comes to Garbage Collection analysis:
1. Throughput
2. Latency (i.e. GC Pause time)
I. Throughput -
a. Throughput is the amount of productive work done by your application in a given period.
b. Let’s say your application runs for 60 minutes. In this 60 minutes let’s say 2 minutes is spent on GC activities. It means the application has spent 3.33% on GC activities (i.e. 2 / 60 * 100). It means application throughput is 96.67% (i.e. 100 – 3.33).
II.Latency –
This is the amount of time taken by one single Garbage collection event to run.
There is a paid version of this tool that can give you more detailed use of it.
How to Enable GC Logs
java –version <= 8
§-XX:+PrintGCDetails –Xloggc:<gc-log-file-path>
java –version >= 9
§-Xlog:gc*:file=<gc-log-file-path>
Steps to GC Logs
Zip the log files
zip -r gcLogFiles.zip gcLogFiles
Sign in to https://gceasy.io/
Upload the zip file to the GCeasy tool
A report will be generated, allowing you to explore graphs related to garbage collection (GC)
Below is an example to show what GCeasy dashboard steps look like.
When to measure
Measure at different phases during the test.
GC Behavior is a function of traffic, so measure at various points in tests for full disclosure.
When Performance Degrades - A sudden drop in performance may be due to inefficient GC, memory leaks, or excessive pause times.
You can look for Increased GC pause times, higher memory usage, and full GC frequency.
If you’ve made JVM tuning changes (e.g., heap size, GC algorithm), you’ll want to verify their impact on garbage collection.
To detect issues proactively and ensure the JVM is functioning optimally. Over time, memory consumption patterns can reveal problems like memory leaks.
Comments