Stress testing for docker container
Just a quick follow-up on pumba. Installation (for Ubuntu):

$ curl -SL https://github.com/alexei-led/pumba/releases/download/0.7.2/pumba_linux_amd64 -O
$ sudo mv pumba_linux_amd64 /usr/bin/pumba
$ sudo chmod +x /usr/bin/pumba
$ pumba --version


It uses stress-ng under the hood, so same commands apply. Examples: 


$ pumba stress -d 1m container_name


-d 1m - duration of a stress test (1 minute)

container_name - your target container (from docker ps output)
$ pumba stress -d 30s --stressors "--vm 10 --vm-bytes 512M --vm-hang 20" container_name


-d 30 - duration 30 seconds

-stressors - parameters passed to stress-ng app

In this particular example we create 10 workers spinning on malloc()/free() allocating 512MB each and sleep 20 seconds before freeing the memory.


Default stressor as in first example is --cpu 4 --timeout 60s