Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
SQL Server onStorage Area Networks<br />
Brent Ozar<br />SQL Server MVPfor Quest Software<br />Managed SQL, VM,  80tb SAN for $7b co<br />Published author<br />Mad...
BrentOzar.com/go/insidetheblackbox<br />
The Agenda<br />Inside the SAN<br />DBA Pros & Cons<br />Starting From The Beginning<br />How to Use SQLIO<br />Multipathi...
In The Beginning…<br />
Next: External Storage<br />
Storage Area Networks<br />Independent<br />Expandable<br />Well-Protected<br />Blazing Fast<br />Complex<br />Expensive<b...
Photo Licensed with Creative Commons from http://www.flickr.com/photos/tophost/2247031208/<br />
Photo Licensed with Creative Commons from http://www.flickr.com/photos/tophost/2246209421/<br />
Photo Source http://www.flickr.com/photos/tophost/2246209421/<br />
SAN Components<br />Drive enclosures<br />Controllers (& Cache)<br />Switch networks<br />Host Bus Adapters<br />HBA Drive...
Drive Allocation Methods<br />
Good Things<br />Clustering<br />Table partitioning<br />Faster builds<br />Easier growth<br />Caching speed<br />PhotoSou...
Not-So-Good Things<br />Black box<br />Cachingmay not help<br />Compatibility lists<br />More drivers<br />Tough to grow<b...
“How many gigs do you need?”<br />
“We’ll keep an eye on it for ya.”<br />Perfmon changes<br />Neighbors change<br />SAN changes<br />SAN monitoring software...
What’s Your Bottleneck?<br />Not Enough Drives<br />Drives Too Slow<br />Shared Drives<br />RAID Level<br />SAN Controller...
Things to Monitor<br />Hard drives<br />Controllers (CPU, caching)<br />Controller connectivity to the network<br />Networ...
The X Factor: Redundancy<br />Hard drives – hundreds<br />Controllers – 2+<br />Controller connectivity to network – 4+<br...
SAN Monitoring<br />Strict HCLs, SCLs<br />Cross-platformmeans JAVA<br />No “full” picture<br />Very, very, veryexpensive<...
Unpredictable, Unexplainable<br />
Start From The Beginning<br />Get block sizes right<br />Align partitions<br />Design for pathing<br />Test with SQLIO<br ...
Simple SAN Pathing<br />
Simple SAN Pathing<br />
Simple SAN Pathing<br />
Simple SAN Pathing<br />
SIMPLE?!?1#%&@!?<br />
Photo Licensed with Creative Commons from http://www.flickr.com/photos/creatista/204265480/<br />
Goals of Multipathing<br />Protection<br />Performance<br />
Active/Active Can Mean<br />
Active/Active Gotchas<br />One path per LUN/volume<br />Sending vs receiving<br />Post-failover stickiness<br />Network de...
Network Bottleneck Example<br />
Pathing Really Matters Now<br />
Photo Licensed with Creative Commons from http://www.flickr.com/photos/thatguyfromcchs08/2300190277/<br />
Photo Licensed with Creative Commons from http://www.flickr.com/photos/atomdocs/3127663764/<br />Why Can’t We Go Faster?<b...
How to Run SQLIO<br />sqlio -kW -t2 -s120 -dM -o1 -frandom -b64 -BH -LS Testfile.dat<br />
Write This Down. It’s Important.<br />sqlio -kW -t2 -s120 -dM -o1 -frandom -b64 -BH -LS Testfile.dat<br />sqlio -kW -t2 -s...
We Did the Hard Work<br />
The Output<br />E:Program Files (x86)SQLIO&gt;sqlio -kW -t2 -s120 -dM -o1 -frandom -b64 -BH -LS Testfile.dat<br />sqlio v1...
Common Bottlenecks<br />1 gig = ~125 MB/sec<br />2 gig = ~250 MB/sec<br />4 gig = ~500 MB/sec<br />10 gig = ~1250 MB/sec<b...
Working Around It<br />Data/logs/tempdbon different volumes<br />Separategroups of DBs<br />Separate DBinto filegroups<br ...
Wrapping It Up<br />Test before deployment<br />Learn multipathing<br />Design DB files around SAN limits<br />Monitor for...
Advanced Topics<br />Table partitioning<br />Filegroups & files<br />Snapshot backups<br />Storage virtualization<br />Sto...
BrentOzar.com/go/insidetheblackbox<br />
Upcoming SlideShare
Loading in …5
×

