Dummy loader is a very simple server written in Go that exposes an HTTP API for generating CPU and memory load. It was created for experimentation with resource management configuration in docker/kubernetes environments.
To run the server in a docker container, all you have to do is run the following command:
docker run -p 8080:8080 sha1n/dummy-loader
- Start CPU load by running
curl -v -XPOST http://<host>:<port>/api/cpu-load?time-sec=30[&cores=2]
time-sec
- mandatory, the number of seconds to run the loadcores
- optional, how many cores to load
- Allocate memory on the server by running
curl -v -XPOST http://<host>:<port>/api/mem-footprint?amount-mb=1000
amount-mb
- the amount of memory to allocate in MB.
For convenience, these two endpoints support both HTTP GET and POST methods