Tips and tricks for using diskspd especially useful for those familar with tools like fio
Tip #1 The default OIO is “2” if no other parameters are specified
- This is documented on the diskpsd page but most workload generators that i use will default to a single OIO, so it’s worth pointing out.
- Note that in the command below there is no “-t” switch.
Tip #2 The -o parameter is per-disk and per thread.
- Run diskspd with –o32 (single thread) generates a total of 32 OIO
- Run diskspd with –o32 and -t2 (two threads) generates a total of 64 OIO
- Run diskspd with –o32, -t8 (eight threads) generates a total of 256 OIO
Tip #3 Threads and OIO are per disk device.
Using the above (-o32 -t8) with 4 disks will yield 1024 OIO (32*8*4) more than most physical HBA’s can deliver by default
Tip #4 To keep total OIO constant across disk count use -O and -F
In the case where we want to keep the total OIO constant at 128 but experiment with different numbers of disks use for example -O32 -F8 rather than -O32 -t8.
- 4 Devices
- 2 Devices
- 1 Device
Tip #5 Creating a file with -Zr does not fill the file.
To create a file with non-null bytes, you will have to do a separate write phase after initial creation.
Tip #6 The default fill pattern is highly compressible
- Writing out a file without a switch writes a Repeating pattern every 256 bytes. A 1FFF file will compress by KKK% to JJJbytes
- Writing out a file with “-Z” writes NULL bytes
- Writing out a file with “-Zr” writes totally random bytes.
Tip #7 “Raw” devices are supported
diskspd supports writing directly to the drive (e.g. without a filesystem) using the format #<disknum>
Tip #8 Writing to a file/device without a time period will default to 10 seconds
Anyone coming from e.g. fio might expect the write to fill the entire file.