SQL Server On SANs

2,316 views

Published on

How to configure and test SQL Server on storage area networks (SANs) with tools like multipathing and SQLIO.

Published in: Technology, Sports
  • Be the first to comment

  • Be the first to like this

SQL Server On SANs

  1. 1. SQL Server onStorage Area Networks<br />
  2. 2. Brent Ozar<br />SQL Server MVPfor Quest Software<br />Managed SQL, VM, 80tb SAN for $7b co<br />Published author<br />Made lots of expensive mistakes<br />www.BrentOzar.com<br />@BrentO on Twitter<br />
  3. 3. BrentOzar.com/go/insidetheblackbox<br />
  4. 4. The Agenda<br />Inside the SAN<br />DBA Pros & Cons<br />Starting From The Beginning<br />How to Use SQLIO<br />Multipathing<br />
  5. 5. In The Beginning…<br />
  6. 6. Next: External Storage<br />
  7. 7. Storage Area Networks<br />Independent<br />Expandable<br />Well-Protected<br />Blazing Fast<br />Complex<br />Expensive<br />
  8. 8.
  9. 9. Photo Licensed with Creative Commons from http://www.flickr.com/photos/tophost/2247031208/<br />
  10. 10. Photo Licensed with Creative Commons from http://www.flickr.com/photos/tophost/2246209421/<br />
  11. 11. Photo Source http://www.flickr.com/photos/tophost/2246209421/<br />
  12. 12. SAN Components<br />Drive enclosures<br />Controllers (& Cache)<br />Switch networks<br />Host Bus Adapters<br />HBA Drivers<br />Servers<br />
  13. 13. Drive Allocation Methods<br />
  14. 14.
  15. 15. Good Things<br />Clustering<br />Table partitioning<br />Faster builds<br />Easier growth<br />Caching speed<br />PhotoSource http://www.flickr.com/photos/pcka/3240903696/<br />
  16. 16. Not-So-Good Things<br />Black box<br />Cachingmay not help<br />Compatibility lists<br />More drivers<br />Tough to grow<br />SAN adminsmay not help<br />Photo Source http://www.flickr.com/photos/stewf/95709873/<br />
  17. 17. “How many gigs do you need?”<br />
  18. 18. “We’ll keep an eye on it for ya.”<br />Perfmon changes<br />Neighbors change<br />SAN changes<br />SAN monitoring software is tough<br />Photo Source http://www.flickr.com/photos/mrjoro/39470992/<br />
  19. 19. What’s Your Bottleneck?<br />Not Enough Drives<br />Drives Too Slow<br />Shared Drives<br />RAID Level<br />SAN Controllers<br />Partition Alignment<br />Drivers<br />Multipathing<br />
  20. 20. Things to Monitor<br />Hard drives<br />Controllers (CPU, caching)<br />Controller connectivity to the network<br />Network switch throughput<br />Server connectivity to the SAN (the HBA) <br />Server drivers<br />
  21. 21. The X Factor: Redundancy<br />Hard drives – hundreds<br />Controllers – 2+<br />Controller connectivity to network – 4+<br />Network – separate networks, switches<br />Server connectivity to SAN – 2+<br />Network fabrics – iSCSI, Fiber, WAN <br />
  22. 22. SAN Monitoring<br />Strict HCLs, SCLs<br />Cross-platformmeans JAVA<br />No “full” picture<br />Very, very, veryexpensive<br />Photo Source: http://flickr.com/photos/earthandeden/865393933/<br />
  23. 23. Unpredictable, Unexplainable<br />
  24. 24. Start From The Beginning<br />Get block sizes right<br />Align partitions<br />Design for pathing<br />Test with SQLIO<br />Install SQL Server<br />Monitor sec/read, write<br />Save history<br />
  25. 25. Simple SAN Pathing<br />
  26. 26. Simple SAN Pathing<br />
  27. 27. Simple SAN Pathing<br />
  28. 28. Simple SAN Pathing<br />
  29. 29. SIMPLE?!?1#%&@!?<br />
  30. 30. Photo Licensed with Creative Commons from http://www.flickr.com/photos/creatista/204265480/<br />
  31. 31. Goals of Multipathing<br />Protection<br />Performance<br />
  32. 32. Active/Active Can Mean<br />
  33. 33. Active/Active Gotchas<br />One path per LUN/volume<br />Sending vs receiving<br />Post-failover stickiness<br />Network design<br />
  34. 34. Network Bottleneck Example<br />
  35. 35. Pathing Really Matters Now<br />
  36. 36. Photo Licensed with Creative Commons from http://www.flickr.com/photos/thatguyfromcchs08/2300190277/<br />
  37. 37. Photo Licensed with Creative Commons from http://www.flickr.com/photos/atomdocs/3127663764/<br />Why Can’t We Go Faster?<br />
  38. 38. How to Run SQLIO<br />sqlio -kW -t2 -s120 -dM -o1 -frandom -b64 -BH -LS Testfile.dat<br />
  39. 39. Write This Down. It’s Important.<br />sqlio -kW -t2 -s120 -dM -o1 -frandom -b64 -BH -LS Testfile.dat<br />sqlio -kW -t2 -s120 -dM -o2 -frandom -b64 -BH -LS Testfile.dat<br />sqlio -kW -t2 -s120 -dM -o4 -frandom -b64 -BH -LS Testfile.dat<br />sqlio -kW -t2 -s120 -dM -o8 -frandom -b64 -BH -LS Testfile.dat<br />sqlio -kW -t2 -s120 -dM -o16 -frandom -b64 -BH -LS Testfile.dat<br />sqlio -kW -t2 -s120 -dM -o32 -frandom -b64 -BH -LS Testfile.dat<br />sqlio -kW -t2 -s120 -dM -o64 -frandom -b64 -BH -LS Testfile.dat<br />sqlio -kW -t2 -s120 -dM -o128 -frandom -b64 -BH -LS Testfile.dat<br />sqlio -kW -t4 -s120 -dM -o1 -frandom -b64 -BH -LS Testfile.dat<br />sqlio -kW -t4 -s120 -dM -o2 -frandom -b64 -BH -LS Testfile.dat<br />sqlio -kW -t4 -s120 -dM -o4 -frandom -b64 -BH -LS Testfile.dat<br />sqlio -kW -t4 -s120 -dM -o8 -frandom -b64 -BH -LS Testfile.dat<br />
  40. 40. We Did the Hard Work<br />
  41. 41. The Output<br />E:Program Files (x86)SQLIO&gt;sqlio -kW -t2 -s120 -dM -o1 -frandom -b64 -BH -LS Testfile.dat<br />sqlio v1.5.SG<br />using system counter for latency timings, -1361967296 counts per second<br />2 threads writing for 120 secs to file M:Testfile.dat<br /> using 64KB random IOs<br /> enabling multiple I/Os per thread with 1 outstanding<br /> buffering set to use hardware disk cache (but not file cache)<br />using current size: 24576 MB for file: M:Testfile.dat<br />initialization done<br />CUMULATIVE DATA:<br />throughput metrics:<br />IOs/sec: 1539.50<br />MBs/sec: 96.21<br />latency metrics:<br />Min_Latency(ms): 0<br />Avg_Latency(ms): 0<br />Max_Latency(ms): 572<br />histogram:<br />ms: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24+<br />%: 66 32 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0<br />
  42. 42. Common Bottlenecks<br />1 gig = ~125 MB/sec<br />2 gig = ~250 MB/sec<br />4 gig = ~500 MB/sec<br />10 gig = ~1250 MB/sec<br />
  43. 43. Working Around It<br />Data/logs/tempdbon different volumes<br />Separategroups of DBs<br />Separate DBinto filegroups<br />TempDB, backups<br />Photo Source http://www.flickr.com/photos/doodlemonger/2667917978/<br />
  44. 44. Wrapping It Up<br />Test before deployment<br />Learn multipathing<br />Design DB files around SAN limits<br />Monitor forever<br />Get vendor help<br />Photo Source http://www.flickr.com/photos/doodlemonger/2667917978/<br />
  45. 45. Advanced Topics<br />Table partitioning<br />Filegroups & files<br />Snapshot backups<br />Storage virtualization<br />Storage VMotion<br />SAN administration<br />Photo Source http://www.flickr.com/photos/thomasthomas/504369245/<br />
  46. 46. BrentOzar.com/go/insidetheblackbox<br />

×