SQL Server On SANs
Upcoming SlideShare
Loading in...5
×
 

SQL Server On SANs

on

  • 3,337 views

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

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

Statistics

Views

Total Views
3,337
Views on SlideShare
3,322
Embed Views
15

Actions

Likes
0
Downloads
80
Comments
0

3 Embeds 15

http://www.slideshare.net 8
http://www.linkedin.com 5
https://www.linkedin.com 2

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

SQL Server On SANs SQL Server On SANs Presentation Transcript

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