Stress-ng

stress-ng will stress test a computer system in various selectable ways. It was designed to exercise various physical subsystems of a computer as well as the various operating system kernel interfaces. Stress-ng features:

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 apropriate 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 online processors as defined by sysconf(_SC_NPROCESSORS_ONLN).

Bugs found with stress-ng

stress-ng has found several Linux Kernel bugs and appropriate fixes have been landed to address these issues:

At build-time stress-ng will detect kernel features that are available on the target build system and enable stress tests appropriately. Stress-ng has been build-tested on Ubuntu, Debian, Debian GNU/Hurd, kFreeBSD, OpenBSD, NetBSD, FreeBSD, Debian kFreeBSD, Minix and OpenIndiana. Ports to other POSIX/UNIX like operating systems should be relatively easy.

Stress-ng stress tests

The following specific stress tests are available:

af-alg affinity aio aiol apparmor atomic bigheap bind-mount brk bsearch cache cap chdir chmod chown chroot clock clone context copy-file cpu cpu-online crypt daemon dccp dentry dev dir dirdeep dnotify dup epoll eventfd exec fallocate fanotify fault fcntl fiemap fifo filename flock fork fp-error fstat full futex get getdent getrandom handle hdd heapsort hsearch icache icmp-flood inotify io iomix ioprio itimer kcmp key kill klog lease link locka lockbus lockf lockofd longjmp lsearch madvise malloc matrix membarrier memcpy memfd memthrash mergesort mincore mknod mlock mmap mmapfork mmapmany mq mremap msg msync netdev netlink-proc nice nop null numa oom-pipe opcode open personality pipe poll procfs pthread ptrace pty qsort quota rdrand readahead remap rename resources rlimit rmap rt-sched rtc schedpolicy sctp seal seccomp seek sem sem-sysv sendfile shm shm-sysv sigfd sigfpe sigpending sigq sigsegv sigsuspend sleep sock sockfd sockpair softlockup spawn splice stack stackmmap str stream switch symlink sync-file sysfs sysinfo tee timer timerfd tlb-shootdown tmpfs tsc tsearch udp udp-flood unshare urandom userfaultfd utime vecmath vfork vforkmany vm vm-rw vm-splice wait wcs xattr yield zero zlib zombie

For more details of each stress test, please consult the stress-ng manual.

Stress tests are also grouped as "classes", these exercise specific aspects of the operating system. The following classes are available: cpu cpu-cache device io interrupt filesystem memory network os pipe scheduler security vm

For example, to run 2 instances of each of the memory specific stressors use:
stress-ng --class memory 2

CPU specific stress methods

