Using DiskSpd in SQL Server environments Writer: Robert Beene Contributors: Jose Barreto, Ramu Konidena Technical Reviewers: Robert Dorr, Mike Zawadzki, Nitin Verma, Dan Lovinger Applies To: All Versions of SQL Server except Microsoft Azure SQL Database (MASD) Topics
|
||||||||||||||||||||||||
BACKGROUND |
A number of tools are available to stress and validate the functionality of I/O subsystems. Some of these tools actually simulate SQL Server I/O patterns, and others let you control the I/O patterns submitted to the subsystem. There are tools that confirm the functional validity of a configuration, while others are used only to test performance capacity. Software that performs a validation test simulates a read and write pattern, but it also verifies that the information was correctly read and written. This type of software is often used to help find root causes of corruption or to help determine whether drivers and hardware are functioning as expected when they’re performing I/O. There is likely to be a speed component to running this test, but this test is more about accuracy than speed. For the purposes of this document, a performance test tool focuses on simulating the READ and WRITE pattern, but it focuses even more heavily on the throughput and speed at which those operations take place (Load Generator). A performance test determines whether the hardware is capable of meeting the parameters at which it was designed to handle I/O throughput. The following table compares the most common tools that are currently used to test I/O subsystems in the context of SQL Server. Table 1 Tools used to test I/O subsystems
SQLIOSim For the |
|||||||||||||||||||||||
INFORMATION |
DiskSpd.exe You can use DiskSpd |
|||||||||||||||||||||||
FEATURES |
Some of the
|
|||||||||||||||||||||||
Open Source DiskSpd is
|
||||||||||||||||||||||||
Download details DISKSPD is To download DiskSpd, |
||||||||||||||||||||||||
CONTENTS |
The DiskSpd download Figure 1 |
|||||||||||||||||||||||
SYNTAX |
To display a DiskSpd DiskSpd [options] target1 [ target2 [ The following DiskSpd –d300 Test targets All available options and parameters are enumerated in |
|||||||||||||||||||||||
WARNINGS & PRECAUTIONS |
WARNING: When WARNING: If Note: Be aware that uppercase and lowercase Note: Make sure there’s nothing else Note: Run DiskSpd from an elevated Note: You can cancel a DiskSpd run at any Note: The iB notation is an international • 1KiB = 210 = 1,024 bytes • 1MiB = 1024 KiB = 220 = • 1GiB = 1024 MiB = 230 = |
|||||||||||||||||||||||
USAGE |
For complete In order to The following Note: Make sure that you always use a
Now that we The following DiskSpd.exe -c1000G –d300 -r -w0 -t8 -o8
Note: The test file that’s created for
EXAMPLES Note: All A single target file sized at 1000 GiB 8 threads for data files 4 threads for Log files (1 per NUMA node 300 Second duration 32 outstanding IOs for data files, 8 up Your test may require modifying these Note: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ANALYSIS |
For complete By default, Before For example, assume Figure 2
Understanding It’s For example,
There is a penalty MAX_WRITE * NUMBER_OF_DRIVES / The following
Even though each drive can handle up to 450 MB/sec
Now that we have an understanding of the possible max Repeats Command Line: Note: For this test, –L for latency Lists Input timespan: 1 ------------- duration: 10s warm up time: 5s cool down time: 0s measuring latency random seed: 0 path: 'F:\testfile.dat' think time: 0ms burst size: 0 software and hardware write performing read test block size: 8192 using random I/O (alignment: number of outstanding I/O thread stride size: 0 threads per file: 8 using I/O Completion Ports IO priority: normal Results for ******************************************************************************* Shows actual test thread count: 8 proc count: 12 Shows CPU | Usage | ------------------------------------------- 0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| ------------------------------------------- avg.| 2.43%| Gives Total IO thread | bytes | ----------------------------------------------------------------------------------------------------- 0 | 5341184 | 652 | 0.51 | 65.20 | 1 | 5865472 | 716 | 0.56 | 71.60 | 2 | 5636096 | 688 | 0.54 | 68.80 | 3 | 5545984 | 677 | 0.53 | 67.70 | 4 | 5308416 | 648 | 0.51 | 64.80 | 5 | 5947392 | 726 | 0.57 | 72.60 | 6 | 5414912 | 661 | 0.52 | 66.10 | 7 | 5431296 | 663 | 0.52 | 66.30 | The total: 44490752 | 5431 | 4.24 | 543.10 | For Read IO thread | bytes | ----------------------------------------------------------------------------------------------------- 0 | 5341184 | 652 | 0.51 | 65.20 | 1 | 5865472 | 716 | 0.56 | 71.60 | 2 | 5636096 | 688 | 0.54 | 68.80 | 3 | 5545984 | 677 | 0.53 | 67.70 | 4 | 5308416 | 648 | 0.51 | 64.80 | 5 | 5947392 | 726 | 0.57 | 72.60 | 6 | 5414912 | 661 | 0.52 | 66.10 | 7 | 5431296 | 663 | 0.52 | 66.30 | ----------------------------------------------------------------------------------------------------- total: 44490752 | 5431 | 4.24 | 543.10 | As Write IO thread | bytes | ----------------------------------------------------------------------------------------------------- 0 | 0 | 0 | 0.00 | 0.00 | 0.000 | N/A | F:\testfile.dat (1000GB) 1 | 0 | 0 | 0.00 | 0.00 | 0.000 | N/A | F:\testfile.dat (1000GB) 2 | 0 | 0 | 0.00 | 0.00 | 0.000 | N/A | F:\testfile.dat (1000GB) 3 | 0 | 0 | 0.00 | 0.00 | 0.000 | N/A | F:\testfile.dat (1000GB) 4 | 0 | 0 | 0.00 | 0.00 | 0.000 | N/A | F:\testfile.dat (1000GB) 5 | 0 | 0 | 0.00 | 0.00 | 0.000 | N/A | F:\testfile.dat (1000GB) 6 | 0 | 0 | 0.00 | 0.00 | 0.000 | N/A | F:\testfile.dat (1000GB) 7 | 0 | 0 | 0.00 | 0.00 | 0.000 | N/A | F:\testfile.dat (1000GB) ----------------------------------------------------------------------------------------------------- total: 0 | 0 | 0.00 | 0.00 | 0.000 | N/A %-ile | ---------------------------------------------- min | 25th | 50th | 75th | 90th | 95th | 99th | 3-nines 4-nines 5-nines 6-nines 7-nines 8-nines max | |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
* DO NOT USE. SQLIO and
SQLIOStress are deprecated and will officially be pulled from download site, if
they are not already. Any personal copies of the tools should be removed.