RAID Redundant Arrays of Independent Disks Courtesy of Satya, Fall 99
Motivation for Disk Arrays Typical memory bandwidths 150 MB/sec Typical disk bandwidths 10 MB/sec Result: I/O-bound applications limited by disk bandwidth (not just by disk latency!) Two common disk bandwidth-limited scenarios Scientific applications: one huge I/O-hungry app Servers: many concurrent requests with modest I/O demands
S 2,0 S 1,0 Solution: Exploit Parallelism Stripe the data across an array of disks many alternative striping strategies possible Example: consider a big file striped across N disks stripe width is S bytes hence each stripe unit is S/N bytes sequential read of S bytes at a time s 0,0 s 0,1 s 0,2 s 0,N-1 s 1,0 s 1,1 s 1,2 s 1,N-1 s 2,0 s 2,1 s 2,2 s 2,N-1 SSS S 0,0 S 2,1 S 1,1 S 0,1 S 2,2 S 1,2 S 0,2 S 2,N-1 S 1,N-1 S 0,N-1 Disk 0Disk 1Disk 2Disk N-1
Performance Benefit Sequential read or write of large file application (or I/O buffer cache) reads in multiples of S bytes controller performs parallel access of N disks aggregate bandwidth is N times individual disk bandwidth (assumes that disk is the bottleneck) Disk 0Disk 1Disk 2 Disk N-1 Array Controller x MB/s Nx MB/s S k,N-1 S k,2 S k,1 S k,0 SkSk
N concurrent small read or write requests randomly distributed across N drives (we hope!) common in database and Web server environments Disk 0Disk 1Disk 2 Disk N-1 Array Controller x MB/s Nx MB/s N independent requests req 0 req 1 req 2 req N-1
Reliability of Disk Arrays As number of disks grows, chances of at least one failing increases Reliability of N disks = (reliability of 1 disk) / N suppose each disk has MTTF of 50,000 hours (roughly 6 years before any given disk fails) then some disk in a 70-disk array will fail in (50,000 / 70) hours (roughly once a month!) Large arrays without redundancy too unreliable to be useful Redundant Arrays of Independent Disks (RAID)
RAID Approaches Many alternative approaches to achieving this redundancy RAID levels 1 through 5 hot sparing allows reconstruction concurrently with accesses Key metrics to evaluate alternatives wasted space due to redundancy likelihood of hot spots during heavy loads degradation of performance during repair
RAID Level 1 Also known as mirroring To read a block: read from either data disk or backup To write a block: write both data and backup disks failure model determines whether writes can occur in parallel Backups can be located far way: safeguard against site failure D1D1 D2D2 B2B2 B1B1 D3D3 B3B3
RAID Levels 2 & 3 These are bit-interleaved schemes In Raid Level 2, P contains memory-style ECC In Rail Level 3, P contains simple parity Rarely used today D1D1 D2D2 D3D3 P
RAID Level 4 Block-interleaved parity Wasted storage is small: one parity block for N data blocks Key problem: parity disk becomes a hot spot write access to parity disk on every write to any block D 0,0 D 1,0 D 2,0 D 3,0 D 0,1 D 1,1 D 2,1 D 3,1 D 0,2 D 1,2 D 2,2 D 3,2 P0P0 P1P1 P2P2 P3P3 D 0,0 D 0,1 D 0,2 = P 0
RAID Level 5 Rotated parity Wastage is small: same as in Raid 4 Parity update traffic is distributed across disks D 0,0 D 1,0 D 2,0 P3P3 D 0,1 D 1,1 P2P2 D 3,1 D 0,2 P1P1 D 2,2 D 3,2 P0P0 D 1,3 D 2,3 D 3,3 D 0,0 D 0,1 D 0,2 = P 0
RAID 5 Actions D D D P Fault-free Read D D D P Fault-free Write D D D P Degraded Read D D D P Degraded Write