Skip to content

Stress Test | Linux | Container

Install stress-ng

sudo apt-get -y install stress-ng

or

sudo apk add stress-ng

Stress memory

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

Stress CPU

stress-ng --matrix 0

Storage stress

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