As part of this discussion about diskspd, I felt it was time to try to determine which parameters make sense to use based on how Epicor ERP is used in practice.
I’m showing my work so people can poke holes in the approach. If you’re just interested in the results and not the process just skip to the end for the testing parameters that I’ll be submitting to development for inclusion in our guides going forward to replace our guidance to use SQLIO.
First, I needed to find out a way to get database accurate read and write stats of a SQL database and discovered this article: How to get Read/Write percentages for a SQL Server database | The Fisherman DBA .
From that article, this note about his approach:
The stats are cumulative since the last SQL service restart. The longer you wait to run this since the last server reboot or service restart, the more meaningful the stats will be.
Next, I needed some databases to test against and the closest thing to a production database that I have direct access to is well, a number of the customer databases in the Support environment. As these databases were brought in to Support for different reasons across various modules, I figured the stats across these Support loaded customer databases would be appropriately representative. As a bonus, the largest SQL instance we have in Support hasn’t been restarted since October so the results should be meaningful.
Ran the query, put the results into a spreadsheet like so:
Was only concerned with databases that were accessed and used to some extent (as in, we tested in them) and not those that were just loaded, so averaged the reads if they were less than 95% / writes if they were over 5%.
Drum roll.
Ended up an average of ~80% reads / ~20% writes. We have a result.
NOTE: I repeated this test against a development SQL server instance and the results were similar.
The parameters I’ll be submitting to development for diskspd to replace our recommendation to use SQLIO
DISKSPD COMMAND FOR TEST 1 AND 3 (transactional database MDF and TempDB):
diskspd.exe -b64K –d900 -o8 -h -L -t8 -r -Z1G –w20 -c80G d:\test\test.dat > test1_3.txt & test1_3.txt
Where
• –d900 is 900 second test duration - same as our SQLIO test
• -o8 is 8 outstanding I/Os (depth queue) – same as our SQLIO test
• -h is disable software caching (which all the articles I saw online recommended when testing on SQL server)
• -L is for displaying latency info (info is good)
• -t8 is for 8 threads – same as our SQLIO test
• -r is for random
• -Z1G is for workload test write source buffer size in MB for supplying random data for writes (which is recommended when testing SQL server)
• -w20 is for 20% writes – based on analysis of internal usage of customer database
• -C80G is for an 80G test file – same as our SQLIO test
DISKSPD COMMAND FOR TEST 2 (SQL transaction log .LDF):
diskspd.exe -b64K –d900 -o8 -h -L -t8 -w100 -c80G c:\test\test.dat > test2.txt & test2.txt