stress-ng was originally intended to make a machine work hard and trip hardware issues such as thermal overruns as well as operating system bugs that only occur when a system is being thrashed hard. Use stress-ng with caution as some of the tests can make a system run hot on poorly designed hardware and also can cause excessive system thrashing which may be difficult to stop.
stress-ng can also measure test throughput rates; this can be useful to observe performance changes across different operating system releases or types of hardware. However, it has never been intended to be used as a precise benchmark test suite, so do NOT use it in this manner.
Running stress-ng with root privileges will adjust out of memory settings on Linux systems to make the stressors unkillable in low memory situations, so use this judiciously. With the appropriate privilege, stress-ng can allow the ionice class and ionice levels to be adjusted, again, this should be used with care.
One can specify the number of processes to invoke per type of stress test; specifying a negative or zero value will select the number of processors available as defined by sysconf(_SC_NPROCESSORS_CONF).
General stress-ng control options:
Specifying a name followed by a question mark (for example --class vm?) will print out all the stressors in that specific class.
run sequential # run stressors sequentially verbose # verbose output metrics-brief # show metrics at end of run timeout 60s # stop each stressor after 60 seconds # # vm stressor options: # vm 2 # 2 vm stressors vm-bytes 128M # 128MB available memory vm-keep # keep vm mapping vm-populate # populate memory # # memcpy stressor options: # memcpy 5 # 5 memcpy stressors
The job file introduces the run command that specifies how to run the stressors:
run sequential - run stressors sequentially
run parallel - run stressors together in parallel
Note that 'run parallel' is the default.
The following columns of information are output:
Column Heading | Explanation |
bogo ops |
number of iterations of the stressor during the run. This is metric of
how much overall "work" has been achieved in bogo operations.
|
real time (secs) |
average wall clock duration (in seconds) of the stressor. This is the total
wall clock time of all the instances of that particular stressor divided by
the number of these stressors being run.
|
usr time (secs) |
total user time (in seconds) consumed running all the instances of the
stressor.
|
sys time (secs) |
total system time (in seconds) consumed running all the instances of the
stressor.
|
bogo ops/s (real time) |
total bogo operations per second based on wall clock run time. The wall clock
time reflects the apparent run time. The more processors one has on a system
the more the work load can be distributed onto these and hence the wall clock
time will reduce and the bogo ops rate will increase. This is essentially
the "apparent" bogo ops rate of the system.
|
bogo ops/s (usr+sys time) |
total bogo operations per second based on cumulative user and system time.
This is the real bogo ops rate of the system taking into consideration the
actual time execution time of the stressor across all the processors.
Generally this will decrease as one adds more concurrent stressors due to
contention on cache, memory, execution units, buses and I/O devices.
|
Stressor specific options:
Note: This option only applies to the --cpu stressor option and not to all of the cpu class of stressors.
Note: This option only applies to the --cpu stressor option and not to all of the cpu class of stressors.
Method | Description |
all |
iterate over all the below cpu stress methods
|
ackermann |
Ackermann function: compute A(3, 10), where:
A(m, n) = n + 1 if m = 0; A(m - 1, 1) if m > 0 and n = 0; A(m - 1, A(m, n - 1)) if m > 0 and n > 0 |
apery |
calculate Apery's constant ζ(3); the sum of 1/(n ↑ 3) for to a precision of 1.0x10↑14
|
bitops |
various bit operations from bithack, namely: reverse bits, parity check, bit
count, round to nearest power of 2
|
callfunc |
recursively call 8 argument C function to a depth of 1024 calls and unwind
|
cfloat |
1000 iterations of a mix of floating point complex operations
|
cdouble |
1000 iterations of a mix of double floating point complex operations
|
clongdouble |
1000 iterations of a mix of long double floating point complex operations
|
collatz |
compute the 1348 steps in the collatz sequence from starting number 989345275647.
Where f(n) = n / 2 (for even n) and f(n) = 3n + 1 (for odd n).
|
correlate |
perform a 16384 × 1024 correlation of random doubles
|
cpuid |
fetch cpu specific information using the cpuid instruction (x86 only)
|
crc16 |
compute 1024 rounds of CCITT CRC16 on random data
|
decimal32 |
1000 iterations of a mix of 32 bit decimal floating point operations (GCC only)
|
decimal64 |
1000 iterations of a mix of 64 bit decimal floating point operations (GCC only)
|
decimal128 |
1000 iterations of a mix of 128 bit decimal floating point operations (GCC
only)
|
dither |
Floyd–Steinberg dithering of a 1024 × 768 random image from 8 bits down to
1 bit of depth
|
div64 |
50,000 64 bit unsigned integer divisions
|
djb2a |
128 rounds of hash DJB2a (Dan Bernstein hash using the xor variant) on 128 to
1 bytes of random strings
|
double |
1000 iterations of a mix of double precision floating point operations
|
euler |
compute e using n = (1 + (1 ÷ n)) ↑ n
|
explog |
iterate on n = exp(log(n) ÷ 1.00002)
|
factorial |
find factorials from 1..150 using Stirling's and Ramanujan's approximations
|
fibonacci |
compute Fibonacci sequence of 0, 1, 1, 2, 5, 8...
|
fft |
4096 sample Fast Fourier Transform
|
float |
1000 iterations of a mix of floating point operations
|
float16 |
1000 iterations of a mix of 16 bit floating point operations
|
float32 |
1000 iterations of a mix of 32 bit floating point operations
|
float80 |
1000 iterations of a mix of 80 bit floating point operations
|
float128 |
1000 iterations of a mix of 128 bit floating point operations
|
floatconversion |
perform 65536 iterations of floating point conversions between
float, double and long double floating point variables.
|
fnv1a |
128 rounds of hash FNV-1a (Fowler–Noll–Vo hash using the xor then multiply
variant) on 128 to 1 bytes of random strings
|
gamma |
calculate the Euler-Mascheroni constant γ using the limiting difference
between the harmonic series (1 + 1/2 + 1/3 + 1/4 + 1/5 ... + 1/n) and the
natural logarithm ln(n), for n = 80000.
|
gcd |
compute GCD of integers
|
gray |
calculate binary to gray code and gray code back to binary for integers
from 0 to 65535
|
hamming |
compute Hamming H(8,4) codes on 262144 lots of 4 bit data. This turns 4 bit
data into 8 bit Hamming code containing 4 parity bits. For data bits d1..d4,
parity bits are computed as:
p1 = d2 + d3 + d4 p2 = d1 + d3 + d4 p3 = d1 + d2 + d4 p4 = d1 + d2 + d3 |
hanoi |
solve a 21 disc Towers of Hanoi stack using the recursive solution
|
hyperbolic |
compute sinh(θ) × cosh(θ) + sinh(2θ) + cosh(3θ) for float,
double and long double hyperbolic sine and cosine functions where θ = 0
to 2π in 1500 steps
|
idct |
8 × 8 IDCT (Inverse Discrete Cosine Transform)
|
int8 |
1000 iterations of a mix of 8 bit integer operations
|
int16 |
1000 iterations of a mix of 16 bit integer operations
|
int32 |
1000 iterations of a mix of 32 bit integer operations
|
int64 |
1000 iterations of a mix of 64 bit integer operations
|
int128 |
1000 iterations of a mix of 128 bit integer operations (GCC only)
|
int32float |
1000 iterations of a mix of 32 bit integer and floating point operations
|
int32double |
1000 iterations of a mix of 32 bit integer and double precision floating point
operations
|
int32longdouble |
1000 iterations of a mix of 32 bit integer and long double precision floating
point operations
|
int64float |
1000 iterations of a mix of 64 bit integer and floating point operations
|
int64double |
1000 iterations of a mix of 64 bit integer and double precision floating point
operations
|
int64longdouble |
1000 iterations of a mix of 64 bit integer and long double precision floating
point operations
|
int128float |
1000 iterations of a mix of 128 bit integer and floating point operations
(GCC only)
|
int128double |
1000 iterations of a mix of 128 bit integer and double precision floating point
operations (GCC only)
|
int128longdouble |
1000 iterations of a mix of 128 bit integer and long double precision floating
point operations (GCC only)
|
int128decimal32 |
1000 iterations of a mix of 128 bit integer and 32 bit decimal floating point
operations (GCC only)
|
int128decimal64 |
1000 iterations of a mix of 128 bit integer and 64 bit decimal floating point
operations (GCC only)
|
int128decimal128 |
1000 iterations of a mix of 128 bit integer and 128 bit decimal floating point
operations (GCC only)
|
intconversion |
perform 65536 iterations of integer conversions between
int16, int32 and int64 variables.
|
jenkin |
Jenkin's integer hash on 128 rounds of 128..1 bytes of random data
|
jmp |
Simple unoptimised compare >, <, == and jmp branching
|
ln2 |
compute ln(2) based on series:
1 - 1/2 + 1/3 - 1/4 + 1/5 - 1/6 ... |
longdouble |
1000 iterations of a mix of long double precision floating point operations
|
loop |
simple empty loop
|
matrixprod |
matrix product of two 128 × 128 matrices of double floats. Testing on 64
bit x86 hardware shows that this is provides a good mix of memory, cache and
floating point operations and is probably the best CPU method to use to make
a CPU run hot.
|
nsqrt |
compute sqrt() of long doubles using Newton-Raphson
|
omega |
compute the omega constant defined by Ωe↑Ω = 1 using efficient
iteration of Ωn+1 = (1 + Ωn) / (1 + e↑Ωn)
|
parity |
compute parity using various methods from the Standford Bit Twiddling Hacks.
Methods employed are: the naïve way, the naïve way with the Brian
Kernigan bit counting optimisation, the multiply way, the parallel way, and
the lookup table ways (2 variations).
|
phi |
compute the Golden Ratio φ using series
|
pi |
compute π using the Srinivasa Ramanujan fast convergence algorithm
|
pjw |
128 rounds of hash pjw function on 128 to 1 bytes of random strings
|
prime |
find all the primes in the range 1..1000000 using a slightly
optimised brute force naïve trial division search
|
psi |
compute ψ (the reciprocal Fibonacci constant) using the sum of the
reciprocals of the Fibonacci numbers
|
queens |
compute all the solutions of the classic 8 queens problem for board sizes 1..12
|
rand |
16384 iterations of rand(), where rand is the MWC pseudo
random number generator.
The MWC random function concatenates two 16 bit multiply-with-carry
generators:
x(n) = 36969 × x(n - 1) + carry, y(n) = 18000 × y(n - 1) + carry mod 2 ↑ 16
and has period of around 2 ↑ 60
|
rand48 |
16384 iterations of lrand48(3)
|
rgb |
convert RGB to YUV and back to RGB (CCIR 601)
|
sdbm |
128 rounds of hash sdbm (as used in the SDBM database and GNU awk) on 128 to
1 bytes of random strings
|
sieve |
find the primes in the range 1..10000000 using the sieve of Eratosthenes
|
stats |
calculate minimum, maximum, arithmetic mean, geometric mean, harmoninc mean
and standard deviation on 250 randomly generated positive double precision
value.
|
sqrt |
compute sqrt(rand()), where rand is the MWC pseudo random number generator
|
trig |
compute sin(θ) × cos(θ) + sin(2θ) + cos(3θ) for float, double
and long double sine and cosine functions where θ = 0 to 2π in 1500 steps
|
union |
perform integer arithmetic on a mix of bit fields in a C union. This exercises
how well the compiler and CPU can perform integer bit field loads and stores.
|
zeta |
compute the Riemann Zeta function ζ(s) for s = 2.0..10.0
|
Note that some of these methods try to exercise the CPU with computations found in some real world use cases. However, the code has not been optimised on a per-architecture basis, so may be a sub-optimal compared to hand-optimised code used in some applications. They do try to represent the typical instruction mixes found in these use cases.
Method | Description |
clock_ns |
sleep for the specified time using the clock_nanosleep(2) high
resolution nanosleep and the CLOCK_REALTIME real time clock.
|
itimer |
wakeup a paused process with a CLOCK_REALTIME itimer signal.
|
poll |
delay for the specified time using a poll delay loop that checks
for time changes using clock_gettime(2) on the CLOCK_REALTIME clock.
|
posix_ns |
sleep for the specified time using the POSIX nanosleep(2) high
resolution nanosleep.
|
pselect |
sleep for the specified time using pselect(2) with null file descriptors.
|
usleep |
sleep to the nearest microsecond using usleep(2).
|
Option | Description |
probe |
default option, probe the file system for valid allowed characters in a file name
and use these
|
posix |
use characters as specified by The Open Group Base Specifications Issue 7,
POSIX.1-2008, 3.278 Portable Filename Character Set
|
ext |
use characters allowed by the ext2, ext3, ext4 file systems, namely any 8
bit character apart from NUL and /
|
Option | Description |
direct |
try to minimize cache effects of the I/O. File I/O writes are performed
directly from user space buffers and synchronous transfer is also attempted.
To guarantee synchronous I/O, also use the sync option.
|
dsync |
ensure output has been transferred to underlying hardware and file metadata
has been updated (using the O_DSYNC open flag). This is equivalent to each
fdatasync(2). See also the fdatasync
option.
|
fadv-dontneed |
advise kernel to expect the data will not be accessed in the near future.
|
fadv-noreuse |
advise kernel to expect the data to be accessed only once.
|
fadv-normal |
advise kernel there are no explicit access pattern for the data. This is the
default advice assumption.
|
fadv-rnd |
advise kernel to expect random access patterns for the data.
|
fadv-seq |
advise kernel to expect sequential access patterns for the data.
|
fadv-willneed |
advise kernel to expect the data to be accessed in the near future.
|
fsync |
flush all modified in-core data after each write to the output device using an
explicit fsync(2) call.
|
fdatasync |
similar to fsync, but do not flush the modified metadata unless metadata is
required for later data reads to be handled correctly. This uses an explicit
fdatasync(2) call.
|
iovec |
use readv/writev multiple buffer I/Os rather than read/write. Instead of 1
read/write operation, the buffer is broken into an iovec of 16 buffers.
|
noatime |
do not update the file last access timestamp, this can reduce metadata writes.
|
sync |
ensure output has been transferred to underlying hardware (using the O_SYNC
open flag). This is equivalent to a each write(2) being followed by a call to
fsync(2). See also the fsync option.
|
rd-rnd |
read data randomly. By default, written data is not read back, however, this
option will force it to be read back randomly.
|
rd-seq |
read data sequentially. By default, written data is not read back, however,
this option will force it to be read back sequentially.
|
syncfs |
write all buffered modifications of file metadata and data on the filesystem
that contains the hdd worker files.
|
utimes |
force update of file timestamp which may increase metadata writes.
|
wr-rnd |
write data randomly. The wr-seq option cannot be used at the same time.
|
wr-seq |
write data sequentially. This is the default if no write modes are specified.
|
Note that some of these options are mutually exclusive, for example, there can be only one method of writing or reading. Also, fadvise flags may be mutually exclusive, for example fadv-willneed cannot be used with fadv-dontneed.
By default, this will exercise all the matrix stress methods one by one. One can specify a specific matrix stress method with the --matrix-method option.
Method | Description |
all |
iterate over all the below matrix stress methods
|
add |
add two N × N matrices
|
copy |
copy one N × N matrix to another
|
div |
divide an N × N matrix by a scalar
|
frobenius |
Frobenius product of two N × N matrices
|
hadamard |
Hadamard product of two N × N matrices
|
identity |
create an N × N identity matrix
|
mean |
arithmetic mean of two N × N matrices
|
mult |
multiply an N × N matrix by a scalar
|
negate |
negate an N × N matrix
|
prod |
product of two N × N matrices
|
sub |
subtract one N × N matrix from another N × N matrix
|
square |
multiply an N × N matrix by itself
|
trans |
transpose an N × N matrix
|
zero |
zero an N × N matrix
|
By default, this will exercise all the 3D matrix stress methods one by one. One can specify a specific 3D matrix stress method with the --matrix-3d-method option.
Method | Description |
all |
iterate over all the below matrix stress methods
|
add |
add two N × N × N matrices
|
copy |
copy one N × N × N matrix to another
|
div |
divide an N × N × N matrix by a scalar
|
frobenius |
Frobenius product of two N × N × N matrices
|
hadamard |
Hadamard product of two N × N × N matrices
|
identity |
create an N × N × N identity matrix
|
mean |
arithmetic mean of two N × N × N matrices
|
mult |
multiply an N × N × N matrix by a scalar
|
negate |
negate an N × N × N matrix
|
sub |
subtract one N × N × N matrix from another N × N × N matrix
|
trans |
transpose an N × N × N matrix
|
zero |
zero an N × N × N matrix
|
Method | Description |
all |
use libc, builtin and naive methods
|
libc |
use libc memcpy and memmove functions, this is the default
|
builtin |
use the compiler built in optimized memcpy and memmove functions
|
naive |
use unoptimized naive byte by byte copying and memory moving
|
Method | Description |
all |
iterate over all the below memthrash methods
|
chunk1 |
memset 1 byte chunks of random data into random locations
|
chunk8 |
memset 8 byte chunks of random data into random locations
|
chunk64 |
memset 64 byte chunks of random data into random locations
|
chunk256 |
memset 256 byte chunks of random data into random locations
|
chunkpage |
memset page size chunks of random data into random locations
|
flip |
flip (invert) all bits in random locations
|
flush |
flush cache line in random locations
|
lock |
lock randomly choosing locations (Intel x86 and ARM CPUs only)
|
matrix |
treat memory as a 2 × 2 matrix and swap random elements
|
memset |
memset the memory with random data
|
mfence |
stores with write serialization
|
prefetch |
prefetch data at random memory locations
|
random |
randomly run any of the memthrash methods except for 'random' and 'all'
|
spinread |
spin loop read the same random location 2^19 times
|
spinwrite |
spin loop write the same random location 2^19 times
|
swap |
step through memory swapping bytes in steps of 65 and 129 byte strides
|
Method | Description |
inc |
use incrementing 32 bit opcode patterns from 0x00000000 to 0xfffffff inclusive.
|
mixed |
use a mix of incrementing 32 bit opcode patterns and random 32 bit opcode patterns that
are also inverted, encoded with gray encoding and bit reversed.
|
random |
generate opcodes using random bytes from a mwc random generator.
|
text |
copies random chunks of code from the stress-ng text segment and randomly flips
single bits in a random choice of 1/8th of the code.
|
Method | Description |
all |
iterate over all the rawdev stress methods as listed below:
|
sweep |
repeatedly read across the raw device from the 0th block to the end block in steps
of the number of blocks on the device / 128 and back to the start again.
|
wiggle |
repeatedly read across the raw device in 128 evenly steps with each step reading
1024 blocks backwards from each step.
|
ends |
repeatedly read the first and last 128 start and end blocks of the raw device
alternating from start of the device to the end of the device.
|
random |
repeatedly read 256 random blocks
|
burst |
repeatedly read 256 sequential blocks starting from a random block on the raw device.
|
Operation | Description |
copy |
c[i] = a[i]
|
scale |
b[i] = scalar * c[i]
|
add |
c[i] = a[i] + b[i]
|
triad |
a[i] = b[i] + (c[i] * scalar)
|
Since this is loosely based on a variant of the STREAM benchmark code, DO NOT submit results based on this as it is intended to in stress-ng just to stress memory and compute and NOT intended for STREAM accurate tuned or non-tuned benchmarking whatsoever. Use the official STREAM benchmarking tool if you desire accurate and standardised STREAM benchmarks.
1. Initialised. The anonymously memory mapped region is set to a known pattern.
2. Exercised. Memory is modified in a known predictable way. Some vm workers alter memory sequentially, some use small or large strides to step along memory.
3. Checked. The modified memory is checked to see if it matches the expected result.
The vm methods containing 'prime' in their name have a stride of the largest prime less than 2^64, allowing to them to thoroughly step through memory and touch all locations just once while also doing without touching memory cells next to each other. This strategy exercises the cache and page non-locality.
Since the memory being exercised is virtually mapped then there is no guarantee of touching page addresses in any particular physical order. These workers should not be used to test that all the system's memory is working correctly either, use tools such as memtest86 instead.
The vm stress methods are intended to exercise memory in ways to possibly find memory issues and to try to force thermal errors.
Available vm stress methods are described as follows:
Method | Description |
all |
iterate over all the vm stress methods as listed below.
|
flip |
sequentially work through memory 8 times, each time just one bit in memory
flipped (inverted). This will effectively invert each byte in 8 passes.
|
galpat-0 |
galloping pattern zeros. This sets all bits to 0 and flips just 1 in 4096 bits
to 1. It then checks to see if the 1s are pulled down to 0 by their neighbours
or of the neighbours have been pulled up to 1.
|
galpat-1 |
galloping pattern ones. This sets all bits to 1 and flips just 1 in 4096 bits
to 0. It then checks to see if the 0s are pulled up to 1 by their neighbours
or of the neighbours have been pulled down to 0.
|
gray |
fill the memory with sequential gray codes (these only change 1 bit at a time
between adjacent bytes) and then check if they are set correctly.
|
incdec |
work sequentially through memory twice, the first pass increments each byte by
a specific value and the second pass decrements each byte back to the original
start value. The increment/decrement value changes on each invocation of the
stressor.
|
inc-nybble |
initialise memory to a set value (that changes on each invocation of the
stressor) and then sequentially work through each byte incrementing the bottom
4 bits by 1 and the top 4 bits by 15.
|
rand-set |
sequentially work through memory in 64 bit chunks setting bytes in the chunk
to the same 8 bit random value. The random value changes on each chunk.
Check that the values have not changed.
|
rand-sum |
sequentially set all memory to random values and then summate the number of
bits that have changed from the original set values.
|
read64 |
sequentially read memory using 32 x 64 bit reads per bogo loop. Each loop
equates to one bogo operation. This exercises raw memory reads.
|
ror |
fill memory with a random pattern and then sequentially rotate 64 bits of
memory right by one bit, then check the final load/rotate/stored values.
|
swap |
fill memory in 64 byte chunks with random patterns. Then swap each 64 chunk
with a randomly chosen chunk. Finally, reverse the swap to put the chunks back
to their original place and check if the data is correct. This exercises
adjacent and random memory load/stores.
|
move-inv |
sequentially fill memory 64 bits of memory at a time with random values, and
then check if the memory is set correctly. Next, sequentially invert each 64
bit pattern and again check if the memory is set as expected.
|
modulo-x |
fill memory over 23 iterations. Each iteration starts one byte further along
from the start of the memory and steps along in 23 byte strides. In each
stride, the first byte is set to a random pattern and all other bytes are set
to the inverse. Then it checks see if the first byte contains the expected
random pattern. This exercises cache store/reads as well as seeing if
neighbouring cells influence each other.
|
prime-0 |
iterate 8 times by stepping through memory in very large prime strides clearing
just on bit at a time in every byte. Then check to see if all bits are set to
zero.
|
prime-1 |
iterate 8 times by stepping through memory in very large prime strides setting
just on bit at a time in every byte. Then check to see if all bits are set to
one.
|
prime-gray-0 |
first step through memory in very large prime strides clearing just on bit
(based on a gray code) in every byte. Next, repeat this but clear the other
7 bits. Then check to see if all bits are set to zero.
|
prime-gray-1 |
first step through memory in very large prime strides setting just on bit
(based on a gray code) in every byte. Next, repeat this but set the other 7
bits. Then check to see if all bits are set to one.
|
rowhammer |
try to force memory corruption using the rowhammer memory stressor. This
fetches two 32 bit integers from memory and forces a cache flush on the two
addresses multiple times. This has been known to force bit flipping on some
hardware, especially with lower frequency memory refresh cycles.
|
walk-0d |
for each byte in memory, walk through each data line setting them to low (and
the others are set high) and check that the written value is as expected. This
checks if any data lines are stuck.
|
walk-1d |
for each byte in memory, walk through each data line setting them to high (and
the others are set low) and check that the written value is as expected. This
checks if any data lines are stuck.
|
walk-0a |
in the given memory mapping, work through a range of specially chosen addresses
working through address lines to see if any address lines are stuck low. This
works best with physical memory addressing, however, exercising these virtual
addresses has some value too.
|
walk-1a |
in the given memory mapping, work through a range of specially chosen addresses
working through address lines to see if any address lines are stuck high. This
works best with physical memory addressing, however, exercising these virtual
addresses has some value too.
|
write64 |
sequentially write memory using 32 x 64 bit writes per bogo loop. Each loop
equates to one bogo operation. This exercises raw memory writes. Note that
memory writes are not checked at the end of each test iteration.
|
zero-one |
set all memory bits to zero and then check if any bits are not zero. Next, set
all the memory bits to one and check if any bits are not one.
|
Available vm address stress methods are described as follows:
Method | Description |
all |
iterate over all the vm stress methods as listed below.
|
pwr2 |
work through memory addresses in steps of powers of two.
|
pwr2inv |
like pwr2, but with the all relevant address bits inverted.
|
gray |
work through memory with gray coded addresses so that each
change of address just changes 1 bit compared to the previous
address.
|
grayinv |
like gray, but with the all relevant address bits inverted,
hence all bits change apart from 1 in the address range.
|
rev |
work through the address range with the bits in the address
range reversed.
|
revinv |
like rev, but with all the relevant address bits inverted.
|
inc |
work through the address range forwards sequentially, byte
by byte.
|
incinv |
like inc, but with all the relevant address bits inverted.
|
dec |
work through the address range backwards sequentially, byte
by byte.
|
decinv |
like dec, but with all the relevant address bits inverted.
|
Method | Description |
00ff |
randomly distributed 0x00 and 0xFF values.
|
ascii01 |
randomly distributed ASCII 0 and 1 characters.
|
asciidigits |
randomly distributed ASCII digits in the range of 0 and 9.
|
bcd |
packed binary coded decimals, 0..99 packed into 2 4-bit nybbles.
|
binary |
32 bit random numbers.
|
brown |
8 bit brown noise (Brownian motion/Random Walk noise).
|
double |
double precision floating point numbers from sin(θ).
|
fixed |
data stream is repeated 0x04030201.
|
gray |
16 bit gray codes generated from an incrementing counter.
|
latin |
Random latin sentences from a sample of Lorem Ipsum text.
|
logmap |
Values generated from a logistical map of the equation
Χn+1 = r × Χn × (1 - Χn) where r > ~~ 3.56994567
to produce chaotic data. The values are scaled by a large arbitrary
value and the lower 8 bits of this value are compressed.
|
lrand48 |
Uniformly distributed pseudo-random 32 bit values generated from lrand48(3).
|
morse |
Morse code generated from random latin sentences from a sample of Lorem Ipsum text.
|
nybble |
randomly distributed bytes in the range of 0x00 to 0x0f.
|
objcode |
object code selected from a random start point in the stress-ng text segment.
|
parity |
7 bit binary data with 1 parity bit.
|
pink |
pink noise in the range 0..255 generated using the Gardner method with
the McCartney selection tree optimization. Pink noise is where the power
spectral density is inversely proportional to the frequency of the signal
and hence is slightly compressible.
|
random |
segments of the data stream are created by randomly calling the different data generation
methods.
|
rarely1 |
data that has a single 1 in every 32 bits, randomly located.
|
rarely0 |
data that has a single 0 in every 32 bits, randomly located.
|
text |
random ASCII text.
|
utf8 |
random 8 bit data encoded to UTF-8.
|
zero |
all zeros, compresses very easily.
|
stress-ng --vm 8 --vm-bytes 80% -t 1h
stress-ng --cpu 4 --io 2 --vm 1 --vm-bytes 1G --timeout 60s
stress-ng --iomix 2 --iomix-bytes 10% -t 10m
stress-ng --cyclic 1 --cyclic-dist 2500 --cyclic-method clock_ns --cyclic-prio 100 --cyclic-sleep 10000 --hdd 0 -t 1m
stress-ng --cpu 8 --cpu-ops 800000
stress-ng --sequential 2 --timeout 2m --metrics
stress-ng --cpu 4 --cpu-method fft --cpu-ops 10000 --metrics-brief
stress-ng --cpu 0 --cpu-method all -t 1h
stress-ng --all 4 --timeout 5m
stress-ng --random 64
stress-ng --cpu 64 --cpu-method all --verify -t 10m --metrics-brief
stress-ng --sequential 0 -t 10m
stress-ng --sequential 8 --class io -t 5m --times
stress-ng --all 0 --maximize --aggressive
stress-ng --random 32 -x numa,hdd,key
stress-ng --sequential 4 --class vm --exclude bigheap,brk,stack
stress-ng --taskset 0,2-3 --cpu 3
Status | Description |
0 |
Success.
|
1 |
Error; incorrect user options or a fatal resource issue in the stress-ng
stressor harness (for example, out of memory).
|
2 |
One or more stressors failed.
|
3 |
One or more stressors failed to initialise because of lack of resources,
for example ENOMEM (no memory), ENOSPC (no space on file system) or a
missing or unimplemented system call.
|
4 |
One or more stressors were not implemented on a specific architecture
or operating system.
|
5 |
A stressor has been killed by an unexpected signal.
|
6 |
A stressor exited by exit(2) which was not expected and timing metrics
could not be gathered.
|
Sending a SIGUSR2 to stress-ng will dump out the current load average and memory statistics.
Note that the stress-ng cpu, io, vm and hdd tests are different implementations of the original stress tests and hence may produce different stress characteristics. stress-ng does not support any GPU stress tests.
The bogo operations metrics may change with each release because of bug fixes to the code, new features, compiler optimisations or changes in system call performance.