Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java GC log analysis

I am new to gc log.

What is the meaning of the following gc log. Does it imply some useful information?

16960.890: [GC [PSYoungGen: 111960K->36400K(523584K)] 845053K->770190K(1286720K), 0.0270419 secs] [Times: user=0.13 sys=0.00, real=0.03 secs] 
16960.917: [Full GC (System) [PSYoungGen: 36400K->0K(523584K)] [PSOldGen: 733789K->714479K(763136K)] 770190K->714479K(1286720K) [PSPermGen: 34154K->34154K(38208K)], 1.0982179 secs] [Times: user=1.09 sys=0.00, real=1.09 secs] 

what does PSYoundGen mean? what does the Full GC line mean? i search it in google ,but does not understand it clearly. thanks for the reply!

like image 710
snow8261 Avatar asked Feb 24 '12 13:02

snow8261


People also ask

What is GC log in Java?

GC Logging Options in Java 9 and Newer This will turn on debug level logging for the garbage collection phases for the default G1 garbage collector on Java 10.

How do you Analyse verbose GC logs?

To help you visualize and analyze the GC, you can feed verbose GC log files into various diagnostic tools and interfaces. Examples include tools such as Garbage Collection and Memory Visualizer (GCMV) and online services such as GCEasy.


3 Answers

Try Online GC Log analyzer , This is based on GC Viewer http://gcloganalyzer.com

like image 91
Ishara Samantha Avatar answered Oct 15 '22 17:10

Ishara Samantha


PSYoungGen refers to the garbage collector in use for the minor collection. PS stands for Parallel Scavenge.

Ref: Java Garbage Collection Log messages

like image 26
bchetty Avatar answered Oct 15 '22 17:10

bchetty


GC logs are vital artifacts to troubleshoot memory/CPU related problems and optimize applications performance.

Enable java 9 GC Logs

To enable GC logging in Java 9, a new system property has been introduced. You need to pass this system property during application startup:

-Xlog:gc*:file=

Example:

-Xlog:gc*:file=/tmp/logs/gc.log

Tools to analyze

GC log format is completely changed in Java 9. To analyze Java 9 GC logs, it’s highly recommended to use GC log analysis tools like GCeasy, HPJmeter. These tools parse java 9 GC logs and generate great graphical visualizations of the data, reports Key Performance Indicators and several other useful metrics.

like image 32
Jim T Avatar answered Oct 15 '22 17:10

Jim T