stress

stress is a deliberately simple workload generator for POSIX systems. It imposes a configurable amount of CPU, memory, I/O, and disk stress on the system. It is written in C, and is free software licensed under the GPLv2.

Download

Most questions should be answered by the FAQ. Build instructions are in the README. A simple list of changes per release is in the NEWS file. A detailed list of changes is in the ChangeLog. Debian includes stress as part of the distribution, see the stress debian package page. Binary RPM packages for RHEL and Fedora are at the Dag repository stress Redhat package page. There is a stress Gentoo ebuild, a stress OpenBSD port, and a stress FreeBSD port.

Development

Please send patches and bug reports to Amos Waterland via apw@debian.org.

Example

Here is an example invocation: a load average of four is imposed on the system by specifying two CPU-bound processes, one I/O-bound process, and one memory allocator process.

   $ stress --cpu 2 --io 1 --vm 1 --vm-bytes 128M --timeout 10s --verbose
   stress: info: [9372] dispatching hogs: 2 cpu, 1 io, 1 vm, 0 hdd
   stress: dbug: [9372] (243) using backoff sleep of 12000us
   stress: dbug: [9372] (262) setting timeout to 10s
   stress: dbug: [9372] (285) --> hogcpu worker 9373 forked
   stress: dbug: [9372] (305) --> hogio worker 9374 forked
   stress: dbug: [9372] (325) --> hogvm worker 9375 forked
   stress: dbug: [9372] (243) using backoff sleep of 3000us
   stress: dbug: [9372] (262) setting timeout to 10s
   stress: dbug: [9372] (285) --> hogcpu worker 9376 forked
   stress: dbug: [9375] (466) hogvm worker malloced 134217728 bytes
   stress: dbug: [9372] (382) <-- worker 9374 signalled normally
   stress: dbug: [9372] (382) <-- worker 9373 signalled normally
   stress: dbug: [9372] (382) <-- worker 9375 signalled normally
   stress: dbug: [9372] (382) <-- worker 9376 signalled normally
   stress: info: [9372] successful run completed in 10s

Background

The tool started out as a very simple way to generate work on a computer. It has pretty much stayed as simple as reasonably possible. It is a single file called `stress.c' whose internal organization is in essence a loop that forks worker processes and then waits for them to either complete normally or exit with an error. It has been used in a lot of product development labs as well as in research projects.

Tutorials

Related Work


Last upated: Fri Jul 18 10:24:49 EDT 2014