"Fossies" - the Fresh Open Source Software Archive

Member "stress-ng-0.09.56/example-jobs/cpu-cache.job" (15 Mar 2019, 9561 Bytes) of package /linux/privat/stress-ng-0.09.56.tar.xz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #
    2 # cpu-cache class stressors:
    3 #   various options have been commented out, one can remove the
    4 #   proceeding comment to enable these options if required.
    5 
    6 #
    7 # run the following tests in parallel or sequentially
    8 #
    9 run sequential
   10 # run parallel
   11 
   12 #
   13 # aggressive:
   14 #   enables more file, cache and memory aggressive options. This may
   15 #   slow tests down, increase latencies and  reduce  the  number  of
   16 #   bogo  ops as well as changing the balance of user time vs system
   17 #   time used depending on the type of stressor being used.
   18 #
   19 # aggressive
   20 
   21 #
   22 # ignite-cpu:
   23 #   alter kernel controls to try and maximize the CPU. This requires
   24 #   root  privilege  to alter various /sys interface controls.  Cur‐
   25 #   rently this only works for Intel P-State enabled x86 systems  on
   26 #   Linux.
   27 #
   28 # ignite-cpu
   29 
   30 #
   31 # keep-name:
   32 #   by  default,  stress-ng  will  attempt to change the name of the
   33 #   stress processes according to their functionality;  this  option
   34 #   disables  this and keeps the process names to be the name of the
   35 #   parent process, that is, stress-ng.
   36 #
   37 # keep-name
   38 
   39 #
   40 # metrics-brief:
   41 #   enable metrics and only output metrics that are non-zero.
   42 #
   43 metrics-brief
   44 
   45 #
   46 # verbose
   47 #   show all debug, warnings and normal information output.
   48 #
   49 verbose
   50 
   51 #
   52 # run each of the tests for 60 seconds
   53 #  stop stress test after N seconds. One can also specify the units
   54 #  of time in seconds, minutes, hours, days or years with the  suf‐
   55 #  fix s, m, h, d or y.
   56 #
   57 timeout 60s
   58 
   59 #
   60 # per stressor options start here
   61 #
   62 
   63 #
   64 # bsearch stressor options:
   65 #   start  N  workers  that  binary  search a sorted array of 32 bit
   66 #   integers using bsearch(3). By default, there are 65536  elements
   67 #   in the array.  This is a useful method to exercise random access
   68 #   of memory and processor cache.
   69 #
   70 bsearch 0		# 0 means 1 stressor per CPU
   71 # bsearch-ops 1000000	# stop after 1000000 bogo ops
   72 # bsearch-size 65536	# number of elements to bsearch on
   73 
   74 #
   75 # cache stressor options:
   76 #   start  N workers that perform random wide spread memory read and
   77 #   writes to thrash the CPU cache.  The code does not intelligently
   78 #   determine the CPU cache configuration and so it may be sub-opti‐
   79 #   mal in producing hit-miss read/write activity for  some  proces‐
   80 #   sors.
   81 #
   82 cache 0			# 0 means 1 stressor per CPU
   83 # cache-ops 1000000	# stop after 1000000 bogo ops
   84 # cache-fence		# force  write  serialization on each store
   85 # cache-flush		# force flush cache on each store
   86 # cache-level 1		# specify level of cache to exercise
   87 # cache-no-affinity	# do not change processor affinity
   88 # cache-ways 8		# specify the number of cache ways to exercise
   89 
   90 #
   91 # heapsort stressor options:
   92 #   start  N  workers  that sort 32 bit integers using the BSD heap‐
   93 #   sort.
   94 #
   95 heapsort 0		# 0 means 1 stressor per CPU
   96 # heapsort-ops 1000000	# stop after 1000000 bogo ops
   97 
   98 #
   99 # hsearch stressor options:
  100 #   start  N  workers  that  search  a  80%  full  hash  table using
  101 #   hsearch(3). By default, there are 8192  elements  inserted  into
  102 #   the  hash  table.  This is a useful method to exercise access of
  103 #   memory and processor cache.
  104 #
  105 hsearch 0		# 0 means 1 stressor per CPU
  106 # hsearch-ops 1000000	# stop after 1000000 bogo ops
  107 # hsearch-size 8192	# number of hash entries to search on
  108 
  109 #
  110 # icache stressor options:
  111 #   start  N  workers  that  stress the instruction cache by forcing
  112 #   instruction cache reloads.  This is  achieved  by  modifying  an
  113 #   instruction cache line,  causing the processor to reload it when
  114 #   we call a function in inside it.  Currently  only  verified  and
  115 #   enabled for Intel x86 CPUs.
  116 #
  117 icache 0		# 0 means 1 stressor per CPU
  118 # icache-ops 1000000	# stop after 1000000 bogo ops
  119 
  120 #
  121 # lockbus stressor options:
  122 #   start N workers that rapidly lock and increment 64 bytes of ran‐
  123 #   domly  chosen  memory  from a 16MB mmap'd region (Intel x86 CPUs
  124 #   only).  This will cause cacheline misses and stalling of CPUs
  125 #
  126 lockbus 0		# 0 means 1 stressor per CPU
  127 # lockbus-ops 1000000	# stop after 1000000 bogo ops
  128 
  129 #
  130 # lsearch stressor options:
  131 #   start N workers that linear search a unsorted array  of  32  bit
  132 #   integers  using  lsearch(3). By default, there are 8192 elements
  133 #   in the array.  This is a useful method  to  exercise  sequential
  134 #   access of memory and processor cache.
  135 #
  136 lsearch 0		# 0 means 1 stressor per CPU
  137 # lsearch-ops 1000000	# stop after 1000000 bogo ops
  138 # lsearch-size 8192	# number of elements to lsearch on
  139 
  140 #
  141 # malloc stressor options:
  142 #   start N workers continuously calling malloc(3), calloc(3), real‐
  143 #   loc(3)  and  free(3). By default, up to 65536 allocations can be
  144 #   active at any point, but this can be  altered  with  the  --mal‐
  145 #   loc-max option.  Allocation, reallocation and freeing are chosen
  146 #   at random; 50% of the time memory  is  allocation  (via  malloc,
  147 #   calloc  or  realloc) and 50% of the time allocations are free'd.
  148 #   Allocation sizes are also random, with  the  maximum  allocation
  149 #   size  controlled  by the --malloc-bytes option, the default size
  150 #   being 64K.  The worker is re-started if it is killed by the  out
  151 #   of mememory (OOM) killer.
  152 #
  153 malloc 0                # 0 means 1 stressor per CPU
  154 # malloc-bytes 64K      # maximum allocation chunk size
  155 # malloc-max 65536      # maximum number of allocations of chunks
  156 # malloc-ops 1000000    # stop after 1000000 bogo ops
  157 # malloc-thresh 1M      # use mmap when allocation exceeds this size
  158 
  159 #
  160 # matrix stressor options:
  161 #   start N workers that perform various matrix operations on float‐
  162 #   ing  point values. By default, this will exercise all the matrix
  163 #   stress methods one by one.  One can specify  a  specific  matrix
  164 #   stress method with the --matrix-method option.
  165 #
  166 matrix 0		# 0 means 1 stressor per CPU
  167 # matrix-ops 1000000	# stop after 1000000 bogo ops
  168 # matrix-method all	# use all matrix stressor methods
  169 # matrix size 65536	# size of N x N matrix
  170 
  171 #
  172 # membarrier stressor options:
  173 #   start  N workers that exercise the membarrier system call (Linux
  174 #   only).
  175 #
  176 membarrier 0            # 0 means 1 stressor per CPU
  177 # membarrier-ops 1000000 # stop after 1000000 bogo ops
  178 
  179 #
  180 # memcpy stressor options:
  181 #   start  N workers that copy 2MB of data from a shared region to a
  182 #   buffer using memcpy(3) and then move the data in the buffer with
  183 #   memmove(3)  with 3 different alignments. This will exercise pro‐
  184 #   cessor cache and system memory.
  185 #
  186 memcpy 0                # 0 means 1 stressor per CPU
  187 # memcpy-ops 1000000    # stop after 1000000 bogo ops
  188 
  189 #
  190 # mergesort stressor options:
  191 #   start  N  workers that sort 32 bit integers using the BSD merge‐
  192 #   sort.
  193 #
  194 mergesort 0		# 0 means 1 stressor per CPU
  195 # mergesort-ops 1000000 # stop after 1000000 bogo ops
  196 # mergesort-size 262144 # number of elements to mergesort
  197 #
  198 
  199 #
  200 # qsort stressor options:
  201 #   start N workers that sort 32 bit integers using qsort.
  202 #
  203 qsort 0			# 0 means 1 stressor per CPU
  204 # qsort-ops 1000000	# stop after 1000000 bogo ops
  205 # qsort-size 262144	# number of elements to qsort
  206 
  207 #
  208 # str stressor options:
  209 #   start N workers that exercise various libc string  functions  on
  210 #   random strings.
  211 #
  212 str 0			# 0 means 1 stressor per CPU
  213 # str-ops 1000000	# stop after 1000000 bogo ops
  214 # str-method all	# select all string methods
  215 
  216 #
  217 # stream stressor options:
  218 #   start N workers exercising a memory bandwidth  stressor  loosely
  219 #   based  on  the STREAM "Sustainable Memory Bandwidth in High Per‐
  220 #   formance Computers" benchmarking tool by John D. McCalpin, Ph.D.
  221 #   This  stressor  allocates  buffers that are at least 4 times the
  222 #   size  of the  CPU L2 cache and  continually  performs  rounds of
  223 #   computations on large  arrays of double precision floating point
  224 #   numbers.
  225 #
  226 stream 0		# 0 means 1 stressor per CPU
  227 # stream-ops 1000000	# stop after 1000000 bogo ops
  228 # stream-l3-size 4M	# CPU level 3 cache size
  229 
  230 #
  231 # tsearch stressor options:
  232 #   start N workers that insert, search and delete 32  bit  integers
  233 #   on  a  binary tree using tsearch(3), tfind(3) and tdelete(3). By
  234 #   default, there are 65536 randomized integers used in  the  tree.
  235 #   This  is a useful method to exercise random access of memory and
  236 #   processor cache.
  237 #
  238 tsearch 0		# 0 means 1 stressor per CPU
  239 # tsearch-ops 1000000	# stop after 1000000 bogo ops
  240 # tsearch-size 65536	# number of elements to tsearch on
  241 
  242 #
  243 # vecmath stressor options:
  244 #   start N workers that perform various unsigned integer math oper‐
  245 #   ations on various 128 bit vectors. A mix of vector  math  opera‐
  246 #   tions  are  performed on the following vectors: 16 × 8 bits, 8 ×
  247 #   16 bits, 4 × 32 bits, 2 × 64 bits. The metrics produced by  this
  248 #   mix  depend  on  the  processor architecture and the vector math
  249 #   optimisations produced by the compiler.
  250 vecmath 0		# 0 means 1 stressor per CPU
  251 # vecmath-ops 1000000	# stop after 1000000 bogo ops
  252 
  253 #
  254 # wcs stressor options:
  255 #   start N workers that exercise various libc wide character string
  256 #   functions on random strings.
  257 #
  258 wcs 0			# 0 means 1 stressor per CPU
  259 # wcs-ops 1000000	# stop after 1000000 bogo ops
  260 # wcs-method all	# use all wide string functions
  261 
  262 #
  263 # zlib stressor option:
  264 #   start N workers compressing and decompressing random data  using
  265 #   zlib.  Each worker has two processes, one that compresses random
  266 #   data and pipes it to another process that decompresses the data.
  267 #   This stressor exercises CPU, cache and memory.
  268 #
  269 zlib 0			# 0 means 1 stressor per CPU
  270 # zlib-ops 1000000	# stop after 1000000 bogo ops
  271 # zlib-method random	# randomly select data generation methods