Thursday, October 4, 2018

RAID 0, RAID 1, RAID 5, RAID 10 Explained with Diagrams

RAID stands for Redundant Array of Inexpensive (Independent) Disks.
On most situations you will be using one of the following four levels of RAIDs.
  • RAID 0
  • RAID 1
  • RAID 5
  • RAID 10 (also known as RAID 1+0)
So what is parity?
Parity is a means of adding extra data so that if one of the bits of data is deleted, it can be recreated from the parity. For example, suppose a binary halfword consists of the bits 1011. The total number of '1's in the halfword is odd, so we make the parity bit a 1. The halfword then becomes 10111. Suppose the third bit is lost, the halfword is then 10?11. We know from the last bit that there should be an odd number of '1's, the number of recognizable '1's is even, so the missing but must be a '1'. This is a very simplistic explanation, in practice, disk parity is calculated on blocks of data using XOR hardware functions. The advantage of parity is that it is possible to recover data from errors. The disadvantage is that more storage space is required. In enterprise disk subsystems, backup disks called 'dynamic spares' are kept ready so that when a disk is lost, a dynamic spare disk is automatically swapped in and the faulty disk is rebuilt from the remaining data and the parity data.

RAID LEVEL 0
RAID0 is simply data striped over several disks. This gives a performance advantage, as it is possible to read parts of a file in parallel. However not only is there no data protection, but it is also actually less reliable than a single disk, as all the data is lost if a single disk in the array stripe fails.
RAID0 principles
Key points
  • Minimum 2 disks.
  • Excellent performance ( as blocks are striped ).
  • No redundancy ( no mirror, no parity ).
  • Don’t use this for any critical system.
Characteristics and Advantages
  • RAID 0 implements a striped disk array, the data is broken down into blocks and each block is written to a separate disk drive
  • I/O performance is greatly improved by spreading the I/O load across many channels and drives
  • Best performance is achieved when data is striped across multiple controllers with only one drive per controller
  • No parity calculation overhead is involved
  • Very simple design
  • Easy to implement
Disadvantages
  • Not a "True" RAID because it is NOT fault-tolerant
  • The failure of just one drive will result in all data in an array being lost
  • Should never be used in mission-critical environments
Recommended Applications
  • Video Production and Editing
  • Image Editing 
  • Pre-Press Applications
  • Any application requiring high bandwidth

RAID LEVEL 1
RAID1 is data mirroring. Two copies of the data are held on two physical disks, and the data is always identical. RAID1 has a performance advantage, as reads can come from either disk and is simple to implement. However, it is expensive in large disk subsystems, as twice as many disks are needed to store the data
RAID1 principles
Key points
  • Minimum 2 disks.
  • Good performance ( no striping. no parity ).
  • Excellent redundancy ( as blocks are mirrored ).
Characteristics & Advantages
  • One Write or two Reads possible per mirrored pair
  • Twice the Read transaction rate of single disks, same Write transaction rate as single disks
  • 100% redundancy of data means no rebuild is necessary in case of a disk failure, just a copy to the replacement disk 
  • Transfer rate per block is equal to that of a single disk
  • Under certain circumstances, RAID 1 can sustain multiple simultaneous drive failures
  • Simplest RAID storage subsystem design
Disadvantages
  • Highest disk overhead of all RAID types (100%) - inefficient
  • Typically the RAID function is done by system software, loading the CPU/Server and possibly degrading throughput at high activity levels. Hardware implementation is strongly recommended
  • May not support hot swap of a failed disk when implemented in "software"
Recommended Applications
  • Accounting
  • Payroll
  • Financial
  • Any application requiring a very high availability

RAID LEVEL 5
RAID5 data is striped in blocks onto data disks, and parity is generated and rotated around the data disks. Good general performance, and reasonably cheap to implement. RAID5 was used extensively for general data.
RAID5 principles
Key points
  • Minimum 3 disks.
  • Good performance ( as blocks are striped ).
  • Good redundancy ( distributed parity ).
  • Best cost effective option providing both performance and redundancy. Use this for DB that is heavily read oriented. Write operations will be slow.
Characteristics & Advantages
  • Highest Read data transaction rate
  • Medium Write data transaction rate
  • Low ratio of ECC (Parity) disks to data disks means high efficiency
  • Good aggregate transfer rate
Disadvantages
  • Disk failure has a medium impact on throughput
  • Most complex controller design
  • Difficult to rebuild in the event of a disk failure (as compared to RAID level 1)
  • Individual block data transfer rate same as a single disk
Recommended Applications
  • File and Application servers
  • Database servers
  • Web, E-mail, and News servers
  • Intranet servers
  • Most versatile RAID level

RAID LEVEL 10
RAID1+0 is a combination of RAID1 mirroring and data striping. This means it has very good performance, and high reliability, so its ideal for mission-critical database applications. All that redundancy means that it is expensive.
Key Point
  • Minimum 4 disks.
  • This is also called as “stripe of mirrors”
  • Excellent redundancy ( as blocks are mirrored )
  • Excellent performance ( as blocks are striped )
  • If you can afford the dollar, this is the BEST option for any mission-critical applications (especially databases).
Characteristics & Advantages
  • RAID 10 is implemented as a striped array whose segments are RAID 1 arrays
  • RAID 10 has the same fault tolerance as RAID level 1
  • RAID 10 has the same overhead for fault-tolerance as mirroring alone
  • High I/O rates are achieved by striping RAID 1 segments
  • Under certain circumstances, RAID 10 array can sustain multiple simultaneous drive failures
  • Excellent solution for sites that would have otherwise gone with RAID 1 but need some additional performance boost
Disadvantages
  • Very expensive / High overhead
  • All drives must move in parallel to proper track lowering sustained performance
  • Very limited scalability at a very high inherent cost
Recommended Applications
  • Database server requiring high performance and fault tolerance
Share:

0 comments:

Post a Comment