Download Understanding Storage Systems: Magnetic Disks, RAID, and Performance and more Slides Computer Aided Design (CAD) in PDF only on Docsity!
Storage Systems
Why Worry About Storage Systems
- Response time = CPU time + I/O time
- Suppose 95% of work is done in the CPU, 5% is I/O
- If the CPU is improved by a factor of 100, what is the Speedup?
- Sp = 1 / (1 - 0.95 + (0.95 / 100)) = 16.
- 83.2% of the improvement is squandered due to poor I/O
- Future performance gains must consider faster I/O
- Amdahl’s Law All parts of a system need to be improved somewhat equally
Magnetic Disk Layout
P l a t t e r
T r a c k
P l a t t e r s
S e c t o r s
T r a c k s
COPYRIGHT 1998 MORGAN KAUFMANN PUBLISHERS, INC. ALL RIGHTS RESERVEDDocsity.com
Zone Bit Recording
- Originally, all tracks had the same number of sectors
- Inefficient! Limited by the density of the smallest tracks
- Outer tracks can hold more sectors (store more data) than inner tracks called Zone Bit Recording (ZBR)
- The sequence of information recorded on each sector is
- sector number
- gap
- data including error correction code bits
- gap
Disk Reliability vs Availability
- In processing, our main concern is performance (and cost)
- In I/O, our main concern is reliability (and cost)
- Reliability is anything broken?
- Availability is the system still available to the user, even if it is broken?
- RAID technology is designed to provide increased availability for potentially unreliable devices
- RAID – Redundant Array of Inexpensive Disks
- Patterson / Katz / Gibson -- 1987
RAID
- Provide a set of physical disks that appear to be a single logical drive
- Distribute the data across the drives in the array
- Allow levels of redundancy to permit recovery of failed disks
- 7 (basic) levels of RAID (RAID0 – RAID6)
- RAID is NOT a backup system!
- Its made to maintain uptime through failures
RAID0 Summary
- Called striping the data
- Each stripe is 1 sector
- Advantage:
- access to large sections of contiguous data can be done in parallel over all disks
- Disadvantage:
Physical Drive 6 2
6
10
Physical Drive 5 1
5
9
PhysicalDrive 4 0
4
8
Physical Drive 7 3
7
11
RAID
- Mirrored data
- Make a complete mirror (i.e. duplicate) of all data
PhysicalDrive 0 0
4
8
Physical Drive 1 1
5
9
Physical Drive 2 2
6
10
Physical Drive 3 3
7
11
mirrors
RAID
- Redundancy through Hamming codes
- Store enough extra data in order to detect and correct errors, or in order to provide availability in the case of a failed drive
- Stripes are small 1 bit (!) per stripe originally later bytes/words
- All disk heads are synchronized – does not permit parallel access as in RAID0 and RAID
- Requires log 2 (#disks) extra disks to implement
Hamming Codes
- A technique for enabling error detection & correction (and therefore redundancy as well)
- Ex: ECC Scheme:
- store 1110, but suppose an error changes this to 1100
1
1
1 0
0
0
1
Even parity bit
1
1
0 0
0
0
1
Wrong parity bit!
Error in data
Error detected
RAID2 Summary
- Error correction is done across disks
- Advantage:
- Useful in a high failure environment
- Disadvantage:
- Expensive
- Modern disks do not exhibit high failure rate
- Not used in practice
Physical Drive 4 1xxx xxxx
RAID
- Bit interleaved parity
- Like RAID2 but use only 1 parity drive
Physical Drive 0 1xxx xxxx
Physical Drive 1 1xxx xxxx
Physical Drive 2 1xxx xxxx
Physical Drive 3 0xxx xxxx
Stripes of bytes or words Parity drive
Physical Drive 4 P(0-3)
P(4-7)
P(8-11)
RAID
- Block level parity
- Same parity scheme as RAID3 but uses large blocks per stripe Physical Drive 0 Block
Block
Block
Physical Drive 1 Block
Block
Block
Physical Drive 2 Block
Block
Block
Physical Drive 3 Block
Block
Block
Stripes of large “blocks” Parity drive
RAID4 Summary
- Interleaved blocks across disks
- Advantage:
- Allows independent access due to large stripes can support multiple independent reads
- Error detection / correction supported up to single bit errors
- Disadvantage:
- On parallel writes penalty incurred since all writes require access to the same parity disk to update the parity
- Not used in practice