RAID (Redundant Array of Independent Disks) is a data storage technology that combines multiple disk drive components into a logical unit. Data is distributed across the drives in one of several ways called RAID levels, depending on the required level of redundancy and performance. The most commonly used RAID levels are RAID 5 and RAID 10.
What is RAID 5?
RAID 5 stripes data and parity information across a set of drives. It provides fault tolerance by using parity data distributed across each member disk. The parity data can help reconstruct data in case of a single disk failure. In a RAID 5 array with 4 drives, the total capacity is equal to the capacity of 3 drives. The equivalent of 1 drive worth of space is used for parity information. For example, with 4 1TB drives, the total capacity would be 3TB. RAID 5 requires a minimum of 3 disks.
Advantages of RAID 5
- Good read performance – data is striped across multiple disks for performance
- Low cost – only requires a minimum of 3 disks and still provides fault tolerance
- High storage efficiency – capacity is n-1 disks, where n is the number of disks in the array
Disadvantages of RAID 5
- Low write performance – parity information needs to be updated each time data is written
- Not suitable for large drives – rebuilding large failed drives takes a long time which increases risk of data loss
- Performance degradation during rebuild – array is vulnerable during rebuild process
What is RAID 10?
RAID 10 combines mirroring and striping to create a redundant array that also provides high performance. It creates a striped set from a series of mirrored drives. Data is duplicated on a secondary set of drives. Minimum requirement is 4 disks to create a RAID 10 array. For example, on a 4 disk RAID 10, total capacity is equal to the capacity of 2 disks. Half the total capacity is used to duplicate data.
Advantages of RAID 10
- High read and write performance – data is striped and each mirror has a copy of the data
- Can survive multiple drive failures – as long as 1 disk in the mirror set and 1 disk in the stripe set survive
- Fast rebuild times – only the failed mirror needs to be rebuilt
Disadvantages of RAID 10
- Low storage efficiency – capacity is equal to half of total disks. 4 x 2TB drives = 4TB capacity
- Higher hardware cost – minimum 4 disks required
Comparing RAID 5 vs RAID 10
Specification | RAID 5 | RAID 10 |
---|---|---|
Minimum disks | 3 | 4 |
Fault tolerance | 1 disk failure | Up to 1 disk failure per mirror |
Read performance | Good | Excellent |
Write performance | Poor | Excellent |
Storage efficiency | High (n-1) | Low (n/2) |
Rebuild time | Slow | Fast |
Performance
RAID 10 provides significantly better read and write performance compared to RAID 5. The mirroring in RAID 10 allows reads and writes to occur in parallel. RAID 5 write performance suffers due to the parity calculation requirement.
Fault Tolerance
Both RAID 5 and RAID 10 can withstand a single disk failure. However, RAID 10 can survive multiple disk failures as long as 1 disk in each mirrored set survives. With RAID 5, if a second disk fails during a rebuild, data will be lost. The larger the disks, the higher the risk.
Storage Efficiency
RAID 5 offers higher usable capacity compared to RAID 10 when using the same number of disks. With 4 x 2TB disks in RAID 5, usable capacity is 6TB. In RAID 10, it is only 4TB. RAID 10 sacrifices capacity for performance and redundancy.
Rebuild Times
RAID 10 has faster rebuild times as only the failed mirror has to be rebuilt. With RAID 5, the parity has to be recalculated across the entire array, which takes much longer the larger the disks.
Cost
RAID 10 has a higher hardware cost since it requires a minimum of 4 disks versus just 3 for RAID 5. However, the performance and redundancy benefits may justify the premium cost for mission critical storage.
When to use RAID 5 or RAID 10?
RAID 5 use cases
- File and print servers
- General purpose servers
- Business applications
- Media servers
- Moderate performance but high capacity required
RAID 10 use cases
- Database servers
- High performance computing
- High transaction systems
- Virtualization and VDI environments
- Business critical applications
Conclusion
RAID 10 is the better performing and more redundant RAID level but comes at a higher cost. RAID 5 offers good performance for more read centric workloads while providing efficient use of disk capacity. For highly important data where performance matters most, RAID 10 is typically the preferred choice despite the capacity and cost drawbacks. RAID 5 offers a good balance for more general use cases that need capacity along with good reads and redundancy.