1stress(1) tool to impose load on and stress test systems stress(1)
2
3
4
6 stress - tool to impose load on and stress test a computer system
7
9 stress [OPTIONS]
10
11
13 stress is a tool that imposes a configurable amount of CPU, memory,
14 I/O, or disk stress on a POSIX-compliant operating system and reports
15 any errors it detects.
16
17 stress is not a benchmark. It is a tool used by system administrators
18 to evaluate how well their systems will scale, by kernel programmers to
19 evaluate perceived performance characteristics, and by systems program‐
20 mers to expose the classes of bugs which only or more frequently mani‐
21 fest themselves when the system is under heavy load.
22
24 -?, --help
25 Show this help statement.
26
27 --version
28 Show version statement.
29
30 -v, --verbose
31 Be verbose.
32
33 -q, --quiet
34 Be quiet.
35
36 -n, --dry-run
37 Show what would have been done.
38
39 -t, --timeout <N>
40 Timeout after N seconds. This option is ignored by -n.
41
42 --backoff <N>
43 Wait for factor of microseconds before starting work.
44
45 -c, --cpu <N>
46 Spawn N workers spinning on sqrt().
47
48 -i, --io <N>
49 Spawn N workers spinning on sync().
50
51 -m, --vm <N>
52 Spawn N workers spinning on malloc()/free().
53
54 --vm-bytes <B>
55 Malloc B bytes per vm worker (default is 256MB).
56
57 --vm-stride <B>
58 Touch a byte every B bytes (default is 4096).
59
60 --vm-hang <N>
61 Sleep N secs before free (default none, 0 is inf).
62
63 --vm-keep
64 Redirty memory instead of freeing and reallocating.
65
66 -d, --hdd <N>
67 Spawn N workers spinning on write()/unlink().
68
69 --hdd-bytes <B>
70 Write B bytes per hdd worker (default is 1GB). The file will be
71 created with mkstemp() in the current directory.
72
73 Note: Numbers may be suffixed with s,m,h,d,y (time) or B,K,M,G (size).
74
76 The simple case is that you just want to bring the system load average
77 up to an arbitrary value. The following forks 13 processes, each of
78 which spins in a tight loop calculating the sqrt() of a random number
79 acquired with rand().
80
81 stress -c 13
82
83 Long options are supported, as well as is making the output less ver‐
84 bose. The following forks 1024 processes, and only reports error mes‐
85 sages if any.
86
87 stress --quiet --cpu 1k
88
89 To see how your system performs when it is I/O bound, use the -i
90 switch. The following forks 4 processes, each of which spins in a tight
91 loop calling sync(), which is a system call that flushes memory buffers
92 to disk.
93
94 stress -i 4
95
96 Multiple hogs may be combined on the same command line. The following
97 does everything the preceding examples did in one command, but also
98 turns up the verbosity level as well as showing how to cause the com‐
99 mand to self-terminate after 1 minute.
100
101 stress -c 13 -i 4 --verbose --timeout 1m
102
103 You can write a file of arbitrary length to disk. The file is created
104 with mkstemp() in the current directory.
105
106 stress -d 1 --hdd-bytes 13
107
108 Large file support is enabled.
109
110 stress -d 1 --hdd-bytes 3G
111
112
114 stress was originally developed by Amos Waterland <apw@debian.org> and
115 is maintained by some volunteers.
116
117 Currently, source code and newer versions are available at
118 https://github.com/resurrecting-open-source-projects/stress
119
120
121
122stress-1.0.7 21 Jan 2023 stress(1)