Skip to content

Stress Test | Linux | Container

Install stress-ng

Bash
sudo apt-get -y install stress-ng

or

Bash
sudo apk add stress-ng

Stress memory

Bash
stress-ng --vm-bytes $(awk '/MemFree/{printf "%d\n", $2 * 1;}' < /proc/meminfo)k --vm-keep -m 10

Stress CPU

Bash
stress-ng --matrix 0

Storage stress

Bash
fio --name=test --rw=write --bs=1M --iodepth=32 --filename=/tmp/test --size=20G