Why is RAID 10 better than 5?

When setting up storage systems, one of the most important considerations is the RAID level to use. RAID (Redundant Array of Independent Disks) allows combining multiple drives together for increased performance and/or redundancy. Two of the most popular RAID levels are RAID 10 and RAID 5. But which one is better and why?

What is RAID?

RAID is a technology that combines multiple physical disk drives into a single logical unit. Data is distributed across the drives according to the RAID level being used. This distribution provides various benefits, most notably increased performance, capacity, and reliability.

Some key advantages of using RAID include:

  • Increased read/write performance – spreading data across multiple disks allows for simultaneous access.
  • Higher reliability – data redundancy protects against drive failures.
  • Larger capacities – multiple disks can be combined for more storage space.

There are several standard RAID levels, each optimized for different goals:

RAID 0

Data is striped across disks for optimal performance, but there is no redundancy. If any disk fails, all data is lost.

RAID 1

Disk mirroring provides 100% redundancy by duplicating all data onto a second drive, but usable capacity is only 50%.

RAID 5

Data and parity information are distributed across disks. If a single disk fails, data can be rebuilt from parity. But performance suffers due to parity calculation overhead.

RAID 10

RAID 10 combines mirroring and striping for both performance and redundancy. But capacity utilization is only 50%.

What is RAID 5?

RAID 5 is one of the most popular RAID levels because it provides a good balance of performance, capacity, and redundancy. Here’s how it works:

  • Data is striped across multiple disks like in RAID 0.
  • Additional parity information is calculated and written across the array.
  • If any single disk fails, the missing data can be recreated from the parity information.
  • RAID 5 requires a minimum of 3 disks but commonly uses 5+ disks.

The parity calculation does add some overhead that impacts write performance. But RAID 5 can survive a single disk failure without losing data or access to the array. Capacity utilization is also good at 1/n of the total space used for parity (e.g. 20% overhead with 5 disks).

What is RAID 10?

RAID 10 combines two techniques:

  • Disk Striping – data is split across multiple disks like RAID 0.
  • Disk Mirroring – duplicate copies of data are made like RAID 1.

This provides increased performance from the striping along with the fault tolerance of mirroring. However, the capacity utilization is low since data is duplicated. With a typical 4 disk array:

  • Half the total capacity is used for the mirror copies.
  • Only 50% of total capacity is usable.

The specific striping and mirroring layout can vary for different RAID 10 implementations:

RAID 10 (1+0)

Disks are first mirrored in pairs, then striped. Allows for high performance and the ability to survive multiple drive failures if in different mirrors.

RAID 01

Disks are first striped, then mirrored. The stripped sections are mirrored. Allows for even higher performance but can only survive a single disk failure within each mirrored set.

In either layout, RAID 10 provides fault tolerance and improved performance relative to a single disk or RAID 5 array. But at the cost of 50% usable capacity.

RAID 5 vs RAID 10 – Performance

One area where RAID 10 excels is performance. By striping I/O across multiple disks, and having duplicated copies, RAID 10 can provide significantly faster reads and writes.

Read Performance

  • RAID 5 read performance is better than a single disk, but still suffers from the parity calculation overhead.
  • RAID 10 read performance can be double that of a single disk since data can be read in parallel from multiple disks.

Write Performance

  • RAID 5 write performance can be very poor due to the parity calculation on writes.
  • RAID 10 write performance is excellent since data is simply written in parallel with no parity overhead.

This makes RAID 10 well suited for applications that demand high input/output performance like transactional databases, web servers, and other mission critical systems. The performance differences are less noticeable for workloads that are more read heavy.

RAID 5 vs RAID 10 – Reliability

In terms of reliability, both RAID levels provide good protection against disk failures. But RAID 10 has some advantages that make it more robust.

Disk Rebuilds

  • With RAID 5, if a disk fails the array is in a degraded state until the data rebuild completes.
  • During this time, performance suffers and another disk failure would result in data loss.
  • With RAID 10, rebuilds complete faster as data only needs to be copied from the mirror.

Multiple Disk Failures

  • RAID 5 can only withstand a single disk failure. A second disk failure during a rebuild will cause complete array failure.
  • RAID 10 can survive multiple simultaneous disk failures, as long as each failure is from a separate mirrored set.

So while both offer good fault tolerance, RAID 10 provides stronger protection and minimizes the impact of drive failures. This makes it ideal for mission critical systems that demand high availability.

RAID 5 vs RAID 10 – Storage Efficiency

One area where RAID 5 has a clear advantage over RAID 10 is storage efficiency and usable capacity.

With a RAID 5 array, capacity overhead is only the equivalent of 1 disk. So an array with 6 x 2 TB disks would provide 10 TB of usable space after accounting for the 2 TB of parity information.

But with RAID 10, the overhead is much higher since all data is mirrored. An equivalent 6 disk RAID 10 array with 2 TB drives would only provide 6 TB of usable space – a 40% reduction compared to the RAID 5 array.

If storage capacity is a major concern, RAID 5 provides a much more efficient use of disks. But for some applications the improved performance and reliability of RAID 10 are worth the capacity trade-off.

RAID 10 Use Cases

Due to its performance and availability advantages, RAID 10 is well suited for a few key scenarios:

Transactional Database Servers

Databases require very fast I/O response times to ensure quick queries and transaction processing. They also demand high availability. RAID 10 delivers on both counts.

Business Critical Applications

For business critical systems that require high throughput and 24/7 uptime, like ERP, CRM, and e-commerce sites, RAID 10 is a great choice.

Virtual Server Infrastructures

Hypervisors and virtualization clusters need to serve high I/O workloads across many guest VMs. The fast performance of RAID 10 fits well.

Small Critical Data Sets

If a subset of data absolutely cannot be lost, storing it on a mirrored RAID 10 array provides redundancy and protection.

RAID 5 Use Cases

RAID 5 is well suited for scenarios where storage efficiency is important and/or performance demands are more moderate:

File Servers

Storing large volumes of shared files, like home directories and shared departmental data, where RAID 5 provides cost-effective capacity.

Media Editing

For video production and editing where large media files are stored and accessed but extreme performance is not critical.

Backup Storage

RAID 5 provides a good balance of redundancy for backup data at a lower cost than RAID 10.

Archival Data

Large amounts of rarely accessed archival data can be effectively stored on dense, high-capacity RAID 5 arrays.

Conclusion

To summarize, RAID 10 excels at performance and high availability while RAID 5 provides storage efficiency.

RAID 10 is the superior choice for mission critical systems that justify the cost – fast transactional databases, critical business applications, virtual servers, and highly available systems that require both speed and redundancy.

But for more general purpose applications where capacity is a bigger concern and performance demands are less, RAID 5 offers a compelling option.

So consider the specific performance, capacity, and availability needs when choosing between RAID 10 vs RAID 5. And if unsure, always default to RAID 10 for business critical data for the extra assurance.