34
k 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

Stress testing using SQLIOSIM and SQLIO

Embed Size (px)

DESCRIPTION

Presented by Steve Verschaeve.

Citation preview

Page 1: Stress testing using SQLIOSIM and SQLIO

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

Page 2: Stress testing using SQLIOSIM and SQLIO

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

Who am I?

[email protected]@sql_lazywriter

Page 3: Stress testing using SQLIOSIM and SQLIO

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

Page 4: Stress testing using SQLIOSIM and SQLIO

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

SQLIOSIMPart I

Page 5: Stress testing using SQLIOSIM and SQLIO

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

Page 6: Stress testing using SQLIOSIM and SQLIO

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)

Page 7: Stress testing using SQLIOSIM and SQLIO

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

Page 8: Stress testing using SQLIOSIM and SQLIO

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

Page 9: Stress testing using SQLIOSIM and SQLIO

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

SQLIOSIM.exe

Page 10: Stress testing using SQLIOSIM and SQLIO

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

SQLIOSIM.COM

All settings and parameters explained in KB231619

Page 11: Stress testing using SQLIOSIM and SQLIO

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

SQLIOSIM – Config

Page 12: Stress testing using SQLIOSIM and SQLIO

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?

Page 13: Stress testing using SQLIOSIM and SQLIO

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

Page 14: Stress testing using SQLIOSIM and SQLIO

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

Page 15: Stress testing using SQLIOSIM and SQLIO

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

Page 16: Stress testing using SQLIOSIM and SQLIO

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

SQLIOPart II

Page 17: Stress testing using SQLIOSIM and SQLIO

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

Page 18: Stress testing using SQLIOSIM and SQLIO

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

Page 19: Stress testing using SQLIOSIM and SQLIO

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

Page 20: Stress testing using SQLIOSIM and SQLIO

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

Page 21: Stress testing using SQLIOSIM and SQLIO

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

Page 22: Stress testing using SQLIOSIM and SQLIO

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

SQLIO – Stress Test Configuration Parameters

Page 23: Stress testing using SQLIOSIM and SQLIO

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

Page 24: Stress testing using SQLIOSIM and SQLIO

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

Page 25: Stress testing using SQLIOSIM and SQLIO

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

• Demo: SQLIO

SQLIO – What does it look like?

Page 26: Stress testing using SQLIOSIM and SQLIO

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

SQLIO – Batch file Example & Results

Page 27: Stress testing using SQLIOSIM and SQLIO

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)

Page 28: Stress testing using SQLIOSIM and SQLIO

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)

Page 29: Stress testing using SQLIOSIM and SQLIO

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)

Page 30: Stress testing using SQLIOSIM and SQLIO

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

Page 33: Stress testing using SQLIOSIM and SQLIO

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

Questions?

[email protected]

Page 34: Stress testing using SQLIOSIM and SQLIO

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

Thank you