Sometimes I see long pauses in my gc.log
2014-07-18T18:42:26.137+0400: 7846.980: [GC [PSYoungGen: 86267K->10032K(87744K)] 251198K-175254K(272512K), 0.
sync
here is the total time spent to reach a safepoint. In other words, it is the latency between the safepoint request and the moment when all runnable Java threads are finally blocked.
The safepoint synchronization may sometimes take too long due to one of the following reasons:
System.arraycopy()
, clone()
, ByteBuffer.get()
etc.MappedByteBuffer
I/O.To log the names of the threads that could not get blocked on a safepoint in 500 ms use
-XX:+SafepointTimeout -XX:SafepointTimeoutDelay=500