Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do 'real', 'user' and 'sys' mean in the java CMS gc log?

For the following Java version:

OpenJDK version "1.6.0"
OpenJDK Runtime Environment (build 1.6.0-b23)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)

With the folllowing GC flags:

-verbose:gc
-XX:+UseConcMarkSweepGC
-XX:+CMSClassUnloadingEnabled
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps

We get log lines like:

2012-11-09T16:46:53.438-0100: [CMS-concurrent-mark: 4.039/4.060 secs] [Times: user=4.09 sys=35.05, real=4.06 secs]

The initial "4.039/4.060 secs" should according to https://blogs.oracle.com/poonam/entry/understanding_cms_gc_logs mean that concurrent marking took total 4.039 seconds cpu time and 4.060 seconds wall time (that includes the yield to other threads also).

But what do the user, sys and real values mean here?

like image 504
fornwall Avatar asked Nov 09 '12 15:11

fornwall


1 Answers

  1. The sys and user are CPU times exclusively. Consequently they do not include the time that the process is blocked for CPU or is doing I/O etc.

  2. The GC time should generally be similar to the sys+user time but if the process is blocked or waiting then it would be higher. This would be true for a serial collector and a single processor box. However, in the multiprocessor environments (with parallel collectors), the GC time would be lesser than the sys+user time since there are multiple CPUs.

  3. The real time would be similar to the GC time.

like image 98
Khanna111 Avatar answered Oct 04 '22 04:10

Khanna111