Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to read a verbose:GC output?

70.222: [GC [PSYoungGen: 131072K->15437K(152896K)] 131072K->15509K(502464K), 0.0228420 secs] [Times: user=0.09 sys=0.01, real=0.02 secs]

like image 921
Gourabp Avatar asked May 28 '13 14:05

Gourabp


People also ask

How do you read verbose GC logs?

The “Times” section of the detailed log contains information about the CPU time used by the GC, separated into user space (“user”) and kernel space (“sys”) of the operating system. Also, it shows the real time (“real”) that passed while the GC was running.

What is verbose GC?

Verbose garbage collection (verboseGC) is a setting in the Java Virtual Machine configuration of a WebSphere server type, such as a Deployment Manager or Application Server, which controls whether a server JVM will log Garbage Collector diagnostic data in a manner specific to WebSphere Application Server.

How do I enable verbose GC?

On the Configuration tab, under Server Infrastructure, expand Java and Process Management, and click Process Definition. Under the Additional Properties section, click Java Virtual Machine. Check the Verbose Garbage Collection check box.


2 Answers

You can find tutorials on interpreting verbose GC output eg. in:

  • verbosegc output tutorial - Java 7
  • Heap settings and reading verbose GC output

Looking at verbosegc output tutorial - Java 7, you can see YoungGen space analysis:

UPDATE 03/27/2014: The "Collection time (secs)" is actually a Timestamp showing the when the GC occurred. The Collection times are reported as Times=user=0.45 sys=0.01, real=0.14 secs].

enter image description here

Here, the 262208K->137900K(100428K) means Java Heap before GC-> Java Heap after GC (Total Size of the Java Heap).

And, OldGen space analysis:

enter image description here

like image 137
Aleš Avatar answered Oct 16 '22 18:10

Aleš


In Addition to other answer , I am explaining Times section of log

[Times: user=0.09 sys=0.01, real=0.02 secs]

The “Times” section of the detailed log contains information about the CPU time used by the GC, separated into user space (“user”) and kernel space (“sys”) of the operating system.Also, it shows the real time (“real”) that passed while the GC was running.

In your case the CPU time (0.09 sec) is considerably higher than the real time passed (0.02 Sec), we can conclude that the GC was run using multiple threads.

Detailed Example

like image 44
Vipin Avatar answered Oct 16 '22 18:10

Vipin