Test Drive Performance [Windows / Linux]

Test Sequential Read/Write with DD

Write

dd if=/dev/zero of=./largefile bs=1M count=12288

Read

dd if=./largefile of=/dev/null bs=4k

Test IOPS with FIO

vim test.fio

[random]
rw=randread
size=4g
directory=./iops
iodepth=403
direct=1
blocksize=4k
numjobs=16
nrfiles=1
group_reporting
ioengine=sync
loops=1
rwmixread=75

mkdir ./iops
fio ./test.fio

Test Windows Performance with DiskSpd

Download DiskSpd

https://gallery.technet.microsoft.com/DiskSpd-A-Robust-Storage-6ef84e62

Source code here: https://github.com/microsoft/diskspd

DiskSpd.exe -c150G -d300 -r -w40 -t8 -o32 -b64K -Sh -L D:\SpeedTest\testfile.dat

Parameters:

  • -c150G – Create a file of the specified size. Size can be stated in bytes or KiBs, MiBs, GiBs. Here – 150GB.
  • -d300 – Duration of measurement period in seconds, not including cool-down or warm-up time (default = 10 seconds). Here – 5 minutes.
  • -r – Random I/O access (override -s).
  • -s – Sequential I/O access.
  • -w40 – Percentage of write requests to issue (default = 0, 100% read). Here 40% of IO operations are Writes, remaining 60% are Reads. This is a usual load for my SQL Server OLTP databases.
  • -t8 – The number of threads per file. Here – 8. One thread per available core.
  • -o32 – The number of outstanding I/O requests per target per thread. In other words, it is a queue depth. Here – 32.
  • -b46K – Block size in bytes or KiBs, MiBs, or GiBs. Here – 64KB.
  • -Sh – Disable both software caching and hardware write caching.
  • -L – Measure latency statistics.
  • D:\SpeedTest\testfile.dat – My target file used for testing (created with -c).