"Fossies" - the Fresh Open Source Software Archive

Member "stress-ng-0.09.56/example-jobs/memory.job" (15 Mar 2019, 16339 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 # memory 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 # atomic stressor options:
   65 #   start  N workers that exercise various GCC __atomic_*() built in
   66 #   operations on 8, 16, 32 and 64 bit  intergers  that  are  shared
   67 #   among  the N workers. This stressor is only available for builds
   68 #   using GCC 4.7.4 or higher. The stressor forces  many  front  end
   69 #   cache stalls and cache references.
   70 #
   71 atomic 0		# 0 means 1 stressor per CPU
   72 # atomic-ops 1000000	# stop after 1000000 bogo ops
   73 
   74 #
   75 # bsearch stressor options:
   76 #   start  N  workers  that  binary  search a sorted array of 32 bit
   77 #   integers using bsearch(3). By default, there are 65536  elements
   78 #   in the array.  This is a useful method to exercise random access
   79 #   of memory and processor cache.
   80 #
   81 bsearch 0		# 0 means 1 stressor per CPU
   82 # bsearch-ops 1000000	# stop after 1000000 bogo ops
   83 # bsearch-size 65536	# number of elements to bsearch on
   84 
   85 #
   86 # context stressor options:
   87 #   start N workers that run three threads that  use  swapcontext(3)
   88 #   to  implement the thread-to-thread context switching. This exer‐
   89 #   cises rapid process context saving and restoring  and  is  band‐
   90 #   width limited by register and memory save and restore rates.
   91 #
   92 context 0		# 0 means 1 stressor per CPU
   93 # context-ops 1000000	# stop after 1000000 bogo ops
   94 
   95 #
   96 # full stressor options:
   97 #   start N workers that exercise /dev/full.  This attempts to write
   98 #   to  the  device  (which should always get error ENOSPC), to read
   99 #   from the device (which should always return a buffer  of  zeros)
  100 #   and  to  seek  randomly  on the device (which should always suc‐
  101 #   ceed).  (Linux only).
  102 #
  103 full 0			# 0 means 1 stressor per CPU
  104 # full-ops 1000000	# stop after 1000000 bogo ops
  105 
  106 #
  107 # heapsort stressor options:
  108 #   start  N  workers  that sort 32 bit integers using the BSD heap‐
  109 #   sort.
  110 #
  111 heapsort 0		# 0 means 1 stressor per CPU
  112 # heapsort-ops 1000000	# stop after 1000000 bogo ops
  113 
  114 #
  115 # hsearch stressor options:
  116 #   start  N  workers  that  search  a  80%  full  hash  table using
  117 #   hsearch(3). By default, there are 8192  elements  inserted  into
  118 #   the  hash  table.  This is a useful method to exercise access of
  119 #   memory and processor cache.
  120 #
  121 hsearch 0		# 0 means 1 stressor per CPU
  122 # hsearch-ops 1000000	# stop after 1000000 bogo ops
  123 # hsearch-size 8192	# number of hash entries to search on
  124 
  125 #
  126 # lockbus stressor options:
  127 #   start N workers that rapidly lock and increment 64 bytes of ran‐
  128 #   domly chosen memory from a 16MB mmap'd region  (Intel  x86  CPUs
  129 #   only).  This will cause cacheline misses and stalling of CPUs.
  130 #
  131 lockbus 0		# 0 means 1 stressor per CPU
  132 # lockbus-ops 1000000	# stop after 1000000 bogo ops
  133 
  134 #
  135 # lsearch stressor options:
  136 #   start N workers that linear search a unsorted array  of  32  bit
  137 #   integers  using  lsearch(3). By default, there are 8192 elements
  138 #   in the array.  This is a useful method  to  exercise  sequential
  139 #   access of memory and processor cache.
  140 #
  141 lsearch 0		# 0 means 1 stressor per CPU
  142 # lsearch-ops 1000000	# stop after 1000000 bogo ops
  143 # lsearch-size 8192	# number of elements to lsearch on
  144 
  145 #
  146 # malloc stressor options:
  147 #   start N workers continuously calling malloc(3), calloc(3), real‐
  148 #   loc(3)  and  free(3). By default, up to 65536 allocations can be
  149 #   active at any point, but this can be  altered  with  the  --mal‐
  150 #   loc-max option.  Allocation, reallocation and freeing are chosen
  151 #   at random; 50% of the time memory  is  allocation  (via  malloc,
  152 #   calloc  or  realloc) and 50% of the time allocations are free'd.
  153 #   Allocation sizes are also random, with  the  maximum  allocation
  154 #   size  controlled  by the --malloc-bytes option, the default size
  155 #   being 64K.  The worker is re-started if it is killed by the  out
  156 #   of mememory (OOM) killer.
  157 #
  158 malloc 0		# 0 means 1 stressor per CPU
  159 # malloc-bytes 64K	# maximum allocation chunk size
  160 # malloc-max 65536	# maximum number of allocations of chunks
  161 # malloc-ops 1000000	# stop after 1000000 bogo ops
  162 # malloc-thresh 1M	# use mmap when allocation exceeds this size
  163 
  164 #
  165 # matrix stressor options:
  166 #   start N workers that perform various matrix operations on float‐
  167 #   ing  point values. By default, this will exercise all the matrix
  168 #   stress methods one by one.  One can specify  a  specific  matrix
  169 #   stress method with the --matrix-method option.
  170 #
  171 matrix 0		# 0 means 1 stressor per CPU
  172 # matrix-ops 1000000	# stop after 1000000 bogo ops
  173 # matrix-method all	# use all matrix stressor methods
  174 # matrix size 65536	# size of N x N matrix
  175 
  176 #
  177 # membarrier stressor options:
  178 #   start  N workers that exercise the membarrier system call (Linux
  179 #   only).
  180 #
  181 membarrier 0		# 0 means 1 stressor per CPU
  182 # membarrier-ops 1000000 # stop after 1000000 bogo ops
  183 
  184 #
  185 # memcpy stressor options:
  186 #   start  N workers that copy 2MB of data from a shared region to a
  187 #   buffer using memcpy(3) and then move the data in the buffer with
  188 #   memmove(3)  with 3 different alignments. This will exercise pro‐
  189 #   cessor cache and system memory.
  190 #
  191 memcpy 0		# 0 means 1 stressor per CPU
  192 # memcpy-ops 1000000	# stop after 1000000 bogo ops
  193 
  194 #
  195 # memfd stressor options:
  196 #   start N workers that create  allocations  of  1024  pages  using
  197 #   memfd_create(2)  and  ftruncate(2) for allocation and mmap(2) to
  198 #   map the allocation  into  the  process  address  space.   (Linux
  199 #   only).
  200 #
  201 memfd 0			# 0 means 1 stressor per CPU
  202 # memfd-ops 1000000	# stop after 1000000 bogo ops
  203 # memfd-bytes 256M	# size of memfd allocations
  204 # memfd-fds 256		# number of memfds to have open
  205 
  206 #
  207 # memthrash stressor options:
  208 #   start N workers that thrash and exercise a 16MB buffer in  vari‐
  209 #   ous ways to try and trip thermal overrun.
  210 #
  211 memthrash 0		# 0 means 1 stressor per CPU
  212 # memthrash-ops 1000000 # stop after 1000000 bogo ops
  213 # memthrash-method all  # all all memthrash methods, one can use:
  214 			# all, chunk1, chunk8, chunk64, chunk256
  215 			# chunkpage, flip, flush, lock, matrix,
  216 			# memset, mfence, prefetch, random,
  217 			# spinread or spinwrite
  218 
  219 #
  220 # mergesort stressor options:
  221 #   start  N  workers that sort 32 bit integers using the BSD merge‐
  222 #   sort.
  223 #
  224 mergesort 0		# 0 means 1 stressor per CPU
  225 # mergesort-ops 1000000 # stop after 1000000 bogo ops
  226 # mergesort-size 262144 # number of elements to mergesort
  227 #
  228 
  229 #
  230 # mincore stressor options:
  231 #   start N workers that walk through all of memory 1 page at a time
  232 #   checking of the page mapped and also is resident in memory using
  233 #   mincore(2).
  234 #
  235 mincore 0		# 0 means 1 stressor per CPU
  236 # mincore-ops 1000000	# stop after 1000000 bogo ops
  237 # mincore-random	# select pages randomly rather than sequentially
  238 
  239 #
  240 # null stressor options:
  241 #   start N workers writing to /dev/null
  242 #
  243 null 0			# 0 means 1 stressor per CPU
  244 # null-ops 1000000	# stop after 1000000 bogo ops
  245 
  246 #
  247 # numa stressor options:
  248 #   start N workers that migrate stressors and a 4MB  memory  mapped
  249 #   buffer   around   all  the  available  NUMA  nodes.   This  uses
  250 #   migrate_pages(2)  to  move  the  stressors  and   mbind(2)   and
  251 #   move_pages(2) to move the pages of the mapped buffer. After each
  252 #   move, the buffer is written to force activity over the bus which
  253 #   results  cache misses.  This test will only run on hardware with
  254 #   NUMA enabled and more than 1 NUMA node.
  255 #
  256 numa 0			# 0 means 1 stressor per CPU
  257 # numa-ops 1000000	# stop after 1000000 bogo ops
  258 
  259 #
  260 # oom-pipe stressor options:
  261 #   start N workers that create as many pipes as allowed  and  exer‐
  262 #   cise  expanding  and  shrinking  the pipes from the largest pipe
  263 #   size down to a page size. Data is written  into  the  pipes  and
  264 #   read  out  again to fill the pipe buffers. With the --aggressive
  265 #   mode enabled the data is not read out when the pipes are shrunk,
  266 #   causing  the kernel to OOM processes aggressively.  Running many
  267 #   instances of this stressor will force kernel  to  OOM  processes
  268 #   due to the many large pipe buffer allocations.
  269 #
  270 oom-pipe 0		# 0 means 1 stressor per CPU
  271 # oom-pipe-ops 1000000	# stop after 1000000 bogo ops
  272 
  273 #
  274 # pipe stressor options:
  275 #   start  N  workers  that  perform  large pipe writes and reads to
  276 #   exercise pipe I/O.  This exercises memory  write  and  reads  as
  277 #   well  as  context  switching.   Each worker has two processes, a
  278 #   reader and a writer.
  279 #
  280 pipe 0			# 0 means 1 stressor per CPU
  281 # pipe-ops 1000000	# stop after 1000000 bogo ops
  282 # pipe-data-size 4K	# pipe data transfer size
  283 # pipe-size 512		# pipe size
  284 
  285 #
  286 # qsort stressor options:
  287 #   start N workers that sort 32 bit integers using qsort.
  288 #
  289 qsort 0			# 0 means 1 stressor per CPU
  290 # qsort-ops 1000000	# stop after 1000000 bogo ops
  291 # qsort-size 262144	# number of elements to qsort
  292 
  293 #
  294 # remap stressor options:
  295 #   start N workers that map 512  pages  and  re-order  these  pages
  296 #   using  the  deprecated  system call remap_file_pages(2). Several
  297 #   page re-orderings are exercised: forward,  reverse,  random  and
  298 #   many pages to 1 page.
  299 #
  300 remap 0			# 0 means 1 stressor per CPU
  301 # remap-ops 1000000	# stop after 1000000 bogo ops
  302 
  303 #
  304 # resources stressor options:
  305 #   start  N  workers  that  consume  various system resources. Each
  306 #   worker will spawn 1024 child processes that iterate  1024  times
  307 #   consuming  shared memory, heap, stack, temporary files and vari‐
  308 #   ous file descriptors (eventfds, memoryfds,  userfaultfds,  pipes
  309 #   and sockets).
  310 #
  311 resources 0		# 0 means 1 stressor per CPU
  312 # resources-ops 1000000	# stop after 1000000 bogo ops
  313 
  314 #
  315 # rmap stressor options:
  316 #   start  N workers that exercise the VM reverse-mapping. This cre‐
  317 #   ates 16 processes per  worker  that  write/read  multiple  file-
  318 #   backed  memory  mappings.  There  are 64 lots of 4 page mappings
  319 #   made onto the file, with each mapping overlapping  the  previous
  320 #   by 3 pages and at least 1 page of non-mapped memory between each
  321 #   of the mappings. Data is synchronously msync'd to the file 1  in
  322 #   every 256 iterations in a random manner.
  323 #
  324 rmap 0			# 0 means 1 stressor per CPU
  325 # rmap-ops 1000000	# stop after 1000000 bogo ops
  326 
  327 #
  328 # stack stressor options:
  329 #   start N workers that rapidly cause and catch stack overflows  by
  330 #   use of alloca(3).
  331 #
  332 stack 0			# 0 means 1 stressor per CPU
  333 # stack-ops 1000000	# stop after 1000000 bogo ops
  334 # stack-fill		# zero stack to force pages in
  335 
  336 #
  337 # stackmmap stressor options:
  338 #   start N workers that use a 2MB stack that is memory mapped  onto
  339 #   a  temporary file. A recursive function works down the stack and
  340 #   flushes dirty stack pages back to the memory mapped  file  using
  341 #   msync(2) until the end of the stack is reached (stack overflow).
  342 #   This exercises dirty page and stack exception handling.
  343 #
  344 stackmmap 0		# 0 means 1 stressor per CPU
  345 # stackmmap-ops 1000000 # stop after 1000000 bogo ops
  346 
  347 #
  348 # str stressor options:
  349 #   start N workers that exercise various libc string  functions  on
  350 #   random strings.
  351 #
  352 str 0			# 0 means 1 stressor per CPU
  353 # str-ops 1000000	# stop after 1000000 bogo ops
  354 # str-method all	# select all string methods
  355 
  356 #
  357 # stream stressor options:
  358 #   start N workers exercising a memory bandwidth  stressor  loosely
  359 #   based  on  the STREAM "Sustainable Memory Bandwidth in High Per‐
  360 #   formance Computers" benchmarking tool by John D. McCalpin, Ph.D.
  361 #   This  stressor  allocates  buffers that are at least 4 times the
  362 #   size  of the  CPU L2 cache and  continually  performs  rounds of
  363 #   computations on large  arrays of double precision floating point
  364 #   numbers.
  365 #
  366 stream 0		# 0 means 1 stressor per CPU
  367 # stream-ops 1000000	# stop after 1000000 bogo ops
  368 # stream-l3-size 4M	# CPU level 3 cache size
  369 
  370 #
  371 # tlb-shootdown stressor options:
  372 #   start  N  workers  that force Translation Lookaside Buffer (TLB)
  373 #   shootdowns.  This is achieved by creating up to  16  child  pro‐
  374 #   cesses that all share a region of memory and these processes are
  375 #   shared amongst the available CPUs.   The  processes  adjust  the
  376 #   page  mapping  settings  causing TLBs to be force flushed on the
  377 #   other processors, causing the TLB shootdowns.
  378 #
  379 tlb-shootdown 0		# 0 means 1 stressor per CPU
  380 tlb-shootdown-ops 1000000 # stop after 1000000 bogo ops
  381 
  382 #
  383 # tmpfs stressor options:
  384 #   start N workers that create a temporary  file  on  an  available
  385 #   tmpfs file system and perform various file based mmap operations
  386 #   upon it.
  387 #
  388 tmpfs 0			# 0 means 1 stressor per CPU
  389 # tmpfs-ops 1000000	# stop after 1000000 bogo ops
  390 
  391 #
  392 # tsearch stressor options:
  393 #   start N workers that insert, search and delete 32  bit  integers
  394 #   on  a  binary tree using tsearch(3), tfind(3) and tdelete(3). By
  395 #   default, there are 65536 randomized integers used in  the  tree.
  396 #   This  is a useful method to exercise random access of memory and
  397 #   processor cache.
  398 #
  399 tsearch 0		# 0 means 1 stressor per CPU
  400 # tsearch-ops 1000000	# stop after 1000000 bogo ops
  401 # tsearch-size 65536	# number of elements to tsearch on
  402 
  403 #
  404 # vm stressor options:
  405 #   start N workers continuously calling mmap(2)/munmap(2) and writ‐
  406 #   ing to the allocated memory. Note that this can cause systems to
  407 #   trip the kernel OOM killer on Linux systems if not enough physi‐
  408 #   cal memory and swap is not available.
  409 #
  410 vm 0			# 0 means 1 stressor per CPU
  411 # vm-ops 1000000	# stop after 1000000 bogo ops
  412 # vm-bytes 256M		# size of each vm mmapping
  413 # vm-hang 0		# sleep 0 seconds before unmapping
  414 # vm-keep		# don't keep unmapping and remapping
  415 # vm-locked		# lock pages into memory using MAP_LOCKED
  416 # vm-method all		# vm data exercising method; use all types
  417 # vm-populate		# populate (prefault) pages into memory
  418 
  419 #
  420 # vm-rw stressor options:
  421 #   start N workers that  transfer  memory  to/from  a  parent/child
  422 #   using process_vm_writev(2) and process_vm_readv(2). This is fea‐
  423 #   ture is only supported on Linux.  Memory transfers are only ver‐
  424 #   ified if the --verify option is enabled.
  425 #
  426 vm-rw 0			# 0 means 1 stressor per CPU
  427 # vm-rw-ops 1000000	# stop after 1000000 bogo ops
  428 # vm-rw-bytes 16M	# size of each mmap'd region per stressor
  429 
  430 #
  431 # wcs stressor options:
  432 #   start N workers that exercise various libc wide character string
  433 #   functions on random strings.
  434 #
  435 wcs 0			# 0 means 1 stressor per CPU
  436 # wcs-ops 1000000	# stop after 1000000 bogo ops
  437 # wcs-method all	# use all wide string functions
  438 
  439 #
  440 # zero stressor option:
  441 #   start N workers reading /dev/zero
  442 #
  443 zero 0			# 0 means 1 stressor per CPU
  444 zero-ops 1000000	# stop after 1000000 bogo ops
  445 
  446 #
  447 # zlib stressor option:
  448 #   start N workers compressing and decompressing random data  using
  449 #   zlib.  Each worker has two processes, one that compresses random
  450 #   data and pipes it to another process that decompresses the data.
  451 #   This stressor exercises CPU, cache and memory.
  452 #
  453 zlib 0			# 0 means 1 stressor per CPU
  454 # zlib-ops 1000000	# stop after 1000000 bogo ops
  455 # zlib-method random	# randomly select data generation methods
  456