Wall time에서 thread CPU time을 빼면 off-CPU 원인을 찾을 단서가 된다

경과 시간이 길다는 사실만으로 CPU 병목을 결론 내리면 sleep·I/O·lock·scheduler 대기를 놓칩니다.

wall time

실제 경과

thread CPU time

on-CPU 실행

off-CPU 후보

I/O·lock·sleep·schedule

wall≫CPU

대기 evidence 우선

wall≈CPU

CPU sample/profile 우선

multi-thread

관련 thread CPU 합과 범위 명시

핵심: 두 시간은 같은 의미의 합계가 아니므로 thread 범위와 측정 구간을 맞춘 뒤 차이를 가설로 사용합니다.