Downloading and Configuring SQLIOSQLIO Video Tutorial: http://sqlserverpedia.com/wiki/SAN_Performance_Tuning_with_SQLIO [Download SQLIO from Microsoft] Notice that I said SQLIO, not SQLIOSIM. Experienced database administrators will often direct you to SQLIOSIM because it's easier to use and mimics SQL Server's disk activity patterns. Here's the catch: it won't necessarily test your SAN to its maximum potential. Your SAN team may indicate that if your SQLIOSIM results aren't fast enough, it's a SQL-related problem, not a SAN-related problem. They may use testing utilities from vendors that mimic results closer to what SQLIO will give you. We want to push the SAN's pedal to the metal and find out how fast it'll go in any situation. After installing SQLIO, edit the param.txt file and change these two parameters:
After saving param.txt, run this at the command line in the same directory where SQLIO is installed in order to create the test file: sqlio -kW -s10 -fsequential -o8 -b8 -LS -Fparam.txt timeout /T 10 When it finishes, your test file is created, and it's time to run our real tests. Testing Your SAN PerformanceInstead of picking and choosing individual parameters to use, I like to take the shotgun approach: try every possible combination of random versus sequential, low and high numbers of threads, read versus write, etc. The below batch file will take all of the possibilities and run 'em all. Copy/paste this into a text file called SANTest.bat: sqlio -kW -t2 -s120 -dM -o1 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t2 -s120 -dM -o2 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t2 -s120 -dM -o4 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t2 -s120 -dM -o8 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t2 -s120 -dM -o16 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t2 -s120 -dM -o32 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t2 -s120 -dM -o64 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t2 -s120 -dM -o128 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t4 -s120 -dM -o1 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t4 -s120 -dM -o2 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t4 -s120 -dM -o4 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t4 -s120 -dM -o8 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t4 -s120 -dM -o16 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t4 -s120 -dM -o32 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t4 -s120 -dM -o64 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t4 -s120 -dM -o128 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t8 -s120 -dM -o1 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t8 -s120 -dM -o2 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t8 -s120 -dM -o4 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t8 -s120 -dM -o8 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t8 -s120 -dM -o16 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t8 -s120 -dM -o32 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t8 -s120 -dM -o64 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t8 -s120 -dM -o128 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t16 -s120 -dM -o1 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t16 -s120 -dM -o2 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t16 -s120 -dM -o4 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t16 -s120 -dM -o8 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t16 -s120 -dM -o16 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t16 -s120 -dM -o32 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t16 -s120 -dM -o64 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t16 -s120 -dM -o128 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t32 -s120 -dM -o1 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t32 -s120 -dM -o2 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t32 -s120 -dM -o4 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t32 -s120 -dM -o8 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t32 -s120 -dM -o16 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t32 -s120 -dM -o32 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t32 -s120 -dM -o64 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t32 -s120 -dM -o128 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t64 -s120 -dM -o1 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t64 -s120 -dM -o2 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t64 -s120 -dM -o4 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t64 -s120 -dM -o8 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t64 -s120 -dM -o16 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t64 -s120 -dM -o32 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t64 -s120 -dM -o64 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t64 -s120 -dM -o128 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t2 -s120 -dM -o1 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t2 -s120 -dM -o2 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t2 -s120 -dM -o4 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t2 -s120 -dM -o8 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t2 -s120 -dM -o16 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t2 -s120 -dM -o32 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t2 -s120 -dM -o64 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t2 -s120 -dM -o128 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t4 -s120 -dM -o1 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t4 -s120 -dM -o2 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t4 -s120 -dM -o4 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t4 -s120 -dM -o8 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t4 -s120 -dM -o16 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t4 -s120 -dM -o32 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t4 -s120 -dM -o64 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t4 -s120 -dM -o128 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t8 -s120 -dM -o1 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t8 -s120 -dM -o2 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t8 -s120 -dM -o4 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t8 -s120 -dM -o8 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t8 -s120 -dM -o16 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t8 -s120 -dM -o32 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t8 -s120 -dM -o64 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t8 -s120 -dM -o128 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t16 -s120 -dM -o1 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t16 -s120 -dM -o2 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t16 -s120 -dM -o4 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t16 -s120 -dM -o8 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t16 -s120 -dM -o16 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t16 -s120 -dM -o32 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t16 -s120 -dM -o64 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t16 -s120 -dM -o128 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t32 -s120 -dM -o1 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t32 -s120 -dM -o2 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t32 -s120 -dM -o4 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t32 -s120 -dM -o8 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t32 -s120 -dM -o16 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t32 -s120 -dM -o32 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t32 -s120 -dM -o64 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t32 -s120 -dM -o128 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t64 -s120 -dM -o1 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t64 -s120 -dM -o2 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t64 -s120 -dM -o4 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t64 -s120 -dM -o8 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t64 -s120 -dM -o16 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t64 -s120 -dM -o32 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t64 -s120 -dM -o64 -frandom -b64 -BH -LS Testfile.dat sqlio -kR -t64 -s120 -dM -o128 -frandom -b64 -BH -LS Testfile.dat sqlio -kW -t2 -s120 -dM -o1 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t2 -s120 -dM -o2 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t2 -s120 -dM -o4 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t2 -s120 -dM -o8 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t2 -s120 -dM -o16 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t2 -s120 -dM -o32 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t2 -s120 -dM -o64 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t2 -s120 -dM -o128 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t4 -s120 -dM -o1 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t4 -s120 -dM -o2 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t4 -s120 -dM -o4 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t4 -s120 -dM -o8 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t4 -s120 -dM -o16 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t4 -s120 -dM -o32 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t4 -s120 -dM -o64 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t4 -s120 -dM -o128 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t8 -s120 -dM -o1 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t8 -s120 -dM -o2 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t8 -s120 -dM -o4 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t8 -s120 -dM -o8 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t8 -s120 -dM -o16 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t8 -s120 -dM -o32 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t8 -s120 -dM -o64 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t8 -s120 -dM -o128 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t16 -s120 -dM -o1 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t16 -s120 -dM -o2 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t16 -s120 -dM -o4 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t16 -s120 -dM -o8 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t16 -s120 -dM -o16 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t16 -s120 -dM -o32 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t16 -s120 -dM -o64 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t16 -s120 -dM -o128 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t32 -s120 -dM -o1 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t32 -s120 -dM -o2 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t32 -s120 -dM -o4 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t32 -s120 -dM -o8 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t32 -s120 -dM -o16 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t32 -s120 -dM -o32 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t32 -s120 -dM -o64 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t32 -s120 -dM -o128 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t64 -s120 -dM -o1 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t64 -s120 -dM -o2 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t64 -s120 -dM -o4 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t64 -s120 -dM -o8 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t64 -s120 -dM -o16 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t64 -s120 -dM -o32 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t64 -s120 -dM -o64 -fsequential -b64 -BH -LS Testfile.dat sqlio -kW -t64 -s120 -dM -o128 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t2 -s120 -dM -o1 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t2 -s120 -dM -o2 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t2 -s120 -dM -o4 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t2 -s120 -dM -o8 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t2 -s120 -dM -o16 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t2 -s120 -dM -o32 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t2 -s120 -dM -o64 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t2 -s120 -dM -o128 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t4 -s120 -dM -o1 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t4 -s120 -dM -o2 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t4 -s120 -dM -o4 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t4 -s120 -dM -o8 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t4 -s120 -dM -o16 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t4 -s120 -dM -o32 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t4 -s120 -dM -o64 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t4 -s120 -dM -o128 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t8 -s120 -dM -o1 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t8 -s120 -dM -o2 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t8 -s120 -dM -o4 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t8 -s120 -dM -o8 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t8 -s120 -dM -o16 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t8 -s120 -dM -o32 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t8 -s120 -dM -o64 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t8 -s120 -dM -o128 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t16 -s120 -dM -o1 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t16 -s120 -dM -o2 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t16 -s120 -dM -o4 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t16 -s120 -dM -o8 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t16 -s120 -dM -o16 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t16 -s120 -dM -o32 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t16 -s120 -dM -o64 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t16 -s120 -dM -o128 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t32 -s120 -dM -o1 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t32 -s120 -dM -o2 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t32 -s120 -dM -o4 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t32 -s120 -dM -o8 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t32 -s120 -dM -o16 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t32 -s120 -dM -o32 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t32 -s120 -dM -o64 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t32 -s120 -dM -o128 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t64 -s120 -dM -o1 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t64 -s120 -dM -o2 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t64 -s120 -dM -o4 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t64 -s120 -dM -o8 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t64 -s120 -dM -o16 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t64 -s120 -dM -o32 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t64 -s120 -dM -o64 -fsequential -b64 -BH -LS Testfile.dat sqlio -kR -t64 -s120 -dM -o128 -fsequential -b64 -BH -LS Testfile.dat Whew! And that's just one pass - if you want to do multiple passes of the same tests for consistency's sake, like to eliminate the chance that other servers are running on the same SAN and affecting your performance results, you would want to paste that same set of 200+ lines multiple times into your batch file. Let's take the first line of the batch file and analyze what it's doing: sqlio -kW -t2 -s120 -dM -o1 -frandom -b64 -BH -LS Testfile.dat The most important parameters are:
Do a find & replace in your text file and replace -dM with the drive letter of your choice. If you're testing on your S drive, for example, you would replace -dM with -dS. Then go to the command prompt in the same directory as SQLIO is installed and type: SANTEST.BAT > RESULTS.TXT This will run our newly created batch file and dump the results into a text file. This will take a long time, like six hours or more, and it will be hammering your SAN. Don't run this on a production server, and don't even run it on the same SAN as a production server when the production server is under load because it may time out. I've had instances where this batch file has actually caused a SAN to restart itself, so use this with caution - preferably in a test lab or before your SAN goes live. Hours later, when it finishes, you'll have a RESULTS.TXT file with lots of juicy metrics about your storage performance. Importing SQLIO Results into SQL ServerThose text file results are cryptic - time to bring them into our favorite data analysis platform, Microsoft Access. Wait, I'm kidding, put the axe down - we'll import them into SQL Server. Script to Create the Tables and and ETL Stored ProcedureBefore we start, create a database that you'll use for SQLIO data storage or designate an existing utility database that you'll use. This script requires SQL Server 2005 or newer, since it uses the varchar(max) field. In that database, run the below script to create the tables for results storage: SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SQLIO_Import] (
[RowID] [ int ] IDENTITY ( 1,1 ) NOT NULL ,
[ParameterRowID] [ int ] NULL ,
[ResultText] [ varchar ] ( max ) NULL ,
CONSTRAINT [PK_SQLIO_Import] PRIMARY KEY CLUSTERED
(
[RowID] ASC
) )
GO
CREATE TABLE [dbo].[SQLIO_TestPass] (
[TestPassID] [ int ] IDENTITY ( 1,1 ) NOT NULL ,
[ServerName] [ nvarchar ] ( 50 ) NOT NULL ,
[DriveQty] [ int ] NOT NULL ,
[DriveRPM] [ int ] NOT NULL ,
[DriveRaidLevel] [ nvarchar ] ( 10 ) NOT NULL ,
[TestDate] [ datetime ] NOT NULL ,
[SANmodel] [ nvarchar ] ( 50 ) NOT NULL ,
[SANfirmware] [ nvarchar ] ( 50 ) NULL ,
[PartitionOffset] [ int ] NULL ,
[Filesystem] [ nvarchar ] ( 50 ) NULL ,
[FSClusterSizeBytes] [ int ] NULL ,
[SQLIO_Version] [ nvarchar ] ( 20 ) NULL ,
[Threads] [ int ] NULL ,
[ReadOrWrite] [ nchar ] ( 1 ) NULL ,
[DurationSeconds] [ int ] NULL ,
[SectorSizeKB] [ int ] NULL ,
[IOpattern] [ nvarchar ] ( 50 ) NULL ,
[IOsOutstanding] [ int ] NULL ,
[Buffering] [ nvarchar ] ( 50 ) NULL ,
[FileSizeMB] [ int ] NULL ,
[IOs_Sec] [ decimal ] ( 18, 0 ) NULL ,
[MBs_Sec] [ decimal ] ( 18, 0 ) NULL ,
[LatencyMS_Min] [ int ] NULL ,
[LatencyMS_Avg] [ int ] NULL ,
[LatencyMS_Max] [ int ] NULL ,
CONSTRAINT [PK_SQLIO_TestPass] PRIMARY KEY CLUSTERED
(
[TestPassID] ASC
) )
GO
CREATE PROCEDURE [dbo].[U SP_Import _SQLIO_TestPass]
@ServerName NVARCHAR ( 50 ) ,
@DriveQty INT ,
@DriveRPM INT ,
@DriveRaidLevel NVARCHAR ( 10 ) ,
@TestDate DATETIME ,
@SANmodel NVARCHAR ( 50 ) ,
@SANfirmware NVARCHAR ( 50 ) ,
@PartitionOffset INT ,
@Filesystem NVARCHAR ( 50 ) ,
@FSClusterSizeBytes INT
AS
SET nocount off
IF @TestDate IS NULL
SET @TestDate = Getdate ( )
/* Add a blank record to the end so the last test result is captured */
INSERT INTO dbo.SQLIO_Import
( ParameterRowID,
ResultText )
VALUES
( 0,
'' ) ;
/* Update the ParameterRowID field for easier querying */
UPDATE dbo.sqlio_import
SET parameterrowid = ( SELECT TOP 1 rowid
FROM dbo.sqlio_import parm
WHERE parm.resulttext LIKE '%\%'
AND parm.rowid < = upd.rowid
ORDER BY rowid DESC )
FROM dbo.sqlio_import upd
/* Add new SQLIO_TestPass records from SQLIO_Import */
INSERT INTO dbo.sqlio_testpass
( servername,
driveqty,
driverpm,
driveraidlevel,
testdate,
sanmodel,
sanfirmware,
partitionoffset,
filesystem,
fsclustersizebytes,
sqlio_version,
threads,
readorwrite,
durationseconds,
sectorsizekb,
iopattern,
iosoutstanding,
buffering,
filesizemb,
ios_sec,
mbs_sec,
latencyms_min,
latencyms_avg,
latencyms_max )
SELECT @ServerName ,
@DriveQty ,
@DriveRPM
|