| 1 |
#!/bin/bash |
| 2 |
# Copyright 2010-2012 Thomas Schoebel-Theuer / 1&1 Internet AG |
| 3 |
# |
| 4 |
# Copying and distribution of this file, with or without modification, |
| 5 |
# are permitted in any medium without royalty provided the copyright |
| 6 |
# notice and this notice are preserved. This file is offered as-is, |
| 7 |
# without any warranty. |
| 8 |
|
| 9 |
##################################################################### |
| 10 |
|
| 11 |
## defaults for standalone tests (without modules) |
| 12 |
|
| 13 |
## replay_host_list |
| 14 |
## |
| 15 |
## Whitespace-separated list of hostnames where blkreplay is run in parallel. |
| 16 |
## Each host must be accessible via ssh, without password prompt. |
| 17 |
## You may use advanced shell pattern syntax, such as "myhost{17..23}" |
| 18 |
|
| 19 |
replay_host_list="host672 host{675..679}" |
| 20 |
|
| 21 |
## replay_device_list |
| 22 |
## |
| 23 |
## Whitespace-separated list of devices where blkreplay is run in parallel. |
| 24 |
## You may use advanced shell pattern syntax, such as "/dev/drbd{0..3}" |
| 25 |
## |
| 26 |
## Notice: you will get the CARTESIAN PRODUCT of |
| 27 |
## replay_host_list x replay_device_list |
| 28 |
## i.e. all devices must occur on each host. |
| 29 |
## |
| 30 |
## If you need asymmetric combinations, you can omit (comment out) |
| 31 |
## replay_device_list and instead denote each individual combination |
| 32 |
## by the special syntax |
| 33 |
## replay_host_list="host1:/dev/device1 host2:/dev/device2" |
| 34 |
## (or similar) |
| 35 |
|
| 36 |
replay_device_list="/dev/dm-{7,9}" |
| 37 |
|
| 38 |
## input_file_list |
| 39 |
## |
| 40 |
## Whitespace-separated list of *.load.gz files. |
| 41 |
## You may use ordinary shell pattern syntax, such |
| 42 |
## as "bursts-ultrafine.readwrite.1b.*.load.gz" |
| 43 |
## or advanced shell pattern syntax, |
| 44 |
## like "bursts-ultrafine.readwrite.1b.{1..9}.load.gz" etc. |
| 45 |
## |
| 46 |
## If you provide less input files than needed by the cartesian product |
| 47 |
## replay_host_list x replay_device_list, the same input files will be |
| 48 |
## re-used in a round-robin fashion. |
| 49 |
## |
| 50 |
## HINT: you can provide an URL for downloading from the internet (even with wildcards), |
| 51 |
## such as "http://www.blkreplay.org/loads/natural/1and1/misc/statistik.*.load.gz" |
| 52 |
## |
| 53 |
## WARNING! running many hosts on a single input file may lead to |
| 54 |
## DISTORTIONS, since all load peaks will occur at the same time, |
| 55 |
## and the disk seeks / their distances will be duplicated everywhere |
| 56 |
## in exactly the same way. As a workaround, see parameter replay_delta below. |
| 57 |
## |
| 58 |
## WARNING! Mixing fundamentally different loads can lead to |
| 59 |
## unintended results! (if you don't know what you are doing) |
| 60 |
|
| 61 |
input_file_list="${base_dir}/example-load/artificial/bursts-ultrafine.readwrite.1b.1.load.gz" |
| 62 |
|
| 63 |
## replay_max_parallelism |
| 64 |
## |
| 65 |
## When set to values > 0, this reduces the parallelism produced by replay_*_list |
| 66 |
## to some smaller value. |
| 67 |
## |
| 68 |
## This is handy for comparisons between different degrees of replay parallelism, |
| 69 |
## without need for reconfiguring the host / devices list each time. |
| 70 |
|
| 71 |
replay_max_parallelism=0 # means unlimited / only limited by replay_*_list |
| 72 |
|
| 73 |
## output_label |
| 74 |
## |
| 75 |
## All output files are prefixed with this name. |
| 76 |
## Useful for general description of projects etc. |
| 77 |
|
| 78 |
output_label="MYPROJECT" |
| 79 |
|
| 80 |
## output_add_* |
| 81 |
## |
| 82 |
## When set to 1 or 0, the output filename will (or will not) contain the |
| 83 |
## corresponding information. |
| 84 |
## Useful for detailed description of your results. |
| 85 |
## |
| 86 |
## WARNING! disabling the hostname / device can lead to name clashes |
| 87 |
## (mutual overwrites) if you start a replay on multiple hosts |
| 88 |
## (and/or on multiple devices) in parallel. |
| 89 |
|
| 90 |
output_add_path=1 # the relative path of the leaf directory is added |
| 91 |
output_add_host=1 # add hostname where this blkreplay instance is running |
| 92 |
output_add_device=1 # add devicename where this blkreplay instance is running |
| 93 |
output_add_input=0 # add the input file name |
| 94 |
|
| 95 |
## replay_start |
| 96 |
## |
| 97 |
## Starting offset in the input file(s), measured in seconds. |
| 98 |
## Often this is 0. |
| 99 |
## Can be used to "zoom into" any "time window" in the input files |
| 100 |
## (when combined with replay_duration) |
| 101 |
## |
| 102 |
## Notice: this is _uniformly_ for all input files. If you need |
| 103 |
## indiviual time windows from each input file, just create specialized |
| 104 |
## input files, e.g. using standard Unix tools like head(1) / tail(1) / |
| 105 |
## awk(1) / perl / gzip etc. |
| 106 |
|
| 107 |
replay_start=0 |
| 108 |
|
| 109 |
## replay_duration |
| 110 |
## |
| 111 |
## One of the most important parameters, measured in seconds. |
| 112 |
## |
| 113 |
## Please read the warnings in the documentation about unexpected |
| 114 |
## effects of storage virtualization layers, caches etc when this |
| 115 |
## parameter is too short. |
| 116 |
|
| 117 |
replay_duration=3600 |
| 118 |
|
| 119 |
## replay_delta |
| 120 |
## |
| 121 |
## As said above, replaying the same input file many times in parallel |
| 122 |
## can lead to unintended distortions. Often, you don't have enough |
| 123 |
## independent input files to achieve high replay parallelism. |
| 124 |
## As a workaround, you may "move on" the time window by the |
| 125 |
## distance $replay_delta, i.e. the next host will replay a |
| 126 |
## "later" portion of the same input file. Although this is worse |
| 127 |
## than having completely independent / uncorrolated input files, |
| 128 |
## this is by far better than "common mode". |
| 129 |
## |
| 130 |
## Warning! please check the length of your input file, whether |
| 131 |
## (replay_start + replay_duration + n * replay_delta) fits into |
| 132 |
## the total length. Otherwise, your load will be silently lower |
| 133 |
## than intended. |
| 134 |
## |
| 135 |
## Hint: when needed, replay_delta should be as high as possible, in |
| 136 |
## order to avoid repetition of the same parts over and over again. |
| 137 |
|
| 138 |
replay_delta=0 |
| 139 |
|
| 140 |
## threads |
| 141 |
## |
| 142 |
## Replay parallelism. Must be between 1 and (almost) 65536. |
| 143 |
## |
| 144 |
## Typically, the number of threads is limiting the number of |
| 145 |
## outstanding IO requests [aka "request queue depth"]. |
| 146 |
## |
| 147 |
## Many people believe "the higher, the better". However, |
| 148 |
## beware of hidden overheads (see PDF paper). |
| 149 |
## |
| 150 |
## Higher numbers will not always lead to better throughput: |
| 151 |
## some devices / drivers / IO schedulers will even slow down when |
| 152 |
## hammered with too many requests in parallel. Some of these |
| 153 |
## bottlenecks may vary with the kernel version (see paper). |
| 154 |
## |
| 155 |
## Attention! Never pick this parameter "out of thin air". |
| 156 |
## |
| 157 |
## In order to approximate real life behaviour, you should DEFINITELY |
| 158 |
## consider the ACTUAL threading behaviour of your application |
| 159 |
## and try to approximate it! |
| 160 |
## |
| 161 |
## Using a totally different threads= parameter than occurring in |
| 162 |
## practice / in YOUR accplication can easily lead to high distortions, |
| 163 |
## and even to completely worthless FAKE RESULTS! |
| 164 |
## |
| 165 |
## If you have a "fork bomb" like Apache, use a high number of threads. |
| 166 |
## Typically, a database like mysql has a relatively low number of threads. |
| 167 |
|
| 168 |
threads=512 |
| 169 |
|
| 170 |
## strong |
| 171 |
## |
| 172 |
## Conflict handling. Determines the STORAGE SEMANTICS. Details see PDF doc. |
| 173 |
## |
| 174 |
## One of following conflict tables is used, depending on this setting: |
| 175 |
## |
| 176 |
## strong=0 : |
| 177 |
## |
| 178 |
## conflict? | R | W | |
| 179 |
## ---+---+---+ |
| 180 |
## R | - | - | |
| 181 |
## W | - | y | |
| 182 |
## |
| 183 |
## strong=1 : |
| 184 |
## |
| 185 |
## conflict? | R | W | |
| 186 |
## ---+---+---+ |
| 187 |
## R | - | y | |
| 188 |
## W | y | y | |
| 189 |
## |
| 190 |
## strong=2 : |
| 191 |
## |
| 192 |
## conflict? | R | W | |
| 193 |
## ---+---+---+ |
| 194 |
## R | y | y | |
| 195 |
## W | y | y | |
| 196 |
## |
| 197 |
|
| 198 |
strong=1 |
| 199 |
|
| 200 |
## cmode |
| 201 |
## |
| 202 |
## Shorthand for "conflict mode". |
| 203 |
## See section about both timely and positionly overlapping |
| 204 |
## in the PDF paper, aka "damaged IO". |
| 205 |
## |
| 206 |
## Following values are possible: |
| 207 |
## |
| 208 |
## with-conflicts: |
| 209 |
## No countermeasures against damaged IO are taken. |
| 210 |
## This can lead to the highest possible throughput, but your device |
| 211 |
## may behave incorrectly. |
| 212 |
## |
| 213 |
## with-drop: |
| 214 |
## In case of damaged IO, any conflicting requests are just dropped. |
| 215 |
## [conflicts are determined by the above strong= parameter] |
| 216 |
## This will minimize artificial delays, but at the cost of some |
| 217 |
## distortions from missing requests. |
| 218 |
## |
| 219 |
## with-partial: |
| 220 |
## In case of damaged IO, the conflicting requests are pushed back |
| 221 |
## to an internal pushback list and re-activated as soon as possible. |
| 222 |
## This gives the best possible throughput while avoiding artificial |
| 223 |
## delays as well as damaged IO. |
| 224 |
## |
| 225 |
## Attention! this may INCREASE the IO parallelism [request queue depth] |
| 226 |
## because additional request slots must be reserved in advance |
| 227 |
## (see paper). |
| 228 |
## |
| 229 |
## In addition, this may lead to a 2-class treatment of requests, because |
| 230 |
## the pushed-back requests have less chances and are queued more |
| 231 |
## intensively than ordinary requests. If you want to reveal whether your |
| 232 |
## test candidate already has some internal 2-class treatment, don't |
| 233 |
## use this mode (otherwise you cannot distinguish the reasons easily). |
| 234 |
## |
| 235 |
## with-ordering: |
| 236 |
## In case of damaged IO, the conflicting requests (as well as |
| 237 |
## any later requests) will be delayed until the conflict has gone. |
| 238 |
## |
| 239 |
## This can lead to ARTIFICIAL DELAYS, because all following requests |
| 240 |
## are delayed as well. |
| 241 |
## |
| 242 |
## This mode is useful for detection of massive problems in the hardware. |
| 243 |
## It is also useful for detection of 2-class request treatment in your |
| 244 |
## test candidate, because the artificial delays are "fairer" than |
| 245 |
## with-partial. |
| 246 |
## |
| 247 |
## Since the micro-stalls introduced by this mode are more approximate |
| 248 |
## to "request queue staggering" occurring in practice, this mode |
| 249 |
## is also useful for avoidance of some distortions caused by overload. |
| 250 |
## In some cases, the artificial delays caused by this mode are even |
| 251 |
## BENEFICIAL! |
| 252 |
|
| 253 |
cmode=with-partial |
| 254 |
|
| 255 |
## vmode |
| 256 |
## |
| 257 |
## Shorthand for "verify mode". |
| 258 |
## |
| 259 |
## WARNING! switching on verify can lead to serious performance degradation |
| 260 |
## (i.e. blkreplay itself may become a bottleneck) |
| 261 |
## |
| 262 |
## During verify mode, some temporary files |
| 263 |
## /tmp/blkreplay.$$/{verify,completion}_table |
| 264 |
## are used to store version information about written data. |
| 265 |
## |
| 266 |
## Depending on the size of the device, this can take considerable space. |
| 267 |
## Depending on workingset behaviour, accesses to those temporary files |
| 268 |
## can slow down blkreplay considerably (due to additional IO). |
| 269 |
## |
| 270 |
## Don't use verify mode for benchmarks! |
| 271 |
## Use it only for checking / validation! |
| 272 |
## |
| 273 |
## Following values are possible: |
| 274 |
## |
| 275 |
## no-overhead: |
| 276 |
## No checks are done. No overhead. |
| 277 |
## |
| 278 |
## with-verify: |
| 279 |
## Whenver a sector is read which has been written before (some time |
| 280 |
## ago), the sector header is checked for any violations of the |
| 281 |
## storage semantics. |
| 282 |
## |
| 283 |
## with-final-verify: |
| 284 |
## In addition to with-verify, at the end all touched sector are |
| 285 |
## separately re-read and checked for any mismatches. |
| 286 |
## |
| 287 |
## with-paranoia: |
| 288 |
## Like with-final-verify, but in addition _all_ written sectors will |
| 289 |
## be _immediately_ re-read and checked. |
| 290 |
## This leads to high distortions of measurements results (because it |
| 291 |
## doubles the IO rates for all writes), but is useful to |
| 292 |
## check the storage semantics even more thoroughly. |
| 293 |
|
| 294 |
vmode=no-overhead |
| 295 |
|
| 296 |
## verbose_script |
| 297 |
## |
| 298 |
## When set to 1, make shell output more speaking. |
| 299 |
|
| 300 |
verbose_script=0 |
| 301 |
|
| 302 |
## verbose |
| 303 |
## |
| 304 |
## When set to 1, make blkreplay output more speaking. |
| 305 |
|
| 306 |
verbose=0 |
| 307 |
|
| 308 |
## start_grace |
| 309 |
## |
| 310 |
## Over slow networks, it may take some time until all pipes / buffers |
| 311 |
## are filled. If the benchmark starts too early, artificial delays |
| 312 |
## could result (because the "supply chain" is too slow). |
| 313 |
## |
| 314 |
## The real starting time of the benchmark will be after this |
| 315 |
## (configurable) grace period. Defaults to 15s. |
| 316 |
## |
| 317 |
## You may need this also in case of laptop disks with a long spin-up |
| 318 |
## time. |
| 319 |
|
| 320 |
#start_grace=15 |
| 321 |
|
| 322 |
##################################################################### |
| 323 |
|
| 324 |
## some advanced parameters (experts only) |
| 325 |
|
| 326 |
#replay_out_start="" |
| 327 |
#omit_tmp_cleanup=0 |
| 328 |
#enable_compress_ssh=2 |
| 329 |
|
| 330 |
#no_o_direct=0 # extremely dangerous, leads to FAKE results! read the docs! |
| 331 |
#o_sync=0 # leads to distortions |
| 332 |
#speedup=1.0 # leads to heavy distortions of NATURAL loads |
| 333 |
#dry_run=0 |
| 334 |
#fake_io=0 |
| 335 |
#ahead_limit=1.000000000 |
| 336 |
#simulate_io=0.001000000 |
| 337 |
#fan_out=8 |
| 338 |
#no_dispatcher=0 |
| 339 |
#bottleneck=0 |