#
# cpu class stressors:
#   various options have been commented out, one can remove the
#   proceeding comment to enable these options if required.

#
# run the following tests in parallel or sequentially
#
run sequential
# run parallel

#
# aggressive:
#   enables more file, cache and memory aggressive options. This may
#   slow tests down, increase latencies and  reduce  the  number  of
#   bogo  ops as well as changing the balance of user time vs system
#   time used depending on the type of stressor being used.
#
# aggressive

#
# ignite-cpu:
#   alter kernel controls to try and maximize the CPU. This requires
#   root  privilege  to alter various /sys interface controls.  Cur‐
#   rently this only works for Intel P-State enabled x86 systems  on
#   Linux.
#
# ignite-cpu

#
# keep-name:
#   by  default,  stress-ng  will  attempt to change the name of the
#   stress processes according to their functionality;  this  option
#   disables  this and keeps the process names to be the name of the
#   parent process, that is, stress-ng.
#
# keep-name

#
# metrics-brief:
#   enable metrics and only output metrics that are non-zero.
#
metrics-brief

#
# verbose
#   show all debug, warnings and normal information output.
#
verbose

#
# run each of the tests for 60 seconds
#  stop stress test after N seconds. One can also specify the units
#  of time in seconds, minutes, hours, days or years with the  suf‐
#  fix s, m, h, d or y.
#
timeout 60s

#
# per stressor options start here
#

#
# af-alg stressor options:
#   start  N workers that exercise the AF_ALG socket domain by hash‐
#   ing and encrypting various sized random messages. This exercises
#   the  SHA1,  SHA224,  SHA256,  SHA384,  SHA512, MD4, MD5, RMD128,
#   RMD160, RMD256, RMD320, WP256,  WP384,  WP512,  TGR128,  TGR160,
#   TGR192    hashes   and   the   cbc(aes),   lrw(aes),   ofb(aes),
#   xts(twofish),    xts(serpent),    xts(cast6),     xts(camellia),
#
af-alg 0		# 0 means 1 stressor per CPU
# af-alg-ops 1000000	# stop after 1000000 bogo ops

#
# atomic stressor options:
#   start  N workers that exercise various GCC __atomic_*() built in
#   operations on 8, 16, 32 and 64 bit  intergers  that  are  shared
#   among  the N workers. This stressor is only available for builds
#   using GCC 4.7.4 or higher. The stressor forces  many  front  end
#   cache stalls and cache references.
#
atomic 0		# 0 means 1 stressor per CPU
# atomic-ops 1000000	# stop after 1000000 bogo ops

#
# bsearch stressor options:
#   start  N  workers  that  binary  search a sorted array of 32 bit
#   integers using bsearch(3). By default, there are 65536  elements
#   in the array.  This is a useful method to exercise random access
#   of memory and processor cache.
#
bsearch 0		# 0 means 1 stressor per CPU
# bsearch-ops 1000000	# stop after 1000000 bogo ops
# bsearch-size 65536	# number of elements to bsearch on

#
# context stressor options:
#   start N workers that run three threads that  use  swapcontext(3)
#   to  implement the thread-to-thread context switching. This exer‐
#   cises rapid process context saving and restoring  and  is  band‐
#   width limited by register and memory save and restore rates.
#
context 0		# 0 means 1 stressor per CPU
# context-ops 1000000	# stop after 1000000 bogo ops

#
# cpu stressor options:
#   start N workers  exercising  the  CPU  by  sequentially  working
#   through  all  the different CPU stress methods. Instead of exer‐
#   cising all the CPU stress methods, one can  specify  a  specific
#   CPU stress method with the --cpu-method option.
#
cpu 0			# 0 means 1 stressor per CPU
# cpu-ops 1000000	# stop after 1000000 bogo ops
# cpu-load 90%		# load CPUs at 90%
# cpu-load-slice 50	# 50ms per slice
# cpu-method all	# use all cpu stressor methods