These can be specified using the --cpu-method option, available methods are:
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
bitopsvarious bit operations from bithack, namely: reverse bits, parity check, bit count, round to nearest power of 2
callfuncrecursively call 8 argument C function to a depth of 1024 calls and unwind
cdouble1000 iterations of a mix of double floating point complex operations
cfloat1000 iterations of a mix of floating point complex operations
clongdouble1000 iterations of a mix of long double floating point complex operations
correlateperform a 16384 * 1024 correlation of random doubles
crc16compute 1024 rounds of CCITT CRC16 on random data
decimal321000 iterations of a mix of 32 bit decimal floating point operations (GCC only)
decimal641000 iterations of a mix of 64 bit decimal floating point operations (GCC only)
decimal1281000 iterations of a mix of 128 bit decimal floating point operations (GCC only)
ditherFloyd–Steinberg dithering of a 1024 × 768 random image from 8 bits down to 1 bit of depth
djb2a128 rounds of hash DJB2a (Dan Bernstein hash using the xor variant) on 128 to 1 bytes of random strings
double1000 iterations of a mix of double precision floating point operations
eulercompute e using n = (1 + (1 / n))n
explogiterate on n = exp(log(n) / 1.00002)
fibonaccicompute Fibonacci sequence of 0, 1, 1, 2, 5, 8...
fft4096 sample Fast Fourier Transform
float1000 iterations of a mix of floating point operations
fnv1a128 rounds of hash FNV-1a (Fowler-Noll-Vo hash using the xor then multiply variant) on 128 to 1 bytes of random strings
gammacalculate 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.
gcdcompute GCD of integers
graycalculate binary to gray code and gray code back to binary for integers from 0 to 65535
hammingcompute 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
hanoisolve a 21 disc Towers of Hanoi stack using the recursive solution
hyperboliccompute sinh(θ) * cosh(θ) + sinh(2θ) + cosh(3θ) for float, double and long double hyperbolic sine and cosine functions where θ = 0 to 2 * π in 1500 steps
idct8 * 8 IDCT (Inverse Discrete Cosine Transform)
int8mix of 8 bit integer operations
int16mix of 16 bit integer operations
int32mix of 32 bit integer operations
int64mix of 64 bit integer operations
int128mix of 128 bit integer operations
int32floatmix of 32 bit integer and floating point operations
int32doublemix of 32 bit integer and double precision floating point operations
int32longdoublemix of 32 bit integer and long double pointing operations
int64floatmix of 64 bit integer and floating point operations
int64doublemix of 64 bit integer and double precision floating point operations
int64longdoublemix of 64 bit integer and long double pointing operations
int128floatmix of 128 bit integer and floating point operations
int128doublemix of 128 bit integer and double precision floating point operations
int128longdoublemix of 128 bit integer and long double pointing operations
int128idecimal32mix of 128 bit integer and 32 bit decimal pointing operations
int128idecimal64mix of 128 bit integer and 64 bit decimal pointing operations
int128idecimal128mix of 128 bit integer and 128 bit decimal pointing operations
jenkinJenkin's integer hash on 128 rounds of 128..1 bytes of random data
jmpSimple unoptimised compare <, >, == and jmp branching
ln2compute ln(2) based on series: 1 - 1/2 + 1/3 - 1/4 + 1/5 - 1/6 ...
longdouble1000 iterations of a mix of long double precision floating point operations
loopsimple empty loop
maxtrixprodmatrix 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.
nsqrtsqrt() using Newton-Raphson
omegacompute the omega constant defined by ΩeΩ = 1 using efficient iteration of Ωn+1 = (1 + Ωn) / (1 + eΩn)
paritycompute 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)
phicompute the Golden Ratio φ using series
picompute π using the Srinivasa Ramanujan fast convergence algorithm
pjw128 rounds of hash pjw function on 128 to 1 bytes of random strings
primefind all the primes in the range 1..1000000 using a slightly optimised brute force naive trial division search
psicompute ψ (the reciprocal Fibonacci constant) using the sum of the reciprocals of the Fibonacci numbers
queenscompute all the solutions of the classic 8 queens problem for board sizes 1..12
rand16384 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 216
rgbconvert RGB to YUV and back to RGB (CCIR 601)
sdbm128 rounds of hash sdbm (as used in the SDBM database and GNU awk) on 128 to 1 bytes of random strings
trigcompute sin(θ) * cos(θ) + sin(2θ) + cos(3θ) for float, double and long double sine and cosine functions where θ = 0 to 2 * π in 1500 steps
zetacompute the Riemann Zeta function ζ(s) for s = 2.0..10.0

VM specific stress methods

These can be specified using the --vm-method option, available methods are:
alliterate over all the vm stress methods as listed below
flipsequentially work through memory 8 times, each time just one bit in memory flipped (inverted). This will effectively invert each byte in 8 passes.
galpat-0galloping 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-1galloping 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.
grayfill 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.
incdecwork 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-nybbleinitialise 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-setsequentially 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-sumsequentially set all memory to random values and then summate the number of bits that have changed from the original set values.
rorfill 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.
swapfill memory in 64 byte chunks with random patters. 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-invsequentially 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-xfill memory with 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-0iterate 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-1iterate 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-0first 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-1first 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.
walk-0dfor 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-1dfor 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-0ain 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-1ain 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.
zero-oneset 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.

Matrix specific stress methods

These can be specified using the --matrix-method option, available methods are:
addAddition of 2 N x N matrices
divDivide an N x N matrix by a scalar
frobeniusFrobenius product of 2 N x N matrices
hadamardHadamard product of 2 N x N matrices
multMultiply an N x N matrix by a scalar
prodMatrix product of 2 N x N matrices
subSubtract an N x N matrix from another N x N matrix
transTranspose an N x N matrix

Examples

