storage for the dba

25
Storage for the DBA Denny Cherry [email protected] twitter.com/mrdenny

Upload: kioshi

Post on 24-Feb-2016

21 views

Category:

Documents


0 download

DESCRIPTION

Storage for the DBA. Denny Cherry [email protected] twitter.com/ mrdenny. About Me. Author or Coauthor of 4 books 6+ SQL Mag articles Dozens of other articles Microsoft MVP since Oct 2008 Microsoft Certified Master Founder of SQL Excursions Sr. DBA for Phreesia. Agenda. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Storage for the DBA

Storage for the DBADenny Cherry

[email protected]/mrdenny

Page 2: Storage for the DBA

2

About MeAuthor or Coauthor of 4 books6+ SQL Mag articlesDozens of other articlesMicrosoft MVP since Oct 2008Microsoft Certified MasterFounder of SQL ExcursionsSr. DBA for Phreesia

Page 3: Storage for the DBA

AgendaStorage TerminologyArray Cache SetupRAID TypesTiered StorageDisk AlignmentSpindle TypesPhysical Array Diagram

Page 4: Storage for the DBA

Storage TerminologyLUN = Logical Unit NumberHost = The Server or Servers a LUN is

presented toSAN = Storage Area NetworkFabric = Fibre network which makes up the

SANArray = Box with the Spindles in it

Page 5: Storage for the DBA

Storage TerminologyDisk = How the OS sees a LUN when

presentedSpindle = Physical disks in the Storage ArrayIOps = Physical Operation To DiskSequential IO = Reads or writes which are

sequential on the spindleRandom IO = Reads or writes which are

located at random positions on the spindle

Page 6: Storage for the DBA

Array Cache SetupOLTP databases make poor use of SAN read

cacheOLAP databases make good use of SAN read

cacheTry reducing read cache and increasing write

cacheOLTP databases with high buffer cache hit ratios

may be able to have the read cache disabledThere is no one correct setup. Every system is

different.

Page 7: Storage for the DBA

When Write Cache Gets Full?Doesn’t flush to disk until low watermark is

hitForce flushes once high watermark is hitForce flushing completely empties write

cacheForce flushing disables write cache until

write cache is disabledIf adjustable, set low very low, and high

watermark very high (20/90)If cache gets to 100% full – Pray!

Page 8: Storage for the DBA

Oh crap the power went out!Most arrays have internal batteriesWrite cache is flushed to diskAfter flush array powers downOn power-up flushed cached is read and

committed to LUNs before LUN is made available

Make sure SQL is down before the array flushes

http://www.flickr.com/photos/robertfrancis/352039299/

Page 9: Storage for the DBA

RAID 0Straight StripeNo redundancyVery fastLow cost

Any disk failure looses data

Can not survive no disks failures

Requires 2 or more disks

Page 10: Storage for the DBA

RAID 1Full Mirror of dataNo performance BenefitHigh CostRequires 2 disksCan survive 1 disk failure

Page 11: Storage for the DBA

RAID 0+1Drives Striped, then MirroredHigh CostHigh PerformanceRequires 2 disksCan survive 1 spindle failureRequires even number of disksMay survive multiple spindle failure

Page 12: Storage for the DBA

RAID 10 (1+0)Drives Mirrored, then StripedHigh CostHigh PerformanceRequires 2 disksCan survive 1 spindle failureRequires even number of disksMay survive multiple spindle failure

Page 13: Storage for the DBA

RAID 5Low CostRequires 3+ disksStripe with Single ParityCan survive a single drive failure

Write PenaltyGood Performance

Page 14: Storage for the DBA

Not all RAID 5 is Created EqualRAID 6 can be done this way as well.

Page 15: Storage for the DBA

RAID 6Stripe with 2 parityHigher cost per gig

than RAID 5Requires 4+ disks

Can survive 2 disk failures

Similar penalty as RAID 5

Page 16: Storage for the DBA

Disk Alignment• Can improve SQL disk performance up

to 100%• (64 1k blocks/64k IO)=100% of IO is

impacted• Must be done before data is put on the

disk• Windows 2000 - Diskpar• Windows 2003 - Diskpart• Windows 2008 - Automatic

Page 17: Storage for the DBA

Disk Alignment

Page 18: Storage for the DBA

Tiered StorageTime is Money

http://www.flickr.com/photos/21560098@N06/3832712784/

Page 19: Storage for the DBA

Tiered StorageTier 0

Enterprise Flash Disks low capacity drivesVery high costVery high speed storageGreat for Databases

http://commons.wikimedia.org/wiki/File:Speedometer_Odometer.jpg

Page 20: Storage for the DBA

Tiered StorageTier 1

15k RPM Fibre Channel low capacity drivesHigh cost, high speed storageGreat for Databases, Exchange, Virtual

Machines

http://commons.wikimedia.org/wiki/File:Speedometer_Odometer.jpg

Page 21: Storage for the DBA

Tiered StorageTier 2

10k RPM Fibre Channel medium capacity drives

Medium cost, medium speed storageGreat for File Servers, Database Archives,

Exchange

http://commons.wikimedia.org/wiki/File:Speedometer_Odometer.jpg

Page 22: Storage for the DBA

Tiered StorageTier 3

7.2/5.4k RPM SATA/SAS high capacity drivesLow cost, low speed storageGreat for Backups, Archives, Exchange

http://commons.wikimedia.org/wiki/File:Speedometer_Odometer.jpg

Page 23: Storage for the DBA

Spindle TypesFibre Channel (FC)

Fastest Bus Speeds between 2-4 GigsSCSI

Older Technology, slower bus speedsSATA

Newer Technology, even slower bus speedsEnterprise Flash Disks (EFDs)

Newest Technology, same bus speeds as FC

Page 24: Storage for the DBA

Array Diagram

Page 25: Storage for the DBA

Denny [email protected]

http://itke.techtarget.com/sql-server