1# bdevperf {#bdevperf} 2 3## Introduction 4 5bdevperf is an SPDK application used for performance testing 6of block devices (bdevs) exposed by the SPDK bdev layer. It is an 7alternative to the SPDK bdev fio plugin for benchmarking SPDK bdevs. 8In some cases, bdevperf can provide lower overhead than the fio 9plugin, resulting in better performance and efficiency for tests 10using a limited number of CPU cores. 11 12bdevperf exposes command line interface that allows to specify 13SPDK framework options as well as testing options. 14bdevperf also supports a configuration file format similar 15to FIO. It allows user to create jobs parameterized by 16filename, cpumask, blocksize, queuesize, etc. 17 18## Config file 19 20bdevperf's config file format is similar to FIO. 21 22Below is an example config file that uses all available parameters: 23 24~~~{.ini} 25[global] 26filename=Malloc0:Malloc1 27bs=1024 28rw=randrw 29rwmixread=90 30 31[A] 32cpumask=0xff 33 34[B] 35cpumask=[0-128] 36filename=Malloc1 37 38[global] 39filename=Malloc0 40rw=write 41 42[C] 43bs=4096 44offset=1000000 45length=1000000 46~~~ 47 48Jobs `[A]` `[B]` or `[C]`, inherit default values from `[global]` 49section residing above them. So in the example, job `[A]` inherits 50`filename` value and uses both `Malloc0` and `Malloc1` bdevs as targets, 51job `[B]` overrides its `filename` value and uses `Malloc1` and 52job `[C]` inherits value `Malloc0` for its `filename`. 53 54Interaction with CLI arguments is not the same as in FIO however. 55If bdevperf receives CLI argument, it overrides values 56of corresponding parameter for all `[global]` sections of config file. 57So if example config is used, specifying `-q` argument 58will make jobs `[A]` and `[B]` use its value. 59 60Below is a full list of supported parameters with descriptions. 61 62Param | Default | Description 63--------- | ----------------- | ----------- 64filename | | Bdevs to use, separated by ":" 65cpumask | Maximum available | CPU mask. Format is defined at @ref cpu_mask 66bs | | Block size (io size) 67iodepth | | Queue depth 68rwmixread | `50` | Percentage of a mixed workload that should be reads 69offset | `0` | Start I/O at the provided offset on the bdev 70length | 100% of bdev size | End I/O at `offset`+`length` on the bdev 71rw | | Type of I/O pattern 72 73Available rw types: 74 75- read 76- randread 77- write 78- randwrite 79- verify 80- reset 81- unmap 82- write_zeroes 83- flush 84- rw 85- randrw 86