stress-ng — timed load on the CPU, memory and disk
cheat sheet · stress-ng 0.17 · Ubuntu 24.04 https://lab.dimsanych.ru/en/wiki/stress-ng/Cheat sheet
-
stress-ng --cpu 2 --timeout 60s2 processes load the CPU -
stress-ng --cpu 1 --cpu-load 30 -t 30sone process at 30 % -
stress-ng --vm 1 --vm-bytes 128M -t 30stake 128 MiB of memory -
stress-ng --hdd 1 --hdd-bytes 64M -t 30s --temp-path /var/tmp -
stress-ng --io 1 -t 30ssync() in a loop -
stress-ng --cpu 1 -t 10s --metrics-briefwith a summary table -
nice -n 19 stress-ng --cpu 1 -t 60s &background, yielding -
sudo systemd-run --unit=lab-vm -p MemoryMax=96M \ -
stress-ng --vm 1 --vm-bytes 160M -t 20sin its own cgroup
Options
The main keys are in the table below. The full list of stressors is
stress-ng --stressors, the keys are in stress-ng --help.