對於上下文:我們在垃圾收集方面遇到了一些問題,我們發現它需要 15-40 秒,在此期間應用程式處於「暫停」狀態。
這是我們在垃圾收集日誌中看到的內容“Times: user=0.04 sys=0.00, real=14.54 sec”
事實上,用戶/系統時間非常小而實際時間很大,(我認為)這意味著垃圾收集行為花費了很短的時間,但由於某種原因應用程式正在等待線程到達安全點。我們已經設法在這些暫停之一期間獲得線程轉儲,我希望有人能夠闡明我在這裡看到的內容:
"AsyncAppender-Worker-JVM_ASYNC" #25 daemon prio=5 os_prio=0 tid=0x00007fd8daaa5800 nid=0x4ed5 waiting on condition [0x00007fd90abf2000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000c1876d30> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObje
"RMI RenewClean-[10.12.113.3:40608]" #21 daemon prio=5 os_prio=0 tid=0x00007fd83401c800 nid=0x4ed2 in Object.wait() [0x00007fd90aff4000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:142)
- locked <0x00000000c18b23a8> (a java.lang.ref.ReferenceQueue$Lock)
at sun.rmi.transport.DGCClient$EndpointEntry$RenewCleanThread.run(DGCClient.java:536)
at java.lang.Thread.run(Thread.java:745)
"RMI Reaper" #17 prio=5 os_prio=0 tid=0x00007fd8dbfb0000 nid=0x4ece in Object.wait() [0x00007fd90b7f6000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000c0002d00> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:142)
- locked <0x00000000c0002d00> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:158)
at sun.rmi.transport.ObjectTable$Reaper.run(ObjectTable.java:351)
at java.lang.Thread.run(Thread.java:745)