san presentation nov 2012 central pa
DESCRIPTION
Overview of Storage and SAN topics for DBAs. Presented to Central Pennsylvania SQL Server Users group on November 13, 2012.TRANSCRIPT
![Page 1: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/1.jpg)
www.facebook.com/prpass
SAN Basics for DBAs
Joey D’Antoni Central Pennsylvania User GroupNovember 13, 2012
![Page 2: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/2.jpg)
About Me
Principal Architect SQL Server at Comcast Cable Blog: joedantoni.wordpress.com Twitter: @jdanton Email: [email protected]
![Page 3: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/3.jpg)
Storage
Understanding Storage Types SSDs RAID Levels Components of a SAN SAN Benefits SANs and DR Summary
![Page 4: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/4.jpg)
Storage
![Page 5: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/5.jpg)
Different Kind of Storage
![Page 6: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/6.jpg)
Hard Drive Components
![Page 7: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/7.jpg)
Caching
Almost all hard drives (SAN, Direct Attached) have some form of caching (RAM in front of storage)
For SQL Servers—make sure you have a battery backed cache—if you don’t and power fails—you will lose data!
![Page 8: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/8.jpg)
Disk Drives
Hard Drives can only spin at 15,000 RPM. Hard Drive Performance has improved
approximately 50x Have grown in capacity During the performance improvement CPU
speed increase 5521x
![Page 9: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/9.jpg)
Why is storage the bottleneck?
![Page 10: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/10.jpg)
Memory versus Hard Drives
![Page 11: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/11.jpg)
Latency
“Disk latency is around 13ms, but it depends on the quality and rotational speed of the hard drive. RAM latency is around 83 nanoseconds. How big is the difference?
If RAM was an F-18 Hornet with a max speed of 1,190 mph (more than 1.5x the speed of sound), disk access speed is a banana slug with a top speed of 0.007 mph.”
--credit Christian Paredes Blue Box Group
![Page 12: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/12.jpg)
SSDs (Solid State Drives)
![Page 13: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/13.jpg)
SSDs are Fast
Much faster on random reads and writes At least 5x better performance, often much more Up to 350x faster on seeks
Not nearly as much of difference on sequential reads and writes
![Page 14: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/14.jpg)
SSDs are Expensive
List Prices From Fusion-IO160GB SLC ioDrive - $8495
320GB SLC ioDrive - $15495
320GB MLC ioDrive - $7495
640GB MLC ioDrive - $11495
320GB SLC ioDrive Duo – 16,990
640GB SLC ioDrive Duo - $30,990
640GB MLC ioDrive Duo - $14,990
1.28TB MLC ioDrive Duo - $22,990
These are really great for TempDB
![Page 15: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/15.jpg)
SANs and SSDs
More to come later!
![Page 16: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/16.jpg)
RAID
RAID—Redundant Array of Independent Disks
Hard Drives Will Fail, RAID is what gives you protection from that
![Page 17: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/17.jpg)
RAID 0
![Page 18: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/18.jpg)
RAID 0, Don’t Do This
From a major virtualization vendor benchmark
![Page 19: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/19.jpg)
RAID 0
No data protection at all
Best performance If you lose one disk,
you lose it all As you add disks
risk increases
![Page 20: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/20.jpg)
RAID 1--Mirroring
Mirroring No increase in
write performance Read
performance is increased
50% Capacity Loss
![Page 21: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/21.jpg)
RAID 5—Striping (What you SAN Admin Wants)
Maximum Capacity Big Write Penalty—
gets worse as more disks are added
Not good for highly transaction databases
*Caveat
![Page 22: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/22.jpg)
RAID 1+0 (10) Mirrored Striping
Best performance Requires 4 or more
drives Only 50% of actual
capacity is used
![Page 23: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/23.jpg)
Summary of RAID Levels
Ask for RAID 10 for Everything (you won’t get it)
Make sure your TempDB and Logs are on RAID 10
NEVER USE RAID 0!!!
![Page 24: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/24.jpg)
Storage Area Network
![Page 25: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/25.jpg)
What is a SAN?
Basically a specialized computer for storage Computer, Switches and Hard Drives Not a performance device Can be used for redundancy and DR
purposes Will serve many servers—so critical piece of
your infrastructure
![Page 26: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/26.jpg)
SAN Components
HBA (Fibre) Card—Connects your server to SAN via Fiber Optic cable
iSCSI Card—Ethernet Card connecting server to SAN
Switch—Either fibre or ethernet switch connecting server to SAN
SAN head unit—Controls processing, RAID levels
Disk Array—The physical array behind your SAN (a bunch of hard drives)
![Page 27: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/27.jpg)
SAN Terms
LUN—Logical Unit Number, but in practical terms, what your SAN admin will call a disk that he presents to your server
Fibre Channel—Cable connection to SAN IOPs—I/O Operations Per Second—the way
your SAN admin measures performance
![Page 28: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/28.jpg)
iSCSI vs Fibre Channel
iSCSI is cheaper, and in smaller shops your network admin can manage the switches
Over 10G Ethernet iSCSI is faster, unless… 16 GB FC is still uncommond
Fiber is more susceptible to breakage, but currently more common
Note—all SAN components must be the same speed, or network traffic reverts to slowest in chain
![Page 29: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/29.jpg)
Multi-Pathing
How your SAN admin sleeps at night!
Make sure your databases servers are multi-pathed
![Page 30: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/30.jpg)
SAN Throughput
1 GB iSCSI
4 GB FC
8 GB FC
10 GB iSCSI
0 200 400 600 800 1000 1200 1400
Max Mb/S
Max Mb/S
![Page 31: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/31.jpg)
What are the Benefits of a SAN
Expand Capacity easily and on the fly High availability Disaster Recovery
![Page 32: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/32.jpg)
SANs and SQL Server—What to ask for
TempDB absolutely needs its own disk (and you should have multiple TempDB files)
Logs should be on a separate disk from data files
Ideally separate system and user DBs If shared instance, put split high utilization
DBs onto separate disk devices
![Page 33: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/33.jpg)
SANs and DR—Block
WARNING!—Don’t try this unless you have a real budget and a good SAN admin
Most SANs vendors have as an option SAN replication
Allows for multi-site failover Multi-site clustering fully supported in SQL
Server 2012 Expensive—requires fiber connection
between sites and expensive software
![Page 34: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/34.jpg)
SAN Replication
![Page 35: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/35.jpg)
Shared Environment vs Dedicated Environment
![Page 36: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/36.jpg)
SANs are Multi-Tenant
You don’t want to share disks with the Exchange server
File servers are a decent partner for database servers
But….
![Page 37: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/37.jpg)
If you have are on a new SAN
Most of the previous slides, don’t matter This technology on applies to really high end,
enterprise-class storage arrays IBM, EMC, Hitachi
![Page 38: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/38.jpg)
EMC VMax Fast DP
Allows for dynamic moves of disk from faster to slower disks (Fibre channel to SATA), or slower to faster (FC to SSD)
Totally dynamic, and seamless to servers Moves data in 768k extents Your SAN admin doesn’t know where your
data is
![Page 39: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/39.jpg)
FAST VP
SSD SSD SSD
15K Fibre Channel 15k Fibre Channel 15k Fibre Channel
10K SATA 10K SATA 10K SATA
Log
Data
![Page 40: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/40.jpg)
What does this mean for the DBA?
Overall—don’t worry too much about—the technology is solid
Make sure your transaction logs are in a group that can not go to SSD.
A lot of what we did in the past, changes with this technology
![Page 41: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/41.jpg)
Test Your SAN
Good free tools available like SQLIO Never run this on a production server (and
warn your SAN admin)
![Page 42: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/42.jpg)
Summary
RAID 0 is bad Hard Drives will always be the bottleneck Be nice to your SAN admin—ask for RAID 10 Split your SQL files across many disks SSDs are fast, but pricey
![Page 43: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/43.jpg)
Questions?
![Page 44: San presentation nov 2012 central pa](https://reader038.vdocuments.net/reader038/viewer/2022102814/54c6a5804a7959e4208b45a4/html5/thumbnails/44.jpg)
Platinum Sponsors:
Gold Sponsors: Silver Sponsors:
Bronze Sponsors: Swag Sponsors: