If you have followed my previous article titled IO Performance Benchmarking 101, you know that I am a big fan of using CrystalDiskMark for measuring disk IO throughput. CrystalDiskMark is a wonderful tool, but being a GUI application it is unsuitable for using in an automated environment or when you need to test several disks with several sets of parameters without constant human intervention. This limitation is partially addressed by using DiskMarkStream, which is a GUI app that can automate CrystalDiskMark. Unfortunately further UI limitations, such as the inability to use a test file size outside of a short set list of values hinder the effectiveness of this tool in some scenarios.
Since the 2015 version 4, CrystalDiskMark changed and became a GUI layer on top of a recently released IO benchmarking tool, DiskSpd. DiskSpd is an open source project by Microsoft, which delivers a command-line utility to measure disk IO. The concept is very similar to tools you would typically find in the *inx world (Bonnie++, IOzone, XDD, etc). One nice thing about DiskSpd is that it can output information in XML format, thus allowing you to load the results of the test in a structured manner. This creates a great opportunity to write wrappers in PowerShell around DiskSpd to accomplish what your heart desires.
Introducing DiskSpdAuto! DiskSpdAuto is a PowerShell script that executes a predefined set of IO tests on a disk or disks without any human intervention. All the results, both raw and processed, are written to disk for further analysis in XML/CSV format. The output will include the parameters of the test, the name of the machine, the label of the disk and the IO metrics. All that is left is to archive the results or load them into your favorite spreadsheet for analysis and comparison.
The predefined set of tests is the 3 (IMO) useful test profiles in CrystalDiskMark 3, which includes:
- Sequential read and write using 1MB blocks.
- Random read and write using 4KB blocks and 1 outstanding request.
- Random read and write using 4KB blocks and 32 outstanding requests.
Being an open source script, you can add your own test profiles or modify the existing ones.
Hope this helps you with your storage IT work. I’m happy to get your feedback in the comments.