Where to start First steps track · 15 stages
Linux Labs

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 60s 2 processes load the CPU
  • stress-ng --cpu 1 --cpu-load 30 -t 30s one process at 30 %
  • stress-ng --vm 1 --vm-bytes 128M -t 30s take 128 MiB of memory
  • stress-ng --hdd 1 --hdd-bytes 64M -t 30s --temp-path /var/tmp
  • stress-ng --io 1 -t 30s sync() in a loop
  • stress-ng --cpu 1 -t 10s --metrics-brief with 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 20s in 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.

Loading…