项目作者: enginunal

项目描述 :
A stress workload app on alpine linux.
高级语言: Dockerfile
项目地址: git://github.com/enginunal/alpinestress.git
创建时间: 2018-11-21T08:46:43Z
项目社区:https://github.com/enginunal/alpinestress

开源协议:

下载


alpine stress container

A stress workload app on alpine linux.

It is not a benchmark. It is a tool used by system administrators to evaluate how well their systems will scale,
by kernel programmers to evaluate perceived performance characteristics, and by systems programmers
to expose the classes of bugs which only or more frequently manifest themselves when the system is under heavy load.

with interactive shell in container

  1. docker run -it --rm stress /bin/ash

ram stress test

2GB with two workers

  1. stress --vm 2 --vm-bytes 2G --timeout 10s

90% ram load test with one worker

  1. stress --vm 1 --vm-bytes $(awk '/MemAvailable/{printf "%d\n", $2 * 0.9;}' < /proc/meminfo)k --timeout 20

cpu stress test

  1. stress --cpu 2 --timeout 10s

you can start stress test directly with docker run command

docker run —rm -it stress stress —cpu 2 —io 1 —vm 2 —vm-bytes 128M —timeout 10s

options

  1. -?, --help show this help statement
  2. --version show version statement
  3. -v, --verbose be verbose
  4. -q, --quiet be quiet
  5. -n, --dry-run show what would have been done
  6. -t, --timeout N timeout after N seconds
  7. --backoff N wait factor of N microseconds before work starts
  8. -c, --cpu N spawn N workers spinning on sqrt()
  9. -i, --io N spawn N workers spinning on sync()
  10. -m, --vm N spawn N workers spinning on malloc()/free()
  11. --vm-bytes B malloc B bytes per vm worker (default is 256MB)
  12. --vm-stride B touch a byte every B bytes (default is 4096)
  13. --vm-hang N sleep N secs before free (default is none, 0 is inf)
  14. --vm-keep redirty memory instead of freeing and reallocating
  15. -d, --hdd N spawn N workers spinning on write()/unlink()
  16. --hdd-bytes B write B bytes per hdd worker (default is 1GB)
  17. --hdd-noclean do not unlink files created by hdd workers