Java garbage collection "real" time is much more than "user" + "system",

What a full gc looks like with a detailed gc, is

13463.547: [Full GC [PSYoungGen: 323053K->0K(325952K)]
           [PSOldGen: 653170K->331738K(655360K)] 976224K->331738K(981312K)
           [PSPermGen: 238715K->238715K(264448K)], 385.4631490 secs]
           [Times: user=2.19 sys=1.35, real=385.50 secs]

How can there be much more in real time than user + sys?

My first thought was that the garbage collector is waiting for a resource, but this resource does not seem to be IO or CPU, since the "top" output does not show problems with the CPU or memory when gc occurs.

+5
source share
2 answers

To get the full collection you need to stop all threads. (One of the reasons he calls the stop of the world collection)

, . "safepoint", .

, . ConcurrenntMarkSweep G1, .

+7

( ): Java 1.5 GC Internals.
, - Java 1.6 VM, , GC.
: JVM 1.6 Heap space
( , :(:/
, -, , - - Oracle)

, . , , . > 10%, , .
: LOC GC.
!:)

+1

All Articles