Thread Dump 분석 정리글

Kim Nahyeong·2022년 3월 29일
0

InfinispanCacheLock에 Lock이 걸려서 느림

Infinispan이 제공하는 Cache 인터페이스 - 분산 캐시

Runnable

  • Attach Listener : started when the first attach request occurs

  • Exec Stream Pumper : Copies all data from an input stream to an output stream
    input stream에서 모든 데이터 output stream에 복사

  • Process Reaper : (daemon thread) Linux kernel process management - maintains the process state so that resources can be freed/released/collected on process termination
    리눅스 커널의 프로세스 상태 관리 -> 프로세스 종료에 따라 리소스 관리

  • Connection.Receiver : 소켓 InputStream으로 받아와서 읽는 것

  • FD_SOCK client connection handler,web,mon
    java.net.SocketInputStream.socketRead
    org.jgroups.protocols.FD_SOCK : Failure detection protocol based on sockets 소켓 프로토콜 감지 실패

  • FD_SOCK pinger,web,mon
    java.net.SocketInputStream.socketRead0 : SocketInputStream.read()로 데이터를 기다릴 때
    I/O를 기다리는 상태를 표현할 수 있는 쓰레드 상태는 RUNNABLE이다. Waiting이 아니다.

  • FD_SOCK acceptor,web,mon
    java.net.PlainSocketImpl.socketAccept : 사용자가 늘어나면서 동시 접속자가 일시적을 증가하는 경우

  • Thread
    sun.nio.fs.LinuxWatchService.poll : thread running that busy-waits on poll

  • TcpServer.Acceptor [7800],null,null
    java.net.PlainSocketImpl.socketAccept : 사용자가 늘어나면서 동시 접속자가 일시적을 증가하는 경우

  • pool-1-thread
    java.net.AbstractPlainDatagramSocketImpl.receive : Socket Timeout Exception

  • Timer
    (waiting도 있음)

  • default Accept
    sun.nio.ch.EPollSelectorImpl.doSelect : EPollSelectorImpl

  • default I/O
    sun.nio.ch.EPollSelectorImpl.doSelect : EPollSelectorImpl

  • management Accept
    sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java)

Waiting

  • remote-thread
    java.util.concurrent.SynchronousQueue : SynchronousQueue는 버퍼 공간이 없는 Queue, 버퍼링 할 공간이 없기 때문에 Queue에 삽입하려는 동작과 Queue에서 가져가려는 동작은 함께 이루어져야 하며, 어느 한 동작만 일어나는 경우는 다른 동작이 일어날 때까지 기다려야 함

  • transport-thread
    java.util.concurrent.locks.AbstractQueuedSynchronizer : Condition implementation for a AbstractQueuedSynchronizer serving as the basis of a Lock implementation
    동기화 위해서 락 생성하는 것

  • stateTransferExecutor
    java.util.concurrent.SynchronousQueue : 버퍼 공간이 없는 Queue

  • ClusterTopologyRegistrar
    java.util.concurrent.locks.AbstractQueuedSynchronize : 동기화 위해서 락 생성하는 것

  • CacheRegistry
    java.util.concurrent.locks.AbstractQueuedSynchronizer : 동기화 위해서 락 생성하는 것

  • InfinispanSessionManager
    java.util.concurrent.locks.AbstractQueuedSynchronizer : 동기화 위해서 락 생성하는 것

  • thread
    java.util.concurrent.SynchronousQueue : 버퍼 공간이 없는 Queue
    java.util.concurrent.locks.AbstractQueuedSynchronizer : 동기화 위해서 락 생성하는 것
    - parking to wait for <0x00000007225bbb88>
    - parking to wait for <0x00000007225bb5d0>

  • Controller-remote-thread-null
    java.util.concurrent.Semaphore : counting semaphore

- default task (여기서 에러 발생, 계속된 Waiting으로 느려짐)

java.util.concurrent.locks.AbstractQueuedSynchronizer : 동기화 위해서 락 생성하는 것
- parking to wait for <0x00000007224ad558> (151개) (~5634)

Timed Waiting

- parking to wait for  <0x00000007414aefa8> : 스레드 스택 엄청 긺 (99개)

java.util.concurrent.ThreadPoolExecutor : 일반적으로 Executors 공장 방법을 사용하여 구성된 여러 풀링된 스레드 중 하나를 사용하여 제출된 각 작업을 실행하는 ExecutorService

java.util.concurrent.locks.LockSupport.park : Basic thread blocking primitives for creating locks and other synchronization classes 원시적인 스레드 블락

  • logback : 로깅 프레임 워크에 대한 추상화(인터페이스) 역할을 하는 라이브러리, log4j를 토대로 새롭게 만든 Logging 라이브러리
    java.util.concurrent.locks.AbstractQueuedSynchronizer : 동기화 위해서 락 생성하는 것
    - parking to wait for <0x0000000728922090>

  • KeyAffinityService Thread Pool
    java.util.concurrent.locks.LockSupport.park : Basic thread blocking primitives for creating locks and other synchronization classes 원시적인 스레드 블락
    - parking to wait for <0x00000007286051b8>

  • xnio-file-watcher
    java.util.concurrent.locks.AbstractQueuedSynchronizer : 동기화 위해서 락 생성하는 것

  • ServerService Thread Pool
    java.util.concurrent.locks.AbstractQueuedSynchronizer : 동기화 위해서 락 생성하는 것

  • TransferQueueBundler,web,mon
    java.util.concurrent.locks.AbstractQueuedSynchronizer : 동기화 위해서 락 생성하는 것

  • DeploymentScanner-threads
    java.util.concurrent.locks.AbstractQueuedSynchronizer : 동기화 위해서 락 생성하는 것
    ThreadPoolExecutor

  • Transaction Reaper Worker
    com.arjuna.ats.arjuna.coordinator.TransactionReaper.waitForCancellations : Class to record transactions with non-zero timeout values, and class to implement a transaction reaper thread which terminates these transactions once their timeout elapses.
    타임아웃 값이 0이 아닌 트랜잭션을 기록하는 클래스
    타임아웃이 경과하면 트랜잭션을 종료하는 트랜잭션리퍼 스레드를 구현하는 클래스

Timed Waiting

  • pool-5-thread
    java.util.concurrent.locks.AbstractQueuedSynchronizer : 동기화 위해서 락 생성하는 것
    - parking to wait for <0x000000072c83cf60>

  • commons-pool-EvictionTimer
    - locked <0x000000072c83d6a0>

  • expiration-thread
    java.util.concurrent.locks.AbstractQueuedSynchronizer : 동기화 위해서 락 생성하는 것

  • timeout-thread
    java.util.concurrent.locks.AbstractQueuedSynchronizer : 동기화 위해서 락 생성하는 것

  • Periodic Recovery
    com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doPeriodicWait

  • Transaction Expired Entry Monitor
    com.arjuna.ats.internal.arjuna.recovery.ExpiredEntryMonitor.run

  • UndertowEventHandlerAdapter
    java.util.concurrent.locks.AbstractQueuedSynchronizer : 동기화 위해서 락 생성하는 것

  • ConnectionValidator
    background validation of managed connections for an InternalManagedConnectionPool

  • IdleRemover
    : JBoss/JCA the IdleRemover runs asynchoronously and cleans up connections that have not been used reducing resource usage when it is not required
    비동기적으로 실행되며 사용되지 않은 연결을 정리하여 필요하지 않은 경우 리소스 사용량을 줄입니다.

16684

0개의 댓글