stress-ng --cpu 4 --vm 2 --hdd 1 --fork 8 --switch 4 --timeout 5m --metrics-brief
stress-ng: info: [31135] dispatching hogs: 4 cpu, 8 fork, 1 hdd, 4 switch, 2 vm
stress-ng: info: [31135] successful run completed in 300.31s
stress-ng: info: [31135] stressor      bogo ops real time  usr time  sys time   bogo ops/s   bogo ops/s
stress-ng: info: [31135]                          (secs)    (secs)    (secs)   (real time) (usr+sys time)
stress-ng: info: [31135] cpu              33480    300.10    317.07      2.50       111.56       104.77
stress-ng: info: [31135] fork            173399    300.00      2.87     45.28       578.00      3601.23
stress-ng: info: [31135] hdd             868352    300.31      0.16     68.36      2891.56     12672.97
stress-ng: info: [31135] switch       368616604    300.00     43.35    477.37   1228706.01    707897.92
stress-ng: info: [31135] vm                 860    300.06     11.76    136.11         2.87         5.82
stress-ng --vm 32 --vm-bytes 64M --vm-stride 1K --vm-populate --page-in --metrics-brief --times --timeout 60s
stress-ng: info: [15057] dispatching hogs: 32 vm
stress-ng: info: [15057] successful run completed in 60.07s
stress-ng: info: [15057] stressor      bogo ops real time  usr time  sys time   bogo ops/s   bogo ops/s
stress-ng: info: [15057]                          (secs)    (secs)    (secs)   (real time) (usr+sys time)
stress-ng: info: [15057] vm                5640     60.01     24.93    180.26        93.98        27.49
stress-ng: info: [15057] for a 60.07s run time:
stress-ng: info: [15057]     240.29s available CPU time
stress-ng: info: [15057]      25.08s user time   ( 10.44%)
stress-ng: info: [15057]     180.46s system time ( 75.10%)
stress-ng: info: [15057]     205.54s total time  ( 85.54%)
sudo stress-ng --all 1 --page-in --ionice-class realtime --ionice-level 0 --sched batch --sched-prio 0 --metrics -t 60 --times 
stress-ng: info:  [18823] dispatching hogs: 1 af-alg, 1 affinity, 1 aio, 1 aiol, 1 apparmor, 1 atomic, 1 bigheap, 1 branch, 1 brk, 1 bsearch, 1 cache, 1 cap, 1 chdir, 1 chmod, 1 chown, 1 chroot, 1 clock, 1 clone, 1 context, 1 copy-file, 1 cpu, 1 crypt, 1 cyclic, 1 daemon, 1 dccp, 1 dentry, 1 dev, 1 dir, 1 dirdeep, 1 dnotify, 1 dup, 1 epoll, 1 eventfd, 1 exec, 1 fallocate, 1 fanotify, 1 fault, 1 fcntl, 1 fiemap, 1 fifo, 1 filename, 1 flock, 1 fork, 1 fp-error, 1 fstat, 1 full, 1 futex, 1 get, 1 getdent, 1 getrandom, 1 handle, 1 hdd, 1 heapsort, 1 hsearch, 1 icache, 1 icmp-flood, 1 inode-flags, 1 inotify, 1 io, 1 iomix, 1 ioprio, 1 itimer, 1 kcmp, 1 key, 1 kill, 1 klog, 1 lease, 1 link, 1 locka, 1 lockbus, 1 lockf, 1 lockofd, 1 longjmp, 1 lsearch, 1 madvise, 1 malloc, 1 matrix, 1 membarrier, 1 memcpy, 1 memfd, 1 memrate, 1 memthrash, 1 mergesort, 1 mincore, 1 mknod, 1 mlock, 1 mmap, 1 mmapfork, 1 mmapmany, 1 mq, 1 mremap, 1 msg, 1 msync, 1 netdev, 1 netlink-proc, 1 nice, 1 nop, 1 null, 1 numa, 1 opcode, 1 open, 1 personality, 1 pipe, 1 poll, 1 procfs, 1 pthread, 1 ptrace, 1 pty, 1 qsort, 1 quota, 1 radixsort, 1 rdrand, 1 readahead, 1 remap, 1 rename, 1 resources, 1 rlimit, 1 rmap, 1 rtc, 1 schedpolicy, 1 sctp, 1 seal, 1 seccomp, 1 seek, 1 sem, 1 sem-sysv, 1 sendfile, 1 shm, 1 shm-sysv, 1 sigfd, 1 sigfpe, 1 sigpending, 1 sigq, 1 sigsegv, 1 sigsuspend, 1 sleep, 1 sock, 1 sockdiag, 1 sockfd, 1 sockpair, 1 softlockup, 1 spawn, 1 splice, 1 stack, 1 stackmmap, 1 str, 1 stream, 1 swap, 1 switch, 1 symlink, 1 sync-file, 1 sysfs, 1 sysinfo, 1 tee, 1 timer, 1 timerfd, 1 tlb-shootdown, 1 tmpfs, 1 tsc, 1 tsearch, 1 udp, 1 udp-flood, 1 unshare, 1 urandom, 1 userfaultfd, 1 utime, 1 vecmath, 1 vfork, 1 vforkmany, 1 vm, 1 vm-rw, 1 vm-splice, 1 wait, 1 wcs, 1 xattr, 1 yield, 1 zero, 1 zlib, 1 zombie
stress-ng: info:  [18823] successful run completed in 150.64s (2 mins, 30.64 secs)
stress-ng: info:  [18823] stressor       bogo ops real time  usr time  sys time   bogo ops/s   bogo ops/s
stress-ng: info:  [18823]                           (secs)    (secs)    (secs)   (real time) (usr+sys time)
stress-ng: info:  [18823] af-alg            16066     60.46      0.03      1.10       265.71     14217.70
stress-ng: info:  [18823] affinity            208     60.08      0.00      0.00         3.46         0.00
stress-ng: info:  [18823] aio                3381     60.04      0.00      0.12        56.32     28175.00
stress-ng: info:  [18823] aiol                  0      0.57      0.00      0.00         0.00         0.00
stress-ng: info:  [18823] apparmor          21760     60.17      0.13      4.68       361.67      4523.91
stress-ng: info:  [18823] atomic          1128681     60.12      1.56      0.00     18773.04    723513.46
stress-ng: info:  [18823] bigheap            1862     60.43      0.98      0.17        30.81      1619.13
stress-ng: info:  [18823] branch         93939070     60.05      1.62      0.00   1564235.15  57987080.25
stress-ng: info:  [18823] brk              775434     61.74      0.10      2.26     12559.50    328573.73
stress-ng: info:  [18823] bsearch             479     60.02      1.16      0.00         7.98       412.93
stress-ng: info:  [18823] cache                 9     60.08      1.31      0.00         0.15         6.87
stress-ng: info:  [18823] cap              778314     60.01      0.24      1.34     12970.71    492603.80
stress-ng: info:  [18823] chdir                38     76.48      0.04      1.49         0.50        24.84
stress-ng: info:  [18823] chmod               710     69.38      0.00      0.54        10.23      1314.81
stress-ng: info:  [18823] chown             21320     60.31      0.03      0.87       353.51     23688.89
stress-ng: info:  [18823] chroot             4732     60.01      0.00      0.64        78.86      7393.75
stress-ng: info:  [18823] clock               635     60.05      0.18      1.51        10.58       375.74
stress-ng: info:  [18823] clone               147    150.62      0.00      0.06         0.98      2450.00
stress-ng: info:  [18823] context            7569     60.04      0.76      0.76       126.07      4979.61
stress-ng: info:  [18823] copy-file            40     62.85      0.00      0.53         0.64        75.47
stress-ng: info:  [18823] cpu                 223     60.07      1.23      0.03         3.71       176.98
stress-ng: info:  [18823] crypt               172     60.09      1.76      0.01         2.86        97.18
stress-ng: info:  [18823] cyclic           444896     60.04      0.94      2.32      7410.58    136471.17
stress-ng: info:  [18823] daemon             2425     60.00      0.00      0.00        40.42         0.00
stress-ng: info:  [18823] dccp                  1      1.29      0.00      0.00         0.78         0.00
stress-ng: info:  [18823] dentry             4096     74.05      0.02      0.89        55.32      4501.10
stress-ng: info:  [18823] dev                   1     73.28      0.00     13.96         0.01         0.07
stress-ng: info:  [18823] dir                8192     69.72      0.08      3.40       117.49      2354.02
stress-ng: info:  [18823] dirdeep            3115     75.09      0.04      3.16        41.48       973.44
stress-ng: info:  [18823] dnotify             192     69.35      0.00      0.40         2.77       480.00
stress-ng: info:  [18823] dup             2031585     60.06      0.31      0.88     33828.23   1707214.29
stress-ng: info:  [18823] epoll              2610     60.85      0.01      0.10        42.89     23727.27
stress-ng: info:  [18823] eventfd         1073765     60.01      0.28      3.02     17893.07    325383.33
stress-ng: info:  [18823] exec                  0      0.00      0.00      0.00         0.00         0.00
stress-ng: info:  [18823] fallocate             0     78.44      0.00      2.08         0.00         0.00
stress-ng: info:  [18823] fanotify          68034     92.95      0.08     18.20       731.95      3721.77
stress-ng: info:  [18823] fault              2583     60.94      0.00      0.42        42.39      6150.00
stress-ng: info:  [18823] fcntl             45412     60.34      0.04      0.74       752.59     58220.51
stress-ng: info:  [18823] fiemap                0     62.84      0.00      0.53         0.00         0.00
stress-ng: info:  [18823] fifo            1862410     60.31      0.24      2.67     30883.17    640003.44
stress-ng: info:  [18823] filename            300     62.88      0.01      0.48         4.77       612.24
stress-ng: info:  [18823] flock            968547     60.00      0.21      1.10     16142.00    739348.85
stress-ng: info:  [18823] fork               4945     60.00      0.02      0.67        82.42      7166.67
stress-ng: info:  [18823] fp-error        1098584     60.04      1.25      0.00     18297.50    878867.20
stress-ng: info:  [18823] fstat              6659     60.27      0.09      1.32       110.49      4722.70
stress-ng: info:  [18823] full             234896     60.12      0.62      0.55      3907.23    200765.81
stress-ng: info:  [18823] futex            128035     60.03      0.33      1.64      2133.02     64992.39
stress-ng: info:  [18823] get                 970     60.13      0.00      1.20        16.13       808.33
stress-ng: info:  [18823] getdent           28184     60.11      0.03      1.09       468.87     25164.29
stress-ng: info:  [18823] getrandom         27291     60.01      0.00      1.33       454.79     20519.55
stress-ng: info:  [18823] handle           106865     60.10      0.03      1.18      1778.08     88318.18
stress-ng: info:  [18823] hdd               11375     62.84      0.02      0.46       181.03     23697.92
stress-ng: info:  [18823] heapsort              3     60.05      1.16      0.00         0.05         2.59
stress-ng: info:  [18823] hsearch            3074     60.09      1.16      0.00        51.16      2650.00
stress-ng: info:  [18823] icache              956     60.09      0.18      1.00        15.91       810.17
stress-ng: info:  [18823] icmp-flood        84790     60.05      0.02      1.10      1412.07     75705.36
stress-ng: info:  [18823] inode-flags     2208750     60.59      0.24      4.21     36455.28    496348.31
stress-ng: info:  [18823] inotify               3     69.34      0.00      0.01         0.04       300.00
stress-ng: info:  [18823] io                   12     62.83      0.00      0.12         0.19       100.00
stress-ng: info:  [18823] iomix                 0     69.41      0.00      0.46         0.00         0.00
stress-ng: info:  [18823] ioprio              120     60.57      0.00      0.34         1.98       352.94
stress-ng: info:  [18823] itimer              448     60.02      0.26      1.14         7.46       320.00
stress-ng: info:  [18823] kcmp             179882     60.04      0.14      0.93      2996.06    168114.02
stress-ng: info:  [18823] key                1113      0.15      0.00      0.01      7312.55    111300.00
stress-ng: info:  [18823] kill                913     60.12      0.00      1.46        15.19       625.34
stress-ng: info:  [18823] klog                681     60.08      0.00      1.62        11.33       420.37
stress-ng: info:  [18823] lease                11     60.14      0.13      2.18         0.18         4.76
stress-ng: info:  [18823] link               9423     74.04      0.02      0.82       127.27     11217.86
stress-ng: info:  [18823] locka           5787200     60.15      0.50      2.18     96215.09   2159402.99
stress-ng: info:  [18823] lockbus         2170347     60.05      1.28      0.00     36143.46   1695583.59
stress-ng: info:  [18823] lockf             40261     60.13      0.02      1.68       669.57     23682.94
stress-ng: info:  [18823] lockofd         4612673     60.11      0.39      1.70     76738.38   2207020.57
stress-ng: info:  [18823] longjmp          109103     60.05      1.45      0.00      1817.02     75243.45
stress-ng: info:  [18823] lsearch               8     60.03      1.12      0.00         0.13         7.14
stress-ng: info:  [18823] madvise               1     60.27      0.13      1.12         0.02         0.80
stress-ng: info:  [18823] malloc          1312702     60.84      1.26      0.47     21576.93    758787.28
stress-ng: info:  [18823] matrix             5782     60.02      1.16      0.00        96.33      4984.48
stress-ng: info:  [18823] membarrier          635     60.11      0.01      0.00        10.56     63500.00
stress-ng: info:  [18823] memcpy             1201     60.05      1.09      0.00        20.00      1101.83
stress-ng: info:  [18823] memfd                 5     60.34      0.06      1.10         0.08         4.31
stress-ng: info:  [18823] memrate               3     60.10      1.78      0.06         0.05         1.63
stress-ng: info:  [18823] memthrash          1134     60.21      9.68      0.06        18.83       116.43
stress-ng: info:  [18823] mergesort            28     60.02      1.67      0.02         0.47        16.57
stress-ng: info:  [18823] mincore           38348     60.04      0.12      1.19       638.75     29273.28
stress-ng: info:  [18823] mknod              8192     74.97      0.06      1.89       109.27      4201.03
stress-ng: info:  [18823] mlock             71710     63.38      0.02      2.00      1131.51     35500.00
stress-ng: info:  [18823] mmap                  1     60.39      0.64      1.02         0.02         0.60
stress-ng: info:  [18823] mmapfork             59     60.07      2.59     11.66         0.98         4.14
stress-ng: info:  [18823] mmapmany         480977     60.45      0.05      1.30      7956.90    356279.26
stress-ng: info:  [18823] mq              3010570     60.09      0.32      2.78     50099.22    971151.61
stress-ng: info:  [18823] mremap                9     60.31      0.03      1.06         0.15         8.26
stress-ng: info:  [18823] msg              380072     60.24      0.04      1.34      6309.34    275414.49
stress-ng: info:  [18823] msync              2066     60.89      0.02      0.42        33.93      4695.45
stress-ng: info:  [18823] netdev                3      0.02      0.00      0.00       127.66         0.00
stress-ng: info:  [18823] netlink-proc        725     60.00      0.00      0.15        12.08      4833.33
stress-ng: info:  [18823] nice                316     60.00      1.61      5.39         5.27        45.14
stress-ng: info:  [18823] nop              176511     60.02      1.65      0.01      2940.71    106331.93
stress-ng: info:  [18823] null             296754     60.23      0.11      0.95      4926.75    279956.60
stress-ng: info:  [18823] numa                 16     63.02      0.04      1.40         0.25        11.11
stress-ng: info:  [18823] opcode             3725     60.08      0.03      0.53        62.00      6651.79
stress-ng: info:  [18823] open              15859     60.79      0.03      0.84       260.90     18228.74
stress-ng: info:  [18823] personality      635838     60.01      0.44      0.65     10594.72    583337.61
stress-ng: info:  [18823] pipe            1626214     60.13      0.65      2.37     27044.12    538481.46
stress-ng: info:  [18823] poll              30940     60.00      0.02      0.18       515.67    154700.00
stress-ng: info:  [18823] procfs                2     60.03      0.00      3.76         0.03         0.53
stress-ng: info:  [18823] pthread           40463     60.57      0.14      2.98       668.02     12968.91
stress-ng: info:  [18823] ptrace          1132919     60.00      0.32      3.43     18881.92    302111.73
stress-ng: info:  [18823] pty                  14     60.10      0.10      3.13         0.23         4.33
stress-ng: info:  [18823] qsort                19     60.06      2.34      0.00         0.32         8.12
stress-ng: info:  [18823] quota                 0      0.31      0.00      0.00         0.00         0.00
stress-ng: info:  [18823] radixsort            13     60.08      1.20      0.00         0.22        10.83
stress-ng: info:  [18823] rdrand           549041     60.04      1.60      0.00      9144.49    343150.62
stress-ng: info:  [18823] readahead             0     62.79      0.01      0.46         0.00         0.00
stress-ng: info:  [18823] remap               271     60.06      0.02      1.07         4.51       248.62
stress-ng: info:  [18823] rename            16500     60.89      0.02      0.44       270.98     35869.57
stress-ng: info:  [18823] resources          2048     84.58      0.32     29.03        24.21        69.78
stress-ng: info:  [18823] rlimit            21060     60.06      0.17      1.07       350.68     16983.87
stress-ng: info:  [18823] rmap              19296     62.80      3.01      3.01       307.24      3205.32
stress-ng: info:  [18823] rtc                5630     60.04      0.03      1.67        93.77      3311.76
stress-ng: info:  [18823] schedpolicy       49456     60.00      0.02      0.07       824.26    549511.11
stress-ng: info:  [18823] sctp                 31     60.00      0.00      0.33         0.52        93.94
stress-ng: info:  [18823] seal             141757     60.02      0.19      1.22      2361.88    100536.88
stress-ng: info:  [18823] seccomp            5086     60.00      0.00      0.66        84.77      7706.06
stress-ng: info:  [18823] seek                 17     60.93      0.00      0.00         0.28         0.00
stress-ng: info:  [18823] sem            86510151     60.04      2.14      0.50   1440812.94  32768996.59
stress-ng: info:  [18823] sem-sysv        2958889     60.00      0.30      3.44     49314.01    791146.79
stress-ng: info:  [18823] sendfile             70     60.47      0.00      1.88         1.16        37.23
stress-ng: info:  [18823] shm                 142     60.48      0.11      1.34         2.35        97.93
stress-ng: info:  [18823] shm-sysv            193     60.09      0.05      0.32         3.21       521.62
stress-ng: info:  [18823] sigfd           2396164     60.02      0.27      1.83     39922.84   1141030.48
stress-ng: info:  [18823] sigfpe          1046486     60.07      0.25      1.00     17419.79    837188.80
stress-ng: info:  [18823] sigpending       687953     60.04      0.17      0.84     11458.07    681141.58
stress-ng: info:  [18823] sigq            2692662     60.21      0.16      0.86     44722.62   2639864.71
stress-ng: info:  [18823] sigsegv          704513     60.04      0.22      0.83     11733.10    670964.76
stress-ng: info:  [18823] sigsuspend            0     60.04      0.10      1.08         0.00         0.00
stress-ng: info:  [18823] sleep           2032765     60.58      5.72     48.47     33557.00     37511.81
stress-ng: info:  [18823] sock               1186     60.03      0.03      2.90        19.76       404.78
stress-ng: info:  [18823] sockdiag        1281467     60.47      0.01      1.34     21191.14    949234.81
stress-ng: info:  [18823] sockfd                0      4.97      0.01      0.04         0.00         0.00
stress-ng: info:  [18823] sockpair         577622     60.56      0.07      1.46      9538.77    377530.72
stress-ng: info:  [18823] softlockup    118408446     60.01      4.83     38.42   1973170.04   2737767.54
stress-ng: info:  [18823] spawn                 0      0.00      0.00      0.00         0.00         0.00
stress-ng: info:  [18823] splice           145297     60.23      0.00      1.13      2412.48    128581.42
stress-ng: info:  [18823] stack                 0     61.56      0.05      1.98         0.00         0.00
stress-ng: info:  [18823] stackmmap           889     62.78      0.02      0.41        14.16      2067.44
stress-ng: info:  [18823] str               21920     60.02      1.32      0.00       365.24     16606.06
stress-ng: info:  [18823] stream               34     60.50      1.30      0.03         0.56        25.56
stress-ng: info:  [18823] swap                  0      0.70      0.00      0.01         0.00         0.00
stress-ng: info:  [18823] switch           747604     60.01      0.20      2.36     12458.28    292032.81
stress-ng: info:  [18823] symlink            7964     73.98      0.10      3.24       107.65      2384.43
stress-ng: info:  [18823] sync-file             0     62.78      0.00      0.42         0.00         0.00
stress-ng: info:  [18823] sysfs                 6     60.02      0.06      1.40         0.10         4.11
stress-ng: info:  [18823] sysinfo            1462     60.04      0.03      1.95        24.35       738.38
stress-ng: info:  [18823] tee               96190     60.11      0.05      2.57      1600.13     36713.74
stress-ng: info:  [18823] timer            508528     60.01      0.69      0.38      8473.49    475259.81
stress-ng: info:  [18823] timerfd               0     60.02      0.12      1.28         0.00         0.00
stress-ng: info:  [18823] tlb-shootdown       727     60.00      0.10      1.06        12.12       626.72
stress-ng: info:  [18823] tmpfs                 0     62.42      0.32      2.96         0.00         0.00
stress-ng: info:  [18823] tsc             1137609     60.03      1.04      0.00     18952.13   1093854.81
stress-ng: info:  [18823] tsearch              10     59.76      1.73      0.02         0.17         5.71
stress-ng: info:  [18823] udp               82593     60.01      0.02      1.65      1376.24     49456.89
stress-ng: info:  [18823] udp-flood         54241     60.03      0.02      1.22       903.51     43742.74
stress-ng: info:  [18823] unshare               5    150.39      0.01      0.02         0.03       166.67
stress-ng: info:  [18823] urandom           25139     60.02      0.01      1.25       418.87     19951.59
stress-ng: info:  [18823] userfaultfd      223687     60.06      0.05      0.72      3724.61    290502.60
stress-ng: info:  [18823] utime             37399     60.11      0.02      0.72       622.21     50539.19
stress-ng: info:  [18823] vecmath            2526     60.01      2.26      0.00        42.09      1117.70
stress-ng: info:  [18823] vfork             40685     60.01      0.07      0.74       677.97     50228.40
stress-ng: info:  [18823] vforkmany            32     60.02      0.00      0.02         0.53      1600.00
stress-ng: info:  [18823] vm                    0     60.03      1.54      0.07         0.00         0.00
stress-ng: info:  [18823] vm-rw               210     60.08      0.00      1.36         3.50       154.41
stress-ng: info:  [18823] vm-splice        430439     60.01      0.03      1.11      7172.91    377578.07
stress-ng: info:  [18823] wait             393511     60.00      0.33      3.53      6558.06    101945.85
stress-ng: info:  [18823] wcs                9918     60.02      1.13      0.01       165.24      8700.00
stress-ng: info:  [18823] xattr                 0      0.13      0.00      0.00         0.00         0.00
stress-ng: info:  [18823] yield         117936821     60.23      5.84     26.03   1958060.44   3700559.18
stress-ng: info:  [18823] zero             478886     60.01      0.10      0.97      7979.58    447557.01
stress-ng: info:  [18823] zlib                 38     60.56      1.82      0.00         0.63        20.88
stress-ng: info:  [18823] zombie             6285     60.71      0.07      1.99       103.52      3050.97
stress-ng: info:  [18823] for a 150.64s run time:
stress-ng: info:  [18823]    1205.13s available CPU time
stress-ng: info:  [18823]      94.38s user time   (  7.83%)
stress-ng: info:  [18823]     363.25s system time ( 30.14%)
stress-ng: info:  [18823]     457.63s total time  ( 37.97%)
stress-ng: info:  [18823] load average: 194.64 186.96 81.48
stress-ng --cpu-method which
cpu-method must be one of: all ackermann bitops crc16 cdouble cfloat
clongdouble correlate decimal32 decimal64 decimal128 double djb2a euler
explog fibonacci fnv1a fft float gamma gcd gray hamming hanoi hyperbolic
idct int128 int64 int32 int16 int8 int128float int128double
int128longdouble int128decimal32 int128decimal64 int128decimal128
int64float int64double int64longdouble int32float int32double
int32longdouble jenkin jmp ln2 longdouble loop matrixprod nsqrt omega
phi pi pjw prime psi rand rgb sdbm sieve sqrt trig zeta
stress-ng --class which
Unknown class: 'which', available classes: cpu cpu-cache io interrupt memory network os scheduler vm
stress-ng --matrix-method which
matrix-method must be one of: all add div frobenius mult prod sub hadamard trans
stress-ng --class cpu-cache --sequential 0 -t 60 --times
stress-ng: info: [32258] dispatching hogs: 4 bsearch, 4 cache, 4 hsearch, 4 lsearch, 4 memcpy, 4 qsort, 4 tsearch
stress-ng: info: [32258] successful run completed in 420.33s
stress-ng: info: [32258] for a 420.33s run time:
stress-ng: info: [32258]    1681.32s available CPU time
stress-ng: info: [32258]    1448.88s user time   ( 86.18%)
stress-ng: info: [32258]       0.96s system time (  0.06%)
stress-ng: info: [32258]    1449.84s total time  ( 86.23%)
stress-ng --cpu 0 --cpu-method fft -t 5m --times
stress-ng: info: [13424] dispatching hogs: 4 cpu
stress-ng: info: [13424] successful run completed in 300.00s
stress-ng: info: [13424] for a 300.00s run time:
stress-ng: info: [13424]    1200.02s available CPU time
stress-ng: info: [13424]    1169.09s user time   ( 97.42%)
stress-ng: info: [13424]       0.35s system time (  0.03%)
stress-ng: info: [13424]    1169.44s total time  ( 97.45%)
stress-ng --random 50 -t 60 --metrics-brief --times
stress-ng: info: [31751] dispatching hogs: 1 cache, 3 dentry, 4 fault, 2 futex, 3 get, 2 hsearch, 2 iosync, 4 kill, 2 lsearch, 1 memcpy, 1 pipe, 1 rdrand, 2 rename, 2 seek, 1 sigq, 4 sigsegv, 2 socket, 3 symlink, 1 sysinfo, 1 timer, 1 urandom, 1 utime, 2 wait, 2 yield, 2 zero
stress-ng: info: [31751] successful run completed in 60.33s
stress-ng: info: [31751] stressor      bogo ops real time  usr time  sys time   bogo ops/s   bogo ops/s
stress-ng: info: [31751]                          (secs)    (secs)    (secs)   (real time) (usr+sys time)
stress-ng: info: [31751] cache              102     60.04      3.67      0.08         1.70        27.20
stress-ng: info: [31751] dentry          288642     60.15      0.85      9.28      4798.35     28493.78
stress-ng: info: [31751] fault           241810     60.03      0.14     13.51      4027.89     17715.02
stress-ng: info: [31751] futex          1544005     60.00      1.73     13.15     25731.53    103763.78
stress-ng: info: [31751] get             629558     60.02      0.83     11.31     10489.28     51858.15
stress-ng: info: [31751] hsearch          14568     60.01      7.81      0.19       242.75      1821.00
stress-ng: info: [31751] iosync            1291     60.03      0.00      5.82        21.51       221.82
stress-ng: info: [31751] kill          56195919     60.02      1.49     13.94    936293.17   3641990.86
stress-ng: info: [31751] lsearch             43     60.08      8.31      0.11         0.72         5.11
stress-ng: info: [31751] memcpy            3067     60.00      3.80      0.09        51.12       788.43
stress-ng: info: [31751] pipe           1627230     60.02      1.31      6.21     27113.58    216386.97
stress-ng: info: [31751] rdrand         3125352     60.01      4.22      0.01     52082.96    738853.90
stress-ng: info: [31751] rename          787500     60.03      1.05      6.20     13118.04    108620.69
stress-ng: info: [31751] seek           2370234     60.03      0.35      6.90     39483.31    326928.83
stress-ng: info: [31751] sigq           2844432     60.03      0.91      7.36     47380.57    343945.83
stress-ng: info: [31751] sigsegv        9223407     60.01      3.16     12.61    153704.58    584870.45
stress-ng: info: [31751] socket            6634     60.01      0.21     13.86       110.54       471.50
stress-ng: info: [31751] symlink         174917     60.22      0.55      9.87      2904.62     16786.66
stress-ng: info: [31751] sysinfo         121440     59.96      0.15      3.43      2025.42     33921.79
stress-ng: info: [31751] timer          1221430     60.01      1.12      2.34     20353.64    353014.45
stress-ng: info: [31751] urandom           3243     60.01      0.00      3.45        54.04       940.00
stress-ng: info: [31751] utime           751193     60.00      0.10      3.58     12519.69    204128.53
stress-ng: info: [31751] wait           1098475     60.00      1.62     17.59     18308.03     57182.46
stress-ng: info: [31751] yield         12705921     60.00      0.73      6.46    211764.92   1767165.65
stress-ng: info: [31751] zero          14711675     60.02      0.41      7.63    245115.78   1829810.32
stress-ng: info: [31751] for a 60.33s run time:
stress-ng: info: [31751]     241.31s available CPU time
stress-ng: info: [31751]      44.81s user time   ( 18.57%)
stress-ng: info: [31751]     175.27s system time ( 72.63%)
stress-ng: info: [31751]     220.08s total time  ( 91.20%)

Source and Documentation

For bug reports, visit: Stress-ng at LaunchPad

Citations


Coverity Scan Build Status