Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
TechNet goes virtual
LiveMeeting: Stress Testing using SQLIOSIM and SQLIO
Steve Verschaeve
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
Who am I?
[email protected]@sql_lazywriter
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
Agenda
• SQLIOSIM & SQLIO– What is it?– What is it not?– Where can I find it?– What does it look
like?– Demos– To remember
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIOSIMPart I
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIOSIM – What is it?
• Developed by Bob Dorr (Microsoft)• Generates/simulates a SQL Server workload• To test reliability and integrity of disk
systems• Read• Write• Checkpoint• Backup• Sort• Read-ahead• Shrink
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIOSIM - What is it not?
• Is NOT an I/O performance tuning tool
• “Don't consider SQLIOSim for performance benchmarking, instead use SQLIO Disk Subsystem Benchmark Tool” (Microsoft Customer Service and Support (CSS) SQL Support blog)
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIOSIM – Where can I find it?
• < SQL Server 2008: seperate download
• >= SQL Server 2008(R2): BINN folder• SQLIOSIM Download
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIOSIM - Anatomy
• SQLIOSIM.exe (Application)• SQLIOSIM.com (MS-DOS Application)• SQLIOSIM.cfg• SQLIOSIM.cfg.zip• SQLIOSIM.log• ErrorLog
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIOSIM.exe
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIOSIM.COM
All settings and parameters explained in KB231619
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIOSIM – Config
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
• Demo 1: SQLIOSIM.exe• Demo 2: SQLIOSIM.com
SQLIOSIM – What does it look like?
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIOSIM – Parsing the results
SQLIOSim Parser by Jens Suessmeyer & Jimmy May• Export to XML, CSV• Display Report
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIOSIM – Configuration Templates
• Default.cfg.ini: common testing• Hwcache.cfg.ini: hardware cache
behaviour• Nothrottle.cfg.ini: pushing the
system and drivers at high queue levels
• Seqwrites.cfg.ini: BCP and restore• Sparse.cfg.ini: DBCC and snapshots
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIOSIM - What about running on a production server?
• Might expose IO errors• Generates MDFx and LDFx files• When IO checksums occur in the
error log
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIOPart II
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIO – What is it?
• Determine I/O capacity of disk subsystem
• Tested by different I/O types and sizes– Read/Write– Random/Sequential– Threads– Outstanding files– Block size
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIO – What is it not?
• Not a simulation tool for I/O patterns• Not really a SQL Server tool
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIO – Where can I find it?
• SQLIO Disk Subsystem Benchmark Tool:http://www.microsoft.com/en-us/download/details.aspx?id=20163
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIO - Anatomy
• SQLIO.exe• Param.txt– c:\testfile.dat 2 0x0 1000
• Size(testfile.dat) = (2 to 4) x SAN or disk cache
Same Directory
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIO – Parameter Use
• Using a param file:sqlio -kW -s10 -fsequential -t8 -o8 -b8 –BH -LS -Fparam.txt
Read/ Duration Sequential/ Threads Outstanding Block Hardware Latencies Parameter file
Write Random Files Size Buffering from system Location & Name Test File
• sqlio -kR -s10 -frandom –t8 –o8 -b8 -BH -LS -dC Testfile.dat
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIO – Stress Test Configuration Parameters
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIO – Stress Test Configuration Parameters
• Batch filesqlio -kR -t1 -s120 -dC -o1 -fsequential -b8 -BH -LS Testfile.datsqlio -kR -t1 -s120 -dC -o2 -fsequential -b8 -BH -LS Testfile.datsqlio -kR -t1 -s120 -dC -o4 -fsequential -b8 -BH -LS Testfile.datsqlio -kR -t1 -s120 -dC -o8 -fsequential -b8 -BH -LS Testfile.datsqlio -kR -t1 -s120 -dC -o16 -fsequential -b8 -BH -LS Testfile.dat
sqlio -kR -t2 -s120 -dC -o1 -fsequential -b64 -BH -LS Testfile.datsqlio -kR -t2 -s120 -dC -o2 -fsequential -b64 -BH -LS Testfile.datsqlio -kR -t2 -s120 -dC -o4 -fsequential -b64 -BH -LS Testfile.datsqlio -kR -t2 -s120 -dC -o8 -fsequential -b64 -BH -LS Testfile.dat
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIO - Execution
• Example
• Batch file exampleC:\Program Files (x86)\SQLIO\SQLIOStressTest.bat >Results.txt
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
• Demo: SQLIO
SQLIO – What does it look like?
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIO – Batch file Example & Results
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIO – The Results
0.7
1
0
.79
0
.95
1
.09
1
.13
1
.19
1
.20
1
.21
1
.23
4
0.44
4
1.66
4
1.86
4
1.91
4
2.70
4
3.42
4
3.48
4
3.55
4
3.91
4
4.65
4
5.10
4
5.49
4
5.83
4
6.01
4
6.28
4
8.70
Random Sequential Read Write
0
500
1000
1500
2000
2500
Sum of ThreadsSum of Block SizeSum of Outstanding FilesSum of Avg Latency(ms)
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIO – To Remember
• More outstanding files = higher queue depth = higher throughput (until saturated)
• Larger I/O sizes – higher latencies– Increased throughput (depends on hardware config)
• Saturation = Lantency keeps rising while throughput is stable
• Monitor saturation– Average Disk Queue Length (outstanding IOs)– Disk Reads/sec (IOs per sec)– Average Disk sec/read (latency)
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIO – To Remember
• TempDB: High IOPS• Data: 8K or 64K random (read/write),
High IOPS (4-10ms; >100ms = issue)
• Log: High MB/sec (<2ms)• Backup: High MB/sec, sequential
(read/write)
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIO – Tips from the field
• Wait > 1 min between tests• First test = buidling the test file• Duration of test = 5 to 10 min• Keep batch file and results for future
reference
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIOSIM - Important links
• SQLIOSIM Download (Microsoft)• SQL Server 2000 I/O Basics (Microsoft)• SQL Server I/O Basics, Chapter 2 (Microsoft)• How
to use the SQLIOSim utility to simulate SQL Server activity on a disk subsystem (Q231619)
• Understanding SQLIOSIM output (Kevin Kline)
• How It Works: SQLIOSim – Checksums (Microsoft)
• SQLIOSIM Parser (Jens K. Suessmeyer & Jimmy May)
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
SQLIO – Important Links
• Storage Performance Testing with SQLIO (Brent Ozar)
• SAN Performance Tuning with SQLIO (SQL Server Pedia)
• Parsing SQLIO Output to Excel Charts using Regex in PowerShell (Jonathan Kehayias)
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
Questions?
Click to edit Master title style
TechNet goes virtual© Microsoft Corporation. All Rights Reserved.
Thank you
Top Related