9

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!

snow8261
  • 939
  • 2
  • 14
  • 34

7 Answers7

9

A picture can tell a thousand words. It will be a lot easier to interpret your GC logs visually. I've found GCViewer very useful in the past, including its references to related topics.

radimpe
  • 3,197
  • 2
  • 27
  • 46
6

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

Ref: Java Garbage Collection Log messages

Community
  • 1
  • 1
bchetty
  • 2,231
  • 1
  • 19
  • 26
3

I would use a graphical tool to analyze the file. It's difficult to extract conclusions from raw data. See Know of any garbage collection log analysis tools?

Community
  • 1
  • 1
fglez
  • 8,422
  • 4
  • 47
  • 78
2

An excellent whitepaper on memory management in HotSpot JVM will answer most of the questions you might have on the topic.

Alexander Pavlov
  • 31,598
  • 5
  • 67
  • 93
1

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.

Jim T
  • 101
  • 4
1

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

Ishara Samantha
  • 393
  • 4
  • 8
0

https://jxray.com/ is one of the best out there that I used, as it can provide some additional metrics and automatically roll up some commonly found metrics into actionable insights -

Unlike most other tools, JXRay proactively looks for all kinds of known, well understood Java memory problems and gives you concrete, actionable findings. These results are carefully aggregated, so that all bad objects managed by the same code are clearly visible. Thus, you see immediately what code you need to change to save the maximum amount of memory.

Tagar
  • 13,911
  • 6
  • 95
  • 110