RAID 1 is a simple mirror configuration where two (or more) physical disks store the same data, thereby providing redundancy and fault tolerance. RAID 5 also offers fault tolerance but distributes data by striping it across multiple disks.

Let's look at the configurations of RAID 1 and RAID 5 in detail.

Comparison chart

RAID 1 versus RAID 5 comparison chart
Edit this comparison chartRAID 1RAID 5
Key feature Mirroring Striping with parity
Striping No; data is fully stored on each disk. Yes; data is striped (or split) evenly across all disks in the RAID 5 setup. In addition to data, parity information is also stored (once) so that data can be recovered if one of the drives fails.
Mirroring, redundancy and fault tolerance Yes No mirroring or redundancy; fault tolerance is achieved by calculating and storing parity information. Can tolerate the failure of 1 physical disk.
Performance RAID 1 offers slower write speeds but could offer the same read performance as RAID 0 if the RAID controller uses multiplexing to read data from disks. Fast reads because of striping (data distributed across many physical disks). Writes are a little slower because parity information needs to be calculated. But since parity is distributed, 1 disk doesn't become a bottleneck (like it does in RAID 4).
Applications Where data loss is unacceptable e.g. Data archival Good balance of efficient storage, decent performance, failure resistance and good security. RAID 5 is ideal for file and application servers that have a limited number of data drives.
Minimum number of physical disks required 2 3
Parity disk? Not used Parity information is distributed among all physical disks in the RAID. If one of the disks fails, parity info is used to recover data that was stored on that drive.
Advantages Great performance, even if writes are a little slower compared with RAID 0. Fault tolerance with easy recovery (simply copy the contents of one drive to another) Fast reads; inexpensive redundancy and fault tolerance; data can be accessed (albeit at a slower rate) even while a failed drive is in the process of being rebuilt.
Disadvantages Storage capacity is effectively cut in half because two copies of all data are stored. Recovering from a failure requires powering down the RAID so data is not accessible during the recovery. Recovery from failure is slow because of parity calculations involved in restoring data and rebuilding the replacement drive. It is possible to read from the RAID while this is going on but read operations during that time will be quite slow.

Configuration

RAID 1 configuration

A RAID 1 configuration is pretty simple — store all data identically on multiple physical disks. There are usually only 2 disks in RAID 1 but more can be added for extra redundancy.

Data storage in a RAID 1 setup
magnify
Data storage in a RAID 1 setup

RAID 5 configuration

RAID 5 provides fault tolerance through redundancy. However, rather than storing a mirror image of all the data (like in RAID 0), RAID 5 optimizes storage efficiency by using parity and checksum, computing techniques widely used for error detection and correction. Parity blocks allow data to be reconstructed if one of the data blocks is missing.

RAID 5 configuration uses striping with distributed parity to provide fault tolerance. In this picture, blocks are grouped by color so you can see which parity block is associated with which data blocks.
magnify
RAID 5 configuration uses striping with distributed parity to provide fault tolerance. In this picture, blocks are grouped by color so you can see which parity block is associated with which data blocks.

In a RAID 4 configuration, a dedicated disk is used to store parity information. However, RAID 5 uses distributed parity so that the parity blocks are stored on every physical disk in a round-robin fashion. You need at least two disks for striping and another one for storing parity bits; so RAID 5 needs a minimum of 3 physical disks.

This is what a RAID 5 looks like in real life:

A RAID 5 array where two of the drives seemed to have crashed simultaneously but the owner was able to recover his data.
magnify
A RAID 5 array where two of the drives seemed to have crashed simultaneously but the owner was able to recover his data.

Reads and Writes

Read and Write Operations on RAID 1

Read operations are faster on RAID 1 compared with using only one physical disk. This is because data can be read in parallel. Read requests are sent to each physical drive, and the drive with the fastest performance can return data to the controller first. Software optimizations for the controller can facilitate almost-parallel reads so that the total throughput of the RAID reaches close to the sum of the throughputs of all the physical drives in the RAID.

Write operations are slower on a RAID 1 because a write operation is not complete until data is written to all of the disks; so the slowest disk in the array becomes a bottleneck, just like a chain is only as strong as its weakest link.

Reads and Writes on RAID 5

Since RAID 5 uses striping, read operations occur in parallel and are very fast. Writes are also fast, but there is a slight drag on write performance because of the overhead involved in calculating and writing parity blocks.

Fault Tolerance

RAID 1 provides excellent fault tolerance. As long as one of the physical drives in the array is functional, the RAID is operational. RAID 1 is hot-swappable; i.e., it is possible to replace a failed disk while keeping the system operational. Recovery from failure is quick because building up a replacement drive is simply a matter of copying over all the data from one of the functional drives.

RAID 5 uses striping to provide the performance benefits of RAID 1 but also offers fault tolerance. If one of the physical disks in a RAID 5 fails, the system will keep functioning for reads. The failed drive can be "hot-swapped", i.e., the failed disk can be swapped out for a new one without powering off the device. Reads and writes will be slow during error recovery because of the overhead of calculating parity.

References


Share this comparison:

If you read this far, you should follow us:

"RAID 1 vs RAID 5." Diffen.com. Diffen LLC, n.d. Web. 21 Sep 2016. < >