views:

430

answers:

2

I turned on verbose GC options on my JDK, and now I'm seeing lines such as

25.598: [CMS-concurrent-sweep-start]
25.622: [CMS-concurrent-sweep: 0.023/0.024 secs] [Times: user=0.02 sys=0.00, real=0.03 secs]
25.623: [CMS-concurrent-reset-start]
25.629: [CMS-concurrent-reset: 0.007/0.007 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]

Anyone care to tell me exactly what all the parameters there mean?

  1. What's the difference between sys+user and real times?
  2. What does "0.023/0.024 secs" mean?
+2  A: 

I think it's just related to CPU usage..

  1. real is the absolute difference of time between end and start (not excluding context switches)
  2. user is how much time is spent while executing code in user space
  3. sys is how much time is spent while execting system code (eg. system calls or everything else that moves control from user code to kernel code)

A note: while real doesn't represent effective time (because of including also time in which GC goes away from CPU to let it to something else) sys+user does.

EDIT

CMS-concurrent-sweep is the phase in which GC actually cleans useless objects (it's done after the marking phase). In this case it's concurrent because GC works together with application without pausing it and time should be time used (maybe time-start / time-end, not sure about that)

Jack
Do you know what the two numbers next to the GC's name represent?
ripper234
where are you talking about exactly? Which numbers?
Jack
+1  A: 

As per http://www.sun.com/bigadmin/content/submitted/cms%5Fgc%5Flogs.html , the two numbers 0.023/0.024 are CPU/wall times.

Xepoch