Docker 디스크 부하 테스트

1 개요[ | ]

Docker 디스크 부하 테스트
디스크 부하
docker run --name stress --rm -it progrium/stress --timeout 20s --hdd 2 --hdd-bytes 1G
모니터링
# 실시간으로 확인하면서 stats.txt 에도 기록
 docker stats --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.BlockIO}}" | tee stats.txt

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

2 실행예시: 디스크 1G×2[ | ]

root@localhost:~# docker run --name stress --rm -it progrium/stress --timeout 20s --hdd 2 --hdd-bytes 1G
stress: info: [1] dispatching hogs: 0 cpu, 0 io, 0 vm, 2 hdd
stress: dbug: [1] using backoff sleep of 6000us
stress: dbug: [1] setting timeout to 20s
stress: dbug: [1] --> hoghdd worker 2 [7] forked
stress: dbug: [1] using backoff sleep of 3000us
stress: dbug: [1] setting timeout to 20s
stress: dbug: [1] --> hoghdd worker 1 [8] forked
stress: dbug: [8] seeding 1048575 byte buffer with random data
stress: dbug: [7] seeding 1048575 byte buffer with random data
stress: dbug: [8] opened ./stress.FGJ7wT for writing 1073741824 bytes
stress: dbug: [8] unlinking ./stress.FGJ7wT
stress: dbug: [8] fast writing to ./stress.FGJ7wT
stress: dbug: [7] opened ./stress.omA3dT for writing 1073741824 bytes
stress: dbug: [7] unlinking ./stress.omA3dT
stress: dbug: [7] fast writing to ./stress.omA3dT
stress: dbug: [7] slow writing to ./stress.omA3dT
stress: dbug: [7] closing ./stress.omA3dT after 1073741824 bytes
stress: dbug: [7] opened ./stress.53Brqd for writing 1073741824 bytes
stress: dbug: [7] unlinking ./stress.53Brqd
stress: dbug: [7] fast writing to ./stress.53Brqd
stress: dbug: [8] slow writing to ./stress.FGJ7wT
stress: dbug: [8] closing ./stress.FGJ7wT after 1073741824 bytes
stress: dbug: [8] opened ./stress.pf4aZd for writing 1073741824 bytes
stress: dbug: [8] unlinking ./stress.pf4aZd
stress: dbug: [8] fast writing to ./stress.pf4aZd
stress: dbug: [1] <-- worker 7 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{{.CPUPerc}}\t{{.MemUsage}}\t{{.BlockIO}}" | tee stats.txt
NAME                CPU %               MEM USAGE / LIMIT   BLOCK I/O
...
→ 컨테이너가 사라지면 Ctrl+C 눌러 종료
root@localhost:~# cat stats.txt | grep stress | sort -V | tail -3
stress              17.18%              3.547MiB / 461.8MiB   3.08MB / 0B
stress              17.18%              3.547MiB / 461.8MiB   3.08MB / 0B
stress              17.18%              3.547MiB / 461.8MiB   3.08MB / 0B

3 실행예시: 디스크 20G×2[ | ]

root@localhost:~# docker run --name stress --rm -it progrium/stress --timeout 20s --hdd 2 --hdd-bytes 20G
stress: info: [1] dispatching hogs: 0 cpu, 0 io, 0 vm, 2 hdd
stress: dbug: [1] using backoff sleep of 6000us
stress: dbug: [1] setting timeout to 20s
stress: dbug: [1] --> hoghdd worker 2 [6] forked
stress: dbug: [1] using backoff sleep of 3000us
stress: dbug: [1] setting timeout to 20s
stress: dbug: [1] --> hoghdd worker 1 [7] forked
stress: dbug: [7] seeding 1048575 byte buffer with random data
stress: dbug: [6] seeding 1048575 byte buffer with random data
stress: dbug: [7] opened ./stress.9lJtv3 for writing 21474836480 bytes
stress: dbug: [7] unlinking ./stress.9lJtv3
stress: dbug: [6] opened ./stress.aNB3v4 for writing 21474836480 bytes
stress: dbug: [6] unlinking ./stress.aNB3v4
stress: dbug: [6] fast writing to ./stress.aNB3v4
stress: dbug: [7] fast writing to ./stress.9lJtv3
stress: dbug: [1] <-- worker 7 signalled normally
stress: dbug: [1] <-- worker 6 signalled normally
stress: info: [1] successful run completed in 20s
root@localhost:~# docker stats --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.BlockIO}}" | tee stats.txt
NAME                CPU %               MEM USAGE / LIMIT     BLOCK I/O
stress              14.74%              5.301MiB / 461.8MiB   2.66MB / 0B
→ 컨테이너가 사라지면 Ctrl+C 눌러 종료
root@localhost:~# cat stats.txt | grep stress | sort -V | tail -3
stress              14.74%              5.301MiB / 461.8MiB   2.66MB / 0B
stress              17.18%              5.348MiB / 461.8MiB   2.66MB / 0B
stress              17.18%              5.348MiB / 461.8MiB   2.66MB / 0B

4 같이 보기[ | ]

5 참고[ | ]

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