Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Magnetic Disks 1956: IBM (RAMAC) first disk drive 5 Mb – 0.002 Mb/in2 35000$/year 9 Kb/sec 1980: SEAGATE first 5.25’’ disk drive 5 Mb – 1.96 Mb/in2 625.

Similar presentations

Presentation on theme: "1 Magnetic Disks 1956: IBM (RAMAC) first disk drive 5 Mb – 0.002 Mb/in2 35000$/year 9 Kb/sec 1980: SEAGATE first 5.25’’ disk drive 5 Mb – 1.96 Mb/in2 625."— Presentation transcript:

1 1 Magnetic Disks 1956: IBM (RAMAC) first disk drive 5 Mb – 0.002 Mb/in2 35000$/year 9 Kb/sec 1980: SEAGATE first 5.25’’ disk drive 5 Mb – 1.96 Mb/in2 625 Kb/sec 1999: IBM MICRODRIVE first 1’’ disk drive 340Mb 6.1 MB/sec Controller read/write head disk arm tracks platter spindle actuator disk interface

2 2 Hardware Bandwidth 422 133 System Bandwidth Yesterday in megabytes per second (not to scale!) 40 Hard Disk | SCSI | PCI | Memory | Processor 15 per disk The familiar bandwidth pyramid: The farther from the CPU, the less the bandwidth. Slide courtesy of J. Gray/L.Chung

3 3 Hardware Bandwidth 1,600 System Bandwidth Today in megabytes per second (not to scale!) 133 160 26 Hard Disk | SCSI | PCI | Memory | Processor The familiar pyramid is gone! PCI is now the bottleneck! In practice, 3 disks can reach saturation using sequential IO Slide courtesy of J. Gray/L.Chung

4 4 RAID Storage System Redundant Array of Inexpensive Disks Combine multiple small, inexpensive disk drives into a group to yield performance exceeding that of one large, more expensive drive Appear to the computer as a single virtual drive Support fault-tolerance by redundantly storing information in various ways

5 5 RAID Types Five types of array architectures, RAID 1 ~ 5 Different disk fault-tolerance Different trade-offs in features and performance A non-redundant array of disk drives is often referred to as RAID 0 Only RAID 0, 1, 3 and 5 are commonly used RAID 2 and 4 do not offer any significant advantages over these other types Certain combination is possible (10, 35 etc) RAID 10 = RAID 1 + RAID 0

6 6 RAID 0 - Striping No redundancy No fault tolerance High I/O performance Parallel I/O

7 7 RAID 1 – Mirroring Provide good fault tolerance Works ok if one disk in a pair is down One write = a physical write on each disk One read = either read both or read the less busy one Could double the read rate

8 8 RAID 3 - Parallel Array with Parity Fast read/write All disk arms are synchronized Speed is limited by the slowest disk

9 9 Parity Check - Classical An extra bit added to a byte to detect errors in storage or transmission Even (odd) parity means that the parity bit is set so that there are an even (odd) number of one bits in the word, including the parity bit A single parity bit can only detect single bit errors since if an even number of bits are wrong then the parity bit will not change It is not possible to tell which bit is wrong

10 10 RAID 5 – Parity Checking For error detection, rather than full redundancy Each stripe unit has an extra parity stripe Parity stripes are distributed

11 11 RAID 5 Read/Write Read: parallel stripes read from multiple disks Good performance Write: 2 reads + 2 writes Read old data stripe; read parity stripe (2 reads) XOR old data stripe with new data stripe. XOR result into parity stripe. Write new data stripe and new parity stripe (2 writes).

12 12 RAID 10 – Striped Mirroring RAID 10 = Striping + mirroring A striped array of RAID 1 arrays High performance of RAID 0, and high tolerance of RAID 1 (at the cots of doubling disks).. More information about RAID disks at

13 13 Hardware vs. Software RAID Software RAID Software RAID: run on the server’s CPU Directly dependent on server CPU performance and load Occupies host system memory and CPU operation, degrading server performance Hardware RAID Hardware RAID: run on the RAID controller’s CPU Does not occupy any host system memory. Is not operating system dependent Host CPU can execute applications while the array adapter's processor simultaneously executes array functions: true hardware multi-tasking

14 14 RAID Levels - Data Settings: accounts( number, branchnum, balance); create clustered index c on accounts(number); 100000 rows Cold Buffer Dual Xeon (550MHz,512Kb), 1Gb RAM, Internal RAID controller from Adaptec (80Mb), 4x18Gb drives (10000RPM), Windows 2000.

15 15 RAID Levels - Transactions No Concurrent Transactions: Read Intensive: select avg(balance) from accounts; Write Intensive, e.g. typical insert: insert into accounts values (690466,6840,2272.76); Writes are uniformly distributed.

16 16 RAID Levels SQL Server7 on Windows 2000 (SoftRAID means striping/parity at host) Read-Intensive: Using multiple disks (RAID0, RAID 10, RAID5) increases throughput significantly. Write-Intensive: Without cache, RAID 5 suffers. With cache, it is ok.

17 17 Comparing RAID Levels RAID 0RAID 1RAID 5RAID 10 ReadHigh2XHigh WriteHigh1XMediumHigh Fault tolerance NoYes Disk utilization HighLowHighLow Key problems Data lost when any disk fails Use double the disk space Lower throughput with disk failure Very expensive, not scalable Key advantages High I/O performance Very high I/O performance A good overall balance High reliability with good performance

18 18 Controller Pre-fetching No, Write-back Yes Read-ahead: Prefetching at the disk controller level. No information on access pattern. Better to let database management system do it. Write-back vs. write through: Write back: transfer terminated as soon as data is written to cache. Batteries to guarantee write back in case of power failure Write through: transfer terminated as soon as data is written to disk.

19 19 Which RAID Level to Use? Data and Index Files RAID 5 is best suited for read intensive apps or if the RAID controller cache is effective enough. RAID 10 is best suited for write intensive apps. Log File RAID 1 is appropriate Fault tolerance with high write throughput. Writes are synchronous and sequential. No benefits in striping. Temporary Files RAID 0 is appropriate. No fault tolerance. High throughput.

20 20 What RAID Provides Fault tolerance It does not prevent disk drive failures It enables real-time data recovery High I/O performance Mass data capacity Configuration flexibility Lower protected storage costs Easy maintenance

21 21 Enhancing Hardware Config. Add memory Cheapest option to get better performance Can be used to enlarge DB buffer pool Better hit ratio If used for enlarge OS buffer (as disk cache), it benefits but to other apps as well Add disks Add processors

22 22 Add Disks Larger disk ≠better performance Bottleneck is disk bandwidth Add disks for A dedicated disk for the log Switch RAID5 to RAID10 for update-intensive apps Move secondary indexes to another disk for write- intensive apps Partition read-intensive tables across many disks Consider intelligent disk systems Automatic replication and load balancing

Download ppt "1 Magnetic Disks 1956: IBM (RAMAC) first disk drive 5 Mb – 0.002 Mb/in2 35000$/year 9 Kb/sec 1980: SEAGATE first 5.25’’ disk drive 5 Mb – 1.96 Mb/in2 625."

Similar presentations

Ads by Google