Diskspd: Make a Stress Test your hard drives or your server

Which of your hard drives is the fastest? or who is really as fast as promised by the manufacturer? With Microsoft's Diskspd tool, you can do a stress test on your hard drives whether you have a desktop computer or a server in a foreign country.

Hard diskspd

If you want to learn the capacity of IO of your disks, the Diskspd is an excellent tool. It tells you the maximum capacity of hard drives that a server can handle, or you can point to the fastest hard drive to use for heavy workloads (or just for a demanding gaming PC) on a desktop computer.

For example, suppose we have three hard disk drives in our company's computer, or in our house or on our server: drive F, G, and C. If we have the basic MDF data on the drive F, log files (LDF) on drive G and our OS in our C drive, we can evaluate if our setup is effective. For example, data files (MDFs) are the most busy files that read and write your programs, and you wanted to be in the fastest unit.

Microsoft offers this great tool for free, and you can download from Microsoft TechNet or in open source code from GitHub.

Diskspd has been tested and works on versions of Windows 7, 8, 8.1, 10, and Windows Server 2012, 2012 R2, and 2016 Technical Preview 5.

Once downloaded, you will need to export the contents of the .zip file to a folder on your computer. Note that the file contains three different "diskspd.exe" files. 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 through the command line with administrator permissions. In Windows 10 or 8.1, right-click the Start button and select "Command Line". In Windows 7, locate the "command prompt" shortcut in the Start menu, right-click and select "Run as Administrator".

Use the cd command to go to the folder that you saved the program and that contains the Diskspd.exe file

Now, run the Diskspd command with the options you want to use. You will find a complete list of program choices and user information in the DiskSpd_Documentation.pdf file (30 pages) included in the Diskspd file you downloaded.

However, see a typical full command where it defines the block size in 16K (-b16K), runs a 30 (X) dump (-D30) test, disables crashing hardware and software (-SH), keeps latent statistics , uses two IO requests per thread (-O2) and four threads (-X4) per target, uses random access rather than sequential recordings (-r), performs 30% write operations and 70% read functions (-w30). It also creates a testfile.dat file in C, size 50MB (-c50M). If you want to compare D, for example, you have to write D: \ testfile.dat

Diskspd.exe -b16K -d90 -Sh -L -o2 -t4 -r -w30 -c50M c: \ testfile.dat

After the end of the 30 seconds to complete the test, you will see the test results in the Command Prompt.
If you want to save your test results, then the command will be configured as follows:

Diskspd.exe -b16K -d90 -Sh -L -o2 -t4 -r -w30 -c50M c: \ testfile.dat> c: \ testresults.txt


Note the average speed MB / s, how many times a second, how many readings were made per second, and the total I / O (IO) per second. These results are useful when comparing multiple drives to see which one is the fastest but they will also tell you how many IO can handle a hard disk.


If you are trying to figure out which is the fastest hard drive 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% reading data without counting any recordings. Run this endurance test on multiple disks and compare the results to see which is the fastest for each type of job.

Note that there are many switches to synthesize the Diskspd command. You will find the full list in the program's help files, but here are a few important options:

-w indicates the percentage of recording and reading functions. For example, inserting -w40 will perform 40% write operations, so the remaining 60% will be read functions. Setting -W100 will execute 100% signup. By skipping the -w switch or inserting -w0 will perform 0% recording functions and 100% read modes.
-r or -S determines whether the test will be random access or sequential operation. Specify -r for random access or -S for successive. This helps you try either accidentally accessing files (often a bunch of small files) or sequential access to the files (often a large file being read and written all at once).
-t indicates the number of threads to execute at the same time, 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 test in seconds, such as -d90 for 90 seconds or -d120 for 120 seconds.
-b is the block size of it reads or writes as -b16K for an 16K block size or -b64K for an 64K block size.

Using these options, you can set the command to see how your drives work under different loads and conditions. Once you write a command that you think approximates the type of workload you are running on your computer, you can run your tests on as many drives as you can and see which one offers the best performance.

iGuRu.gr The Best Technology Site in Greecefgns

every publication, directly to your inbox

Join the 2.097 registrants.

Written by Dimitris

Dimitris hates on Mondays .....

Leave a reply

Your email address is not published. Required fields are mentioned with *

Your message will not be published if:
1. Contains insulting, defamatory, racist, offensive or inappropriate comments.
2. Causes harm to minors.
3. It interferes with the privacy and individual and social rights of other users.
4. Advertises products or services or websites.
5. Contains personal information (address, phone, etc.).