Docker IO 부하 테스트

1 개요[ | ]

Docker IO 부하 테스트
  • spawn N workers spinning on sync()
  • io 부하를 가하면 BlockIO는 별 차이가 없고 CPU사용률이 증가한다.
IO 부하
docker run --name stress --rm -it progrium/stress --timeout 20s --io 1
모니터링
# 실시간으로 확인하면서 stats.txt 에도 기록
docker stats --format "table {{.Name}}\t{{.BlockIO}}\t{{.CPUPerc}}\t{{.MemUsage}}" | tee stats.txt

# 최대치 3건 조회
cat stats.txt | grep stress | sort -V | tail -3

2 실행예시: IO 1[ | ]

root@localhost:~# docker run --name stress --rm -it progrium/stress --timeout 20s --io 1
stress: info: [1] dispatching hogs: 0 cpu, 1 io, 0 vm, 0 hdd
stress: dbug: [1] using backoff sleep of 3000us
stress: dbug: [1] setting timeout to 20s
stress: dbug: [1] --> hogio worker 1 [6] forked
stress: dbug: [1] <-- worker 6 signalled normally
stress: info: [1] successful run completed in 20s
root@localhost:~# docker stats --format "table {{.Name}}\t{{.BlockIO}}\t{{.CPUPerc}}\t{{.MemUsage}}" | tee stats.txt
NAME                BLOCK I/O           CPU %               MEM USAGE / LIMIT
stress              3.08MB / 213kB      43.93%              848KiB / 461.8MiB
→ 컨테이너가 사라지면 Ctrl+C 눌러 종료
root@localhost:~# cat stats.txt | grep stress | sort -V | tail -3
stress              3.08MB / 303kB      44.34%              848KiB / 461.8MiB
stress              3.08MB / 311kB      44.93%              848KiB / 461.8MiB
stress              3.08MB / 311kB      44.93%              848KiB / 461.8MiB

3 실행예시: IO 4[ | ]

root@localhost:~# docker run --name stress --rm -it progrium/stress --timeout 20s --io 4
stress: info: [1] dispatching hogs: 0 cpu, 4 io, 0 vm, 0 hdd
stress: dbug: [1] using backoff sleep of 12000us
stress: dbug: [1] setting timeout to 20s
stress: dbug: [1] --> hogio worker 4 [6] forked
stress: dbug: [1] using backoff sleep of 9000us
stress: dbug: [1] setting timeout to 20s
stress: dbug: [1] --> hogio worker 3 [7] forked
stress: dbug: [1] using backoff sleep of 6000us
stress: dbug: [1] setting timeout to 20s
stress: dbug: [1] --> hogio worker 2 [8] forked
stress: dbug: [1] using backoff sleep of 3000us
stress: dbug: [1] setting timeout to 20s
stress: dbug: [1] --> hogio worker 1 [9] forked
stress: dbug: [1] <-- worker 6 signalled normally
stress: dbug: [1] <-- worker 7 signalled normally
stress: dbug: [1] <-- worker 9 signalled normally
stress: dbug: [1] <-- worker 8 signalled normally
stress: info: [1] successful run completed in 20s
root@localhost:~# docker stats --format "table {{.Name}}\t{{.BlockIO}}\t{{.CPUPerc}}\t{{.MemUsage}}" | tee stats.txt
NAME                BLOCK I/O           CPU %               MEM USAGE / LIMIT
...
→ 컨테이너가 사라지면 Ctrl+C 눌러 종료
root@localhost:~# cat stats.txt | grep stress | sort -V | tail -3
stress              2.95MB / 295kB      107.20%             1.121MiB / 461.8MiB
stress              2.95MB / 303kB      113.23%             1.121MiB / 461.8MiB
stress              2.95MB / 303kB      113.23%             1.121MiB / 461.8MiB

4 같이 보기[ | ]

5 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}