Which of your hard drives is the fastest? Or is it really as fast as its manufacturer promised? With Microsoft's Diskspd tool, you can stress test your hard drives whether you have a desktop computer or a server in a foreign country.
If you want to know the IO capacity of your drives, Diskspd is a great tool. It will tell you the maximum capacity of hard drives a server can handle, or point you to the fastest hard drive to use for heavy workloads (or just demanding PC gaming) on a desktop computer.
For example, let's say we have three hard drives on our business computer, or at home, or on our server: drive F, G, and C. If we have our program's master data (MDF) on drive F, our log files (LDF) on drive G, and our OS on drive C, we can evaluate whether our setup is efficient. For example, the data files (MDF) are the most frequently read and written files by your programs, so you want them on the fastest drive.
Microsoft offers this excellent tool for free, and you can download it from Microsoft TechNet or open source from GitHub.
Diskspd has been tested and works on Windows versions 7, 8, 8.1, 10, as well as Windows Server 2012, 2012 R2, and 2016 Technical Preview 5.
Once you download it, you will need to extract the contents of the .zip file to a folder on your computer. Note that the file contains three different “diskspd.exe” files. The one in the “amd64fre” folder is for 64-bit Windows PCs, while the one in the “x86fre” folder is for 32-bit Windows PCs. If you are using a 64-bit version of Windows then it is best to use the 64-bit version.
Run the program via the command prompt with administrator privileges. In Windows 10 or 8.1, right-click the Start button and select “Command Prompt (Admin)”. In Windows 7, locate the “command prompt” shortcut in the Start menu, right-click, and select “Run as administrator”.
Use the cd command to navigate to the folder where you saved the program and which contains the Diskspd.exe file
Now, run the Diskspd command with the options you want to use. You will find a complete list of the program's options as well as usage information in the DiskSpd_Documentation.pdf file (30 pages) included in the Diskspd file you downloaded.
However, here is a typical full command where it sets the block size to 16K (-b16K), runs a 30-second test (-d30), disables hardware and software crashing (-SH), keeps latency statistics (-E), uses two IO requests per thread (-O2) and four threads (-T4) per target, uses random access rather than sequential writes (-r), performs 30% write operations and 70% read operations (-w30). It also creates a testfile.dat file in C, of size 50MB (-c50M). If you want to compare D, for example, you would type D:\testfile.dat
Diskspd.exe -b16K -d90 -Sh -L -o2 -t4 -r -w30 -c50M c:\testfile.dat
After the 30 seconds are up, you will see the test results in the Command Prompt.
If you want to save your test results, then the command will look something like this:
Diskspd.exe -b16K -d90 -Sh -L -o2 -t4 -r -w30 -c50M c:\testfile.dat > c:\testresults.txt
Look at these results for the average MB/s speed, how many writes were made per second, how many reads were made per second, and the total input/output (IO) operations per second. These results are useful when comparing multiple drives to see which is the fastest, but they will also tell you how many IOs a hard drive can handle.
If you are trying to figure out which hard drive is the fastest for a particular workload, you should create a command that best suits the workload. For example, if you have a server that only reads data and does not write, you should run a test with 100% data read without counting any writes. Run this stress test on multiple drives and compare the results to see which is the fastest for each type of workload.
Note that there are many switches to configure the Diskspd command. You can find the full list in the program's help files, but here are some important options:
-w indicates the percentage of write and read operations. For example, entering -w40 will perform 40% write operations and therefore the remaining 60% will be read operations. Setting -W100 will perform 100% write operations. Omitting the -w switch or entering -w0 will perform 0% write operations and 100% read operations.
-r or -S specifies whether the test will be random access or sequential operation. Specify -r for random access or -S for sequential. This helps you test either random file access (often a bunch of small files) or sequential file access (often a large file that is read and written all at once).
-t indicates the number of threads to run simultaneously, such as -t2 for two threads or -t6 for six threads.
-o indicates the number of pending requests per thread, such as -o4 for four requests or -o2 for two requests.
-d is the duration of the tests in seconds, such as -d90 for 90 seconds or -d120 for 120 seconds.
-b is the block size of the read or write, such as -b16K for a 16K block size or -b64K for a 64K block size.
Using these options, you can tune the command to see how your drives perform under various loads and conditions. Once you've written a command that you think approximates the type of workload you're running on your computer, you can run your tests on as many drives as you have and see which one offers the best performance.