#
# cpu-online stressor options:
#   start  N  workers  that  put  randomly selected CPUs offline and
#   online. This Linux only stressor requires root privilege to per‐
#   form this action. This is disabled by default because it can
#   break older kernels.
#
# cpu-online 0		# 0 means 1 stressor per CPU
# cpu-online-ops 1000000 # stop after 1000000 bogo ops
#

#
# crypt stressor options:
#   start  N  workers  that  encrypt  a 16 character random password
#   using crypt(3).  The password is encrypted  using  MD5,  SHA-256
#   and SHA-512 encryption methods.
#
crypt 0			# 0 means 1 stressor per CPU
# crypt-ops 1000000	# stop after 1000000 bogo ops

#
# fp-error stressor options:
#   start N workers that generate floating point exceptions.  Compu‐
#   tations  are  performed to force and check for the FE_DIVBYZERO,
#   FE_INEXACT, FE_INVALID, FE_OVERFLOW and FE_UNDERFLOW exceptions.
#   EDOM and ERANGE errors are also checked.
#
fp-error 0		# 0 means 1 stressor per CPU
# fp-error-ops 1000000	# stop after 1000000 bogo ops

#
# getrandom stressor options:
#   start N workers that get 8192 random bytes from the /dev/urandom
#   pool using the getrandom(2) system call (Linux) or getentropy(2)
#   (OpenBSD).
#
getrandom 0		# 0 means 1 stressor per CPU
# getrandom-ops 1000000	# stop after 1000000 bogo ops

#
# heapsort stressor options:
#   start  N  workers  that sort 32 bit integers using the BSD heap‐
#   sort.
#
heapsort 0		# 0 means 1 stressor per CPU
# heapsort-ops 1000000	# stop after 1000000 bogo ops

#
# hsearch stressor options:
#   start  N  workers  that  search  a  80%  full  hash  table using
#   hsearch(3). By default, there are 8192  elements  inserted  into
#   the  hash  table.  This is a useful method to exercise access of
#   memory and processor cache.
#
hsearch 0		# 0 means 1 stressor per CPU
# hsearch-ops 1000000	# stop after 1000000 bogo ops
# hsearch-size 8192	# number of hash entries to search on

#
# longjmp stressor options:
#   start  N  workers  that  exercise  setjmp(3)/longjmp(3) by rapid
#   looping on longjmp calls.
#
longjmp 0		# 0 means 1 stressor per CPU
# longjmp-ops 1000000	# stop after 1000000 bogo ops

#
# lsearch stressor options:
#   start N workers that linear search a unsorted array  of  32  bit
#   integers  using  lsearch(3). By default, there are 8192 elements
#   in the array.  This is a useful method  to  exercise  sequential
#   access of memory and processor cache.
#
lsearch 0		# 0 means 1 stressor per CPU
# lsearch-ops 1000000	# stop after 1000000 bogo ops
# lsearch-size 8192	# number of elements to lsearch on

#
# matrix stressor options:
#   start N workers that perform various matrix operations on float‐
#   ing  point values. 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.
#
matrix 0		# 0 means 1 stressor per CPU
# matrix-ops 1000000	# stop after 1000000 bogo ops
# matrix-method all	# use all matrix stressor methods
# matrix size 65536	# size of N x N matrix

#
# mergesort stressor options:
#   start  N  workers that sort 32 bit integers using the BSD merge‐
#   sort.
#
mergesort 0		# 0 means 1 stressor per CPU
# mergesort-ops 1000000 # stop after 1000000 bogo ops
# mergesort-size 262144 # number of elements to mergesort
#

#
# nop stressor options:
#   start  N  workers that consume cpu cycles issuing no-op instruc‐
#   tions. This stressor is available if the assembler supports  the
#   "nop" instruction.
#
nop 0			# 0 means 1 stressor per CPU
# nop-ops 1000000	# stop after 1000000 bogo ops

#
# numa stressor options:
#   start N workers that migrate stressors and a 4MB  memory  mapped
#   buffer   around   all  the  available  NUMA  nodes.   This  uses
#   migrate_pages(2)  to  move  the  stressors  and   mbind(2)   and
#   move_pages(2) to move the pages of the mapped buffer. After each
#   move, the buffer is written to force activity over the bus which
#   results  cache misses.  This test will only run on hardware with
#   NUMA enabled and more than 1 NUMA node.
#
numa 0			# 0 means 1 stressor per CPU
# numa-ops 1000000	# stop after 1000000 bogo ops

#
# opcode stressor options:
#   start N workers that fork off  children  that  execute  randomly
#   generated  executable  code.   This will generate issues such as
#   illegal instructions, bus errors,  segmentation  faults,  traps,
#   floating  point errors that are handled gracefully by the stres‐
#   sor.
#
opcode 0		# 0 means 1 stressor per CPU
# opcode-ops 1000000	# stop after 1000000 bogo ops

#
# qsort stressor options:
#   start N workers that sort 32 bit integers using qsort.
#
qsort 0			# 0 means 1 stressor per CPU
# qsort-ops 1000000	# stop after 1000000 bogo ops
# qsort-size 262144	# number of elements to qsort

#
# rdrand stressor options:
#   start  N workers that read the Intel hardware random number gen‐
#   erator (Intel Ivybridge processors upwards).
#
rdrand 0		# 0 means 1 stressor per CPU
# rdrand-ops 1000000	# stop after 1000000 bogo ops

#
# str stressor options:
#   start N workers that exercise various libc string  functions  on
#   random strings.
#
str 0			# 0 means 1 stressor per CPU
# str-ops 1000000	# stop after 1000000 bogo ops
# str-method all	# select all string methods

#
# stream stressor options:
#   start N workers exercising a memory bandwidth  stressor  loosely
#   based  on  the STREAM "Sustainable Memory Bandwidth in High Per‐
#   formance Computers" benchmarking tool by John D. McCalpin, Ph.D.
#   This  stressor  allocates  buffers that are at least 4 times the
#   size  of the  CPU L2 cache and  continually  performs  rounds of
#   computations on large  arrays of double precision floating point
#   numbers.
#
stream 0		# 0 means 1 stressor per CPU
# stream-ops 1000000	# stop after 1000000 bogo ops
# stream-l3-size 4M	# CPU level 3 cache size

#
# tsc stressor options:
#   start N workers that read the Time Stamp Counter (TSC) 256 times
#   per loop iteration (bogo operation). Available only on Intel x86
#   platforms.
tsc 0			# 0 means 1 stressor per CPU
# tsc-ops 1000000	# stop after 1000000 bogo ops

#
# tsearch stressor options:
#   start N workers that insert, search and delete 32  bit  integers
#   on  a  binary tree using tsearch(3), tfind(3) and tdelete(3). By
#   default, there are 65536 randomized integers used in  the  tree.
#   This  is a useful method to exercise random access of memory and
#   processor cache.
#
tsearch 0		# 0 means 1 stressor per CPU
# tsearch-ops 1000000	# stop after 1000000 bogo ops
# tsearch-size 65536	# number of elements to tsearch on

#
# vecmath stressor options:
#   start N workers that perform various unsigned integer math oper‐
#   ations on various 128 bit vectors. A mix of vector  math  opera‐
#   tions  are  performed on the following vectors: 16 × 8 bits, 8 ×
#   16 bits, 4 × 32 bits, 2 × 64 bits. The metrics produced by  this
#   mix  depend  on  the  processor architecture and the vector math
#   optimisations produced by the compiler.
vecmath 0		# 0 means 1 stressor per CPU
# vecmath-ops 1000000	# stop after 1000000 bogo ops

#
# wcs stressor options:
#   start N workers that exercise various libc wide character string
#   functions on random strings.
#
wcs 0			# 0 means 1 stressor per CPU
# wcs-ops 1000000	# stop after 1000000 bogo ops
# wcs-method all	# use all wide string functions

#
# zlib stressor option:
#   start N workers compressing and decompressing random data  using
#   zlib.  Each worker has two processes, one that compresses random
#   data and pipes it to another process that decompresses the data.
#   This stressor exercises CPU, cache and memory.
#
zlib 0			# 0 means 1 stressor per CPU
# zlib-ops 1000000	# stop after 1000000 bogo ops
# zlib-method random	# randomly select data generation methods

