300 likes | 350 Views
Explore the world of RAID (Redundant Arrays of Inexpensive Disks) technology, ranging from mirroring to striping with parity, for enhanced data reliability and performance. Learn how to evaluate and compare different RAID levels for optimal storage solutions.
E N D
Chapter 38Redundant Arrays of Inexpensive Disks(RAIDs) Byungjun Kim(bjkim@archi.snu.ac.kr) School of Computer Science and Engineering Seoul National University
Outline • Introduction • About RAIDs • Variant levels of RAIDs • RAID level 0 : Striping • RAID level 1 : Mirroring • RAID level 4 : Saving space with parity • RAID level 5 : Rotating parity • RAIDs comparison • Other interest RAIDs issues • Summary
Introduction RAID Redundant Arrays of Inexpensive(independent) Disks Source : http://en.hdyo.org/you/questions (Retrieved on 2015/06/01) Source : http://gizmodo.com/tag/raid (Retrieved on 2015/06/01) Source : https://www.backuprun.com/blog/raid-is-not-backup (Retrieved on 2015/06/01) • When we use a disk, • We sometimes wish it to be faster • We sometimes wish it to be larger • We sometimes wish it to be morereliable
RAIDs From Wikipedia RAID is a data storage virtualization technology that combines multiple disk drive components into single logical unit for the purposes of data redundancy or performance improvement Aggregation • Performance • Parallelism • Capacity • Multiple disk drive components • Reliability • Mirroring • Striping with parity
RAIDs Source : http://www.sisense.com/technology/ (Retrieved on 2015/06/01) • A RAID provides advantages transparently • A RAID can replace a disk without changing a software • A RAID looks like a big, fast, reliable disk
How To Evaluate A RAID Source : http://www.seagate.com/kr/ko/manuals/network-storage/business-storage-nas-os/raid-modes/ (Retrieved on 2015/06/01) • Evaluating each RAID design along three axes • Capacity • A set of N disks • Without redundancy : N • Reliability • Some form of redundancy • Performance
Evaluating RAID Performance • Two types of performance metrics • Single-request latency • How much parallelism can exist during a single logical I/O operation • Steady-state throughput • Total bandwidth of many concurrent requests • Two types of workloads • Sequential (S) • Spending little time seeking and waiting for rotation • Spending most of its time transferring data • Random (R) • The opposite of a sequential type
RAID Level 0 : Striping RAID 0 Stripe Block 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 DISK 0 DISK 1 DISK 2 DISK 3 • RAID 0 spreads blocks of the array across the disks • Only one block is placed on each disk before moving on to the next • The stripe consists of four blocks of data RAID 0 : Striping
RAID Level 0 : Striping RAID 0 Chunk size : 2 blocks 0 2 4 6 1 3 5 7 8 10 12 14 9 11 13 15 DISK 0 DISK 1 DISK 2 DISK 3 • Two blocks on each disk before moving on to the next disk • The chunk size of the RAID array is two blocks • The stripe consists of eight blocks of data • RAID 0 : Striping • A different chunk size ver.
RAID Level 0 : Striping • Capacity • N disks • Reliability • Any disk failure will lead to data loss • Performance
RAID Level 1 : Mirroring RAID 1 0 0 1 1 2 2 3 3 DISK 0 DISK 1 • The RAID updates both copies of the data RAID 1 : Mirroring
RAID Level 1 : Mirroring RAID 10 RAID 01 RAID 0 RAID 1 RAID 1 RAID 1 RAID 1 RAID 0 RAID 0 2 2 0 0 1 1 2 2 0 1 0 1 5 5 3 3 4 4 5 5 3 4 3 4 8 8 6 6 7 7 8 8 6 7 6 7 11 11 9 9 10 10 11 11 9 10 9 10 DISK 4 DISK 5 DISK 0 DISK 1 DISK 2 DISK 3 DISK 2 DISK 5 DISK 0 DISK 1 DISK 3 DISK 4 Different ways to place block copies across the disks
RAID Level 1 : Mirroring • Capacity • N / 2 disks • Reliability • It can tolerate the failure of any one disk • It can tolerate up to N / 2 failures depending on which disks fail • Performance
RAID Level 1 : Mirroring RAID 1 Request : Read block 0 ~7 RAID 0 0 0 1 1 0 1 2 3 2 2 3 3 0 1 0 1 2 3 4 5 6 7 4 4 5 5 2 3 4 5 6 7 8 9 10 11 4 5 6 6 7 7 12 13 14 15 6 7 DISK 0 DISK 1 DISK 2 DISK 3 DISK 0 DISK 1 DISK 2 DISK 3 Performance
RAID Level 1 : Mirroring RAID 1 6 0 0 0 0 1 1 2 2 3 3 Disk 0 4 4 4 5 5 6 6 7 7 4 2 DISK 0 DISK 1 DISK 2 DISK 3 Performance
RAID Level 4 : Saving Space With Parity P = D0 ⊕ D1 ⊕ D2 ⊕ D3 RAID 4 0 1 2 3 P0 4 5 6 7 P1 8 9 10 11 P2 12 13 14 15 P3 DISK 0 DISK 1 DISK 2 DISK 3 DISK 4 • Write requests update the data block and the parity block RAID 4 : Saving space with parity
RAID Level 4 : Saving Space With Parity Large RAIDs require a high number of reads to compute parity RAID 4 0 1 2 3 P0 4 5 6 7 P1 8 9 10 11 P2 12 13 14 15 P3 DISK 0 DISK 1 DISK 2 DISK 3 DISK 4 • Random write • Additive parity • Read in all of the other data blocks in the stripe in parallel (block 0, 2 and 3) • XOR those with new block 1 • Write the new data and parity to disks in parallel
RAID Level 4 : Saving Space With Parity New 1 0 Old 1 2 3 P0 1. Read 2. Read 3. Write 4. Write 0 New 1 2 3 P0 Source : 컴퓨터 구조 강의 슬라이드 (Retrieved on 2015/06/01) • Random write • Subtractive parity
RAID Level 4 : Saving Space With Parity The read and write to data could happen in parallel The parity disk prevents any parallelism RAID 4 0 1 2 3 P0 4 5 6 7 P1 The parity disk two I/Os (one read, one write) per logical I/O 8 9 10 11 P2 12 13 14 15 P3 DISK 0 DISK 1 DISK 2 DISK 3 DISK 4 Small-write problem
RAID Level 4 : Saving Space With Parity • Capacity • (N -1) disks • Reliability • It can tolerate 1 disk and no more • Performance
RAID Level 5 : Rotating Parity RAID 5 0 1 2 3 P0 5 6 7 P1 4 10 11 P2 8 9 15 P3 12 13 14 P4 16 17 18 19 DISK 0 DISK 1 DISK 2 DISK 3 DISK 4 • Eliminates the parity disk bottleneck in RAID 4 • Parallel service of write requests is possible RAID 5 : Rotating parity
RAID Level 5 : Rotating Parity • Capacity • (N -1) disks • Reliability • It can tolerate 1 disk and no more • Performance
RAID Level 5 : Rotating Parity RAID 5 can utilize all of the disks RAID 4 VS RAID 5
RAID Level 5 : Rotating Parity RAID 5 RAID 5 still generates 4 total I/O operations 0 1 2 3 P0 5 6 7 P1 4 10 11 P2 8 9 15 P3 12 13 14 P4 16 17 18 19 All writes can proceed in parallel DISK 0 DISK 1 DISK 2 DISK 3 DISK 4 RAID 4 VS RAID 5
RAID Comparison : A Summary • RAID capacity, reliability and performance
Other Interesting RAID Issues Source : http://www.seagate.com/kr/ko/manuals/network-storage/business-storage-nas-os/raid-modes/ (Retrieved on 2015/06/01) RAID level 6 : Tolerating multiple disk faults Hot spare
Summary • About RAIDs • Variant RAIDs levels • RAID level 0 : Striping • RAID level 1 : Mirroring • RAID level 4 : Saving space with parity • RAID level 5 : Rotating parity • RAID comparison
Appendix. Chunk Size Source : http://www.dailymail.co.uk/femail/article-2098861/Dont-use-Photoshop-make-models-slimmer (Retrieved on 2015/06/01) Source : http://www.apaxsoftware.com/database-management/ (Retrieved on 2015/06/01) • The one of the keys to increase RAID performance • To get good performance, the user must have a reasonable chunk size • A small chunk size VS A big chunk size • The parallelism : A small chunk size wins! • The positioning time : A big chunk size wins! • What is reasonable chunk size? • It depends on average I/O request size
Appendix. RAID Mapping Problem How does the RAID know which physical disk and offset to access? Disk = A % Num_of_disks Offset = A / Num_of_disks RAID 0 A request for block 14 0 1 2 3 Disk = 14 % 4 = 2 Offset = 14 / 4 = 3 4 5 6 7 8 9 10 11 12 13 14 15 14 DISK 0 DISK 1 DISK 2 DISK 3 • Given a logical block to read or write • Example