March 24, 2012

RAID Levels, let's explain...

Nowadays we are hearing a lot about RAID and how to keep our data safe but a lot of people don't know what a RAID level means and its pro/cons so I'll try to explain it in a short and easy way.

RAID initially meant Redundant Array of Inexpensive Disks but nowadays means Redundant Array of Independent Disks.
We can have an hardware-based array if archived through a proprietary expansion card controller (maybe a component integrated into the motherboard) or a software-based array if everything is archived through the main cpu (or cpus). Anyway the RAID levels are the same:



Mirroring and Duplexing

Advantages- One Write or two Reads possible per mirrored pair
- 100% redundancy of data means no rebuild is necessary in case of a disk failure, just a copy to the replacement disk
- 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



Hamming Code ECC

Each bit of data word is written to a data disk drive (4 in this example: 0 to 3). Each data word has its Hamming Code ECC word recorded on the ECC disks. On Read, the ECC code verifies correct data or corrects single disk errors.

Advantages- 'On the fly' data error correction
- Extremely high data transfer rates possible
- The higher the data transfer rate required, the better the ratio of data disks to ECC disks

Disadvantages- Very high ratio of ECC disks to data disks with smaller word sizes - inefficient
- Entry level cost very high - requires very high transfer rate requirement to justify
- No commercial implementations exist


Parallel Transfer with Parity

The data block is subdivided ('striped') and written on the data disks. Stripe parity is generated on Writes, recorded on the parity disk and checked on Reads. RAID Level 3 requires a minimum of 3 drives to implement.

Advantages
- Very high Read data transfer rate
- Very high Write data transfer rate
- Disk failure has an insignificant impact on throughput
- Low ratio of ECC (Parity) disks to data disks means high efficiency

Disadvantages- Transaction rate equal to that of a single disk drive at best (if spindles are synchronized)
- Controller design is fairly complex
- Very difficult and resource intensive to do as a 'software' RAID



Independent Data Disks with Shared Parity Disk

Each entire block is written onto a data disk. Parity for same rank blocks is generated on Writes, recorded on the parity disk and checked on Reads. RAID Level 4 requires a minimum of 3 drives to implement.

Advantages- Very high Read data transaction rate
- Low ratio of ECC (Parity) disks to data disks means high efficiency
- High aggregate Read transfer rate
- Low ratio of ECC (Parity) disks to data disks means high efficiency

Disadvantages- Quite complex controller design
- Worst Write transaction rate and Write aggregate transfer rate
- Difficult and inefficient data rebuild in the event of disk failure
- Block Read transfer rate equal to that of a single disk



Independent Data Disks with Distributed Parity Blocks

Each entire data block is written on a data disk; parity for blocks in the same rank is generated on Writes, recorded in a distributed location and checked on Reads. RAID Level 5 requires a minimum of 3 drives to implement.

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 single disk



Independent Data Disks with Two Independent Distributed Parity Schemes

Each entire data block is written on a data disk; parity for blocks in the same rank is generated on Writes, recorded in a distributed location and checked on Reads.RAID Level 5 requires a minimum of 3 drives to implement.

Advantages- RAID 6 is essentially an extension of RAID level 5 which allows for additional fault tolerance by using a second independent distributed parity scheme (two-dimensional parity)
- Data is striped on a block level across a set of drives, just like in RAID 5, and a second set of parity is calculated and written across all the drives; RAID 6 provides for an extremely high data fault tolerance and can sustain multiple simultaneous drive failures
- Perfect solution for mission critical applications
Disadvantages- Very complex controller design
- Controller overhead to compute parity addresses is extremely high
- Very poor write performance
- Requires N+2 drives to implement because of two-dimensional parity scheme

 

High Data Transfer Performance

RAID Level 0+1 requires a minimum of 4 drives to implement.

Advantages- RAID 0+1 is implemented as a mirrored array whose segments are RAID 0 arrays
- RAID 0+1 has the same fault tolerance as RAID level 5
- RAID 0+1 has the same overhead for fault-tolerance as mirroring alone
- Excellent solution for sites that need high performance but are not concerned with achieving maximum reliability
Disadvantages- RAID 0+1 is NOT to be confused with RAID 10. A single drive failure will cause the whole array to become, in essence, a RAID Level 0 array
- Very expensive / High overhead
- Very limited scalability at a very high inherent cost
- All drives must move in parallel to proper track lowering sustained performance



Very High Reliability Combined with High Performance

RAID Level 10 requires a minimum of 4 drives to implement.

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

Disadvantages- Very expensive / High overhead
- All drives must move in parallel to proper track lowering sustained performance


High Input/Output Rates and Data Transfer Performance

RAID Level 53 requires a minimum of 5 drives to implement.

Advantages- RAID 53 should really be called 'RAID 03' because it is implemented as a striped (RAID level 0) array whose segments are RAID 3 arrays
- RAID 53 has the same fault tolerance as RAID 3 as well as the same fault tolerance overhead
- High data transfer rates are achieved thanks to its RAID 3 array segments
- Maybe a good solution for sites who would have otherwise gone with RAID 3 but need some additional performance boost
Disadvantages- Very expensive to implement
- All disk spindles must be synchronized, which limits the choice of drives
- Byte striping results in poor utilization of formatted capacity