1 개요[ | ]
- Docker 메모리 부하 테스트
메모리 부하
Bash
Copy
docker run --name stress --rm -it progrium/stress -q --timeout 20s --vm 2 --vm-bytes 128M
모니터링
Bash
Copy
# 실시간으로 확인하면서 stats.txt 에도 기록
docker stats --format "table {{.Name}}\t{{.MemUsage}}\t{{.CPUPerc}}" | tee stats.txt
# 최대치 3건 조회
cat stats.txt | grep cpustress | sort -V | tail -3
2 실행예시: 메모리 32M×2[ | ]
Console
Copy
root@localhost:~# docker run --name stress --rm -it progrium/stress -q --timeout 20s --vm 2 --vm-bytes 32M
root@localhost:~#
Console
Copy
root@localhost:~# docker stats --format "table {{.Name}}\t{{.MemUsage}}\t{{.CPUPerc}}" | tee stats.txt
NAME MEM USAGE / LIMIT CPU %
stress 56.64MiB / 461.8MiB 196.99%
- → 컨테이너가 사라지면 Ctrl+C 눌러 종료
Console
Copy
root@localhost:~# cat stats.txt | grep stress | sort -V | tail -3
stress 53.8MiB / 461.8MiB 196.05%
stress 56.64MiB / 461.8MiB 196.99%
stress 56.64MiB / 461.8MiB 196.99%
3 실행예시: 메모리 64M×2[ | ]
Console
Copy
root@localhost:~# docker run --name stress --rm -it progrium/stress --timeout 20s --vm 2 --vm-bytes 64M
root@localhost:~#
Console
Copy
root@localhost:~# docker stats --format "table {{.Name}}\t{{.MemUsage}}\t{{.CPUPerc}}" | tee stats.txt
NAME MEM USAGE / LIMIT CPU %
stress 84.78MiB / 461.8MiB 196.15%
- → 컨테이너가 사라지면 Ctrl+C 눌러 종료
Console
Copy
root@localhost:~# cat stats.txt | grep stress | sort -V | tail -3
stress 88.32MiB / 461.8MiB 196.29%
stress 90.98MiB / 461.8MiB 196.03%
stress 90.98MiB / 461.8MiB 196.03%
4 같이 보기[ | ]
5 참고[ | ]
편집자 Jmnote
로그인하시면 댓글을 쓸 수 있습니다.