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:
- The application does not receive enough CPU time because the OS is busy with intensive disk I/O or when it starts swapping or when another high-priority process takes all CPU time.
- Some Java thread performs long non-interruptible operation, e.g. copies large amount of data using
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
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…