stress(1)

πŸ“¦
version 1.0.7 Β· 3 versions
  • 1.0.7 Β· arch rolling, debian bookworm, debian trixie, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.0.4 Β· epel 9
  • 1.0.5 Β· ubuntu jammy
, in arch rolling, debian bookworm, debian trixie, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– stress(1) πŸ’–

okay bestie, so this is the manual page for stress β€” aka the tool to impose load on and stress test systems. it's in section 1, it's iconic, and by the end of this you're gonna be stress-testing like a main character. let's go 🫢


✨ NAME ✨

stress β€” tool to impose load on and stress test a computer system


πŸŽ€ SYNOPSIS πŸŽ€

stress [OPTIONS]

that's it. that's the whole vibe. you give it options, it gives your machine a bad time (affectionately) πŸ’…


🌸 DESCRIPTION 🌸

so stress is this tool that imposes a configurable amount of CPU, memory, I/O, or disk stress on a POSIX-compliant operating system, and then it reports any errors it detects. like, it's not just causing chaos, it's taking notes while it does it. queen behavior πŸ‘‘

and before you get any ideas β€” stress is not a benchmark. not it. it's a tool used by:

  • system administrators, to evaluate how well their systems will scale
  • kernel programmers, to evaluate perceived performance characteristics
  • systems programmers, to expose the classes of bugs which only β€” or more frequently β€” manifest themselves when the system is under heavy load

so basically it's the group-chat member who pokes the bear on purpose, but like, for science πŸ”¬βœ¨


πŸ¦‹ OPTIONS πŸ¦‹

  • -?, --help β€” Show this help statement.
  • --version β€” Show version statement.
  • -v, --verbose β€” Be verbose. (yes bestie, talk to me, tell me everything πŸ—£οΈ)
  • -q, --quiet β€” Be quiet. (the introvert setting, no cap)
  • -n, --dry-run β€” Show what would have been done. (window shopping, but for system stress)
  • -t, --timeout <N> β€” Timeout after N seconds. Heads up: this option is ignored by -n.
  • --backoff <N> β€” Wait for factor of microseconds before starting work.
  • -c, --cpu <N> β€” Spawn N workers spinning on sqrt().
  • -i, --io <N> β€” Spawn N workers spinning on sync().
  • -m, --vm <N> β€” Spawn N workers spinning on malloc()/free().
  • --vm-bytes <B> β€” Malloc B bytes per vm worker (default is 256MB).
  • --vm-stride <B> β€” Touch a byte every B bytes (default is 4096).
  • --vm-hang <N> β€” Sleep N secs before free (default none, 0 is inf).
  • --vm-keep β€” Redirty memory instead of freeing and reallocating.
  • -d, --hdd <N> β€” Spawn N workers spinning on write()/unlink().
  • --hdd-bytes <B> β€” Write B bytes per hdd worker (default is 1GB). The file will be created with mkstemp() in the current directory.
πŸ“ Note: Numbers may be suffixed with s,m,h,d,y (time) or B,K,M,G (size). iykyk 😌

🌈 EXAMPLES 🌈

the simple case is that you just want to bring the system load average up to an arbitrary value. The following forks 13 processes, each of which spins in a tight loop calculating the sqrt() of a random number acquired with rand().

stress -c 13

Long options are supported, as well as is making the output less verbose. The following forks 1024 processes, and only reports error messages if any.

stress --quiet --cpu 1k

To see how your system performs when it is I/O bound, use the -i switch. The following forks 4 processes, each of which spins in a tight loop calling sync(), which is a system call that flushes memory buffers to disk.

stress -i 4

Multiple hogs may be combined on the same command line. The following does everything the preceding examples did in one command, but also turns up the verbosity level as well as showing how to cause the command to self-terminate after 1 minute.

stress -c 13 -i 4 --verbose --timeout 1m

You can write a file of arbitrary length to disk. The file is created with mkstemp() in the current directory.

stress -d 1 --hdd-bytes 13

Large file support is enabled.

stress -d 1 --hdd-bytes 3G

πŸ‘‘ AUTHOR πŸ‘‘

stress was originally developed by Amos Waterland <apw@debian.org> and is maintained by some volunteers. 🫢

Currently, source code and newer versions are available at https://github.com/resurrecting-open-source-projects/stress


and that's the whole page bestie!! πŸ’–βœ¨ this lil manual is from stress-1.0.7, dated 21 Jan 2023 β€” so if you're running something newer, go peek at the repo above, and if you're running this exact one, you're lowkey holding a piece of history. go forth and stress responsibly, my love πŸŒΈπŸ’…πŸ¦‹