Since I build datacenters I need to verify performance and you can do that using SQLIO. But there is a lot of parameters, a lot of typing and to make testing a bit more consistent I was reading Jose Barreto’s blog http://blogs.technet.com/b/josebda/archive/2013/03/28/sqlio-powershell-and-storage-performance-measuring-iops-throughput-and-latency-for-both-local-disks-and-smb-file-shares.aspx and that gave me inspiration to create a PowerShell script that is a bit more complete and here you can see the result of it. We use this to measure performance on local disks, SMB storage, Storage Spaces, SAN storage, iSCSI storage, basically everything, now it is easy to “spot” the issue, since we have seen the numbers so many times.
Output sample in table format.
Output in Grid view.
You can download the script from here: http://1drv.ms/1pQNr4i
To use it you need to have SQLIO from Microsoft and you need to store the SQLIO.exe file in the same folder as the script, this way it is easy to move around the test tool as a kit, since SQLIO does not really needs to be installed, the download is an MSI file, so you need to install it once or extract it
You can download SQLIO from here: http://www.microsoft.com/en-us/download/details.aspx?id=20163
The script it is rather easy, it is basically a wrapper for SQLIO.exe but it gives you an output as a table or in a grid. There is two options to measure workload, you either measure IOPS or Transfer rate.
.\Measure-DiskPerformance.ps1 -TestFileName test.dat –TestFileSizeInGB 1 -TestFilepath C:\VMs -TestMode Get-LargeIO -FastMode True -RemoveTestFile True -OutputFormat Out-GridView
The name of the file, it will create the file using FSUTIL, but it checks if it exists and if it does it stops, you can override that with the –RemoveTestFile True
Size of the file, it has fixed values, use the TAB key to flip through them
The folder, can also be an UNC path, it will create the folder so it does not need to exist.
There is too test modes Get-LargeIO or Get-SmallIO, you use Get-LargeIO to measure the transfer rate and you use Get-SmallIO to measure IOPS
Fastmode true runs each test for just 10 seconds, it gives you a hint, if you don’t set it or set it to false it will run for 60 sec (it will take a break for 10 sec between each run)
Removes the test file if it exists
Choose between Out-Gridview or Format-Table