├── SPONSORS ├── Makefile ├── Dockerfile ├── LICENSE └── README.md /SPONSORS: -------------------------------------------------------------------------------- 1 | DigitalOcean http://digitalocean.com -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | 2 | build: 3 | docker build -t stress . -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:trusty 2 | MAINTAINER Jeff Lindsay 3 | 4 | RUN apt-get update && apt-get install -y stress && rm -rf /var/lib/apt/lists/* 5 | 6 | ENTRYPOINT ["/usr/bin/stress", "--verbose"] 7 | CMD [] 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2014 Jeff Lindsay 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # docker-stress 2 | 3 | A Docker container for [stress](http://people.seas.harvard.edu/~apw/stress/), a tool for generating workload. It can produce CPU, memory, I/O, and disk stress. 4 | 5 | ## Using the container 6 | 7 | $ docker run --rm -it progrium/stress --cpu 2 --io 1 --vm 2 --vm-bytes 128M --timeout 10s 8 | 9 | The container always runs in verbose mode. 10 | 11 | ### Options 12 | ``` 13 | -?, --help show this help statement 14 | --version show version statement 15 | -v, --verbose be verbose 16 | -q, --quiet be quiet 17 | -n, --dry-run show what would have been done 18 | -t, --timeout N timeout after N seconds 19 | --backoff N wait factor of N microseconds before work starts 20 | -c, --cpu N spawn N workers spinning on sqrt() 21 | -i, --io N spawn N workers spinning on sync() 22 | -m, --vm N spawn N workers spinning on malloc()/free() 23 | --vm-bytes B malloc B bytes per vm worker (default is 256MB) 24 | --vm-stride B touch a byte every B bytes (default is 4096) 25 | --vm-hang N sleep N secs before free (default is none, 0 is inf) 26 | --vm-keep redirty memory instead of freeing and reallocating 27 | -d, --hdd N spawn N workers spinning on write()/unlink() 28 | --hdd-bytes B write B bytes per hdd worker (default is 1GB) 29 | --hdd-noclean do not unlink files created by hdd workers 30 | 31 | Example: stress --cpu 8 --io 4 --vm 2 --vm-bytes 128M --timeout 10s 32 | 33 | Note: Numbers may be suffixed with s,m,h,d,y (time) or B,K,M,G (size). 34 | ``` 35 | 36 | ## Sponsor 37 | 38 | This project was made possible by [DigitalOcean](http://digitalocean.com). 39 | 40 | 41 | ## License 42 | 43 | BSD --------------------------------------------------------------------------------