Computer & Data/Operating System
Linux %iowait
박스님
2018. 9. 6. 11:04
반응형
%iowait이란
리눅스 로그 중 sar에서 확인할 수 있는 로그 항목이다.
io completion을 기다리는 시간을 의미.
us, user : time running un-niced user processes sy, system : time running kernel processes ni, nice : time running niced user processes wa, IO-wait : time waiting for I/O completion hi : time spent servicing hardware interrupts si : time spent servicing software interrupts st : time stolen from this vm by the hypervisor
일반적으로 cpu와 디스크 사이에 통신이 많다면 증가하게 됨
예시
cpu time = 20 ms
io time = 20 ms
total transaction time = cpu + io = 20 + 20 = 40 ms
이러한 상황에서 iowait은
%iowait = io time / total time * 100 = 50%
여기서 주의할 점,
cpu 성능이 좋아지게 되면, %iowait도 같이 증가하게 된다.
위에 예시에서 cpu time이 10ms로 줄게되면
cpu time = 10 ms
io time = 20 ms
total transaction time = cpu + io = 10 + 20 = 30 ms
%iowait = io time / total time * 100 = 66%
이러한 일이 발생하는 원인은 cpu 성능 향상 속도에 비해, disk 성능의 향상이 느리기 때문이다.
위에서와 같은 이유때문에 %iowait을 무조건 신뢰하는것은 위험하다.
참조
반응형