DiskSpd is a feature-rich disk storage testing tool developed by Microsoft that combines robust and variety IO workload definition with flexible runtime and output options, making it a perfect tool created for IT Professionals to analyze and troubleshoot storage performance related issues without running a full end-to-end workload. Some of the highlights include:
- Ability to target physical disks in addition to partitions and files
- Variable read/write IO percentage settings
- Custom CPU affinity options
- Consumable XML output option
- Synchronization and tracing functionality
DiskSpd is also a command line utility that needs to run in an elevated Command Prompt window. The syntax of the command line is as below:
diskspd [options] target1 [ target2 [ target3 ...] ]
The test targets can be regular files (c:\testfile.dat), partition (C: or D:), or physical drives (#1). The Options is where the magic starts with so many switches that you can add to the main command to perform a wide variety of test scenarios.
But we can always start with the easiest, such as below:
It runs a 10-second test on partition c: using all default parameters.
Of course, you can save the output to a text file using “>filename.txt” option.
A more sophisticated example is to run the test against one or multiple regular files with involving more parameters. For example, the following command creates two 1GB test files, one on c: drive and one on d: drive, with the block size as 4KB, 2 threads per file, and runs the test for 30 seconds.
diskspd -c1g -b4k -t2 -d30 -o10 c:\testfile.dat d:\testfile.dat
There is also a 28-page document included in the download package that explains every test parameter in detail with a set of examples and explanations.
DiskSpd was originally developed under Jim Gray by Peter Kukol from Microsoft Research. It’s now an open source project that can be found at https://github.com/microsoft/diskspd. It works on both Windows Server and Client systems, including Windows 7, 8, and 10, and Windows Server 2008 and 2012.
It’s also worth noting that it’s also a tool that supersedes SQLIO to test in an SQL server environment. For specific guidance on using Diskspd to simulate SQL Server, please see the bundled document, UsingDiskspdforSQLServer.docx, available in the updated Diskspd download package.
If you have been using a GUI tool for your disk performance testing tool, it’s time to upgrade. It’s just that powerful.