A RAID (redundant array of independent disks) combines multiple physical drives into one virtual storage device that offers more storage and, in most cases, fault tolerance so that data can be recovered even if one of the physical disks fails.
RAID configurations are organized into levels such as RAID 0, RAID 1, RAID 5, RAID 6 and RAID 10. RAID levels 0 through 6 are called standard levels. The most common RAID configurations are RAID 0 (striping, where data is split into blocks stored across different physical disks), RAID 1 (mirroring, where multiple copies of data are stored on separate disks for redundancy), RAID 5 (distributed parity, which includes striping plus storing parity information for error recovery), and RAID 6 (dual parity).
This comparison looks at RAID 5 and RAID 10 in detail.
|RAID 10||RAID 5|
|Key feature||Stripe of mirrors: Combines striping and mirroring for fault tolerance and performance.||Striping with parity|
|Striping||Yes; data is striped (or split) evenly across groups of disks. Each group has 2 disks that are set up as mirror images of each other. So RAID 10 combines features of RAID 0 and RAID 1.||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. Mirroring of data makes the RAID 10 system fault-tolerant. If one of the drives fails, data can be quickly rebuilt by simply copying over from other disks.||No mirroring or redundancy; fault tolerance is achieved by calculating and storing parity information. Can tolerate the failure of 1 physical disk.|
|Performance||Reads are fast because of striping. Writes are also fast because even though each block of data needs to be written twice (mirroring), the writes happen on 2 different drives so they can occur in parallel. Parity info doesn't need to be calculated.||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||When performance is important for reads and writes, and when it's important to recover from failure quickly.||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||4||3|
|Parity disk?||No; parity/checksum are not calculated in a RAID 10 setup.||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||Quick recovery of data in the event of a disk failure.||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||Disk utilization is only 50% so RAID 10 is an expensive way to obtain storage redundancy when compared with storing parity information.||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.|
RAID 0, RAID 1 and RAID 10 configuration
RAID 10 is also called RAID 1+0 or RAID 1&0. It is a nested RAID level, which means it combines two standard RAID levels: RAID 0 and RAID 1. Let's look at the configurations of these standard RAID levels, so we can understand how RAID 10 is constructed.
As shown above, RAID 0 uses striping i.e., data is split into blocks that are stored across multiple disks. This greatly increases read and write performance because data and be read and written in parallel on all the disks. The downside of RAID 0 is that there is no redundancy or fault tolerance. If one of the physical drives fails, all data is lost.
RAID 1 solves for redundancy so if one of the drives fails, it is easy to replace it by copying over the data from the drive(s) that is still working. However, the disadvantage of RAID 1 is speed because it cannot take advantage of the parallelism that RAID 0 offers.
Now that we understand how RAID 0 and RAID 1 work, let's look at how RAID 10 is configured.
RAID 10, a.k.a. RAID 1+0 is a combination of RAID 1 and RAID 0. It is configured as a stripe of mirrors. Disks are divided into groups (of usually two); disks within each group are mirror images of each other, while data is striped across all groups. Since you need at least two groups and each group needs at least two disks, the minimum number of physical disks needed for a RAID 10 configuration is 4.
RAID 5 configuration
Now let's take a look at the configuration of RAID 5.
RAID 5 uses parity information, unlike RAID levels 0, 1 and 10. For each combination of blocks — which are all stored on different disks — a parity block is calculated and stored. Each individual parity block resides on only one disk; however, parity blocks are stored in a round-robin fashion on all the disks. i.e., there is no dedicated physical drive just for parity blocks (which is what happens in RAID 4).
Considering that data blocks are striped across at least two disks and the parity block is written on a separate disk, we can see that a RAID 5 configuration requires at least 3 physical drives.
Redundancy and Fault Tolerance
Both RAID 5 and RAID 10 are fault tolerant, i.e., data is not lost even when one — or, in case of RAID 10, more than 1 — of the physical disks fails. What's more, both RAID 5 and RAID 10 can be used when the failed disk is being replaced. This is called hot-swapping.
RAID 5 can tolerate the failure of 1 disk. Data and parity information stored on the failed disk can be recalculated using the data stored on the remaining disks.
In fact, data is accessible and reads are possible from a RAID 5 even when one of the drives has failed and is being rebuilt. However, such reads will be slow because part of the data (the part that was on the failed drive) is being calculated from the parity block rather than simply being read from disk. Data recovery and rebuilding the replacement disk are also slow because of the overhead of calculating parity.
RAID 10 provides excellent fault tolerance — much better than RAID 5 — because of the 100% redundancy built into its designed. In the example above, Disk 1 and Disk 2 can both fail and data would still be recoverable. All disks inside a RAID 1 group of a RAID 10 setup would have to fail for there to be data loss. The probability of 2 disks in the same group failing is much lower than the probability of any two disks in the RAID failing. That is why RAID 10 offers greater reliability compared with RAID 5.
Recovering from failure is also much faster and easier for RAID 10 because data simply needs to be copied over from the other disks in the RAID. Data is accessible during recovery.
RAID 10 offers fantastic performance for random reads and writes because all operations occur in parallel on separate physical drives.
RAID 5 also offers great read performance because of striping. However, writes are slower because of the overhead of calculating parity.
Pros and Cons
Both RAID 5 and RAID 10 are hot-swappable, i.e., they provide the ability to continue reading from the array even when a failed disk is being replaced. However, in the case of RAID 5, such reads are slow because of the overhead of parity calculation. But for RAID 10, such reads are as fast as they are during normal operation.
Other advantages of RAID 10 are:
- Very fast reads and writes
- Very fast recovery from failure
- More fault-tolerant than RAID 5 because RAID 10 can tolerate failures of multiple disks at the same time.
The disadvantages of RAID 10 are:
- Expensive due to inefficient storage (50%, due to mirroring)
The advantages of RAID 5 include:
- Great balance of fault-tolerance, price (storage efficiency) and performance
- Fast reads
The disadvantages of RAID 5 include:
- Slow recovery from failure
- Can only tolerate the failure of 1 drive in the array
Considering the pros and cons, RAID 10 is useful in applications where performance is important not just for reads but also for writes. RAID 10 is also better suited than RAID 5 in applications where it is critical to maintain performance during error recovery when one of the disks fails.
RAID 5 provides a healthy balance of efficient storage, decent performance, failure resistance and good security. It is the most popular RAID configuration for enterprise NAS devices and business servers. RAID 5 is ideal for file and application servers that have a limited number of data drives. If the number of physical disks in the RAID is very large, the probability of at least one of them failing is higher. So a RAID 6 may be a better option because it uses two disks for storing parity.
- Trade-offs Between RAID 5 and RAID 10 storage configurations - Dell
- Standard RAID levels - Wikipedia
- Nested RAID levels - Wikipedia
- Parity in computing - Wikipedia
- Common RAID Disk Data Format (DDF) - Storage Networking Industry Association
- Solving Data Loss in Massive Storage Systems - Storage Networking Industry Association