Which RAID is better 5 or 10?

When setting up a RAID (Redundant Array of Independent Disks) system, two of the most common configurations are RAID 5 and RAID 10. Both provide fault tolerance through striping data across multiple disks, but they achieve it in different ways. RAID 5 stripes data and parity information across all disks, while RAID 10 mirrors and stripes data across paired disks. So which one is better for your needs – RAID 5 or RAID 10?

What is RAID 5?

RAID 5 stripes data across all the disks in the array, along with parity information that is distributed across the disks as well. The parity allows for fault tolerance – if one disk fails, the missing data can be recreated from the remaining data and parity information. RAID 5 requires a minimum of three disks.

Here are some key characteristics of RAID 5:

  • Data and parity information are striped across all disks
  • Can survive the failure of one disk without data loss
  • Read performance is very good since data is striped
  • Write performance is slower than RAID 0 since parity needs to be calculated on writes
  • At least 3 disks are required
  • Raw storage capacity is reduced by 1 disk worth (e.g. 3 x 1TB disks = 2TB total capacity)

What is RAID 10?

RAID 10 combines mirroring and striping by creating mirrored pairs of disks and then striping data across the pairs. This provides fault tolerance by allowing one disk in each mirrored pair to fail without data loss. RAID 10 requires a minimum of 4 disks.

Here are some key characteristics of RAID 10:

  • Data is mirrored onto disk pairs
  • Data and mirrors are then striped across disk pairs
  • Can survive the failure of 1 disk per mirrored pair without data loss
  • Excellent read performance since data is striped
  • Write performance is better than RAID 5 since no parity calculation is needed
  • At least 4 disks are required
  • Raw storage capacity is reduced by half (e.g 4 x 1TB disks = 2TB total capacity)

Comparing RAID 5 vs RAID 10

When choosing between RAID 5 and RAID 10, there are several factors to consider:

Storage efficiency

RAID 5 is more efficient with storage since parity only requires the equivalent of 1 disk. RAID 10 requires half the total disks for mirroring.

Winner: RAID 5

Read performance

RAID 5 and RAID 10 both stripe data across multiple disks, so read performance is excellent for both.

Tie

Write performance

RAID 10 outperforms RAID 5 for write performance since RAID 5 has to calculate parity on writes.

Winner: RAID 10

Fault tolerance

Both RAID 5 and RAID 10 can withstand a single disk failure without data loss. RAID 10 can also withstand a second disk failure per mirrored pair.

Winner: RAID 10

Minimum disks

RAID 5 requires a minimum of 3 disks while RAID 10 requires 4.

Winner: RAID 5

Rebuilding arrays

Rebuilding a RAID 10 array is faster than RAID 5 since less data needs to be rebuilt.

Winner: RAID 10

When to choose RAID 5

RAID 5 is a good choice in these situations:

  • You want efficient storage utilization – RAID 5 parity only requires 1 disk
  • You have a budget constraint and need to maximize storage from fewest disks
  • Write performance meets your requirements
  • You only require one disk fault tolerance

Examples where RAID 5 makes sense:

  • File servers that need large amounts of storage capacity
  • Database servers that are read intensive
  • Low budget storage needing max capacity from small number of disks

When to choose RAID 10

RAID 10 is a better choice in these situations:

  • Maximum performance is your primary goal
  • You need faster write performance
  • High availability and fault tolerance are critical
  • Rebuilding arrays quickly is necessary

Examples where RAID 10 makes sense:

  • Transactional databases that require fast I/O
  • Critical business applications needing maximum uptime
  • High performance servers for virtualization or large databases

RAID 5 vs RAID 10: Pros and Cons

RAID Type Pros Cons
RAID 5
  • Efficient disk utilization
  • Good read performance
  • Low cost with smaller number of disks
  • Slow write performance
  • Long rebuild times
  • One disk fault tolerance
RAID 10
  • Excellent performance
  • Fast rebuilds
  • Multiple disk fault tolerance
  • Expensive, lower capacity
  • Needs minimum 4 disks

Conclusion

While both RAID 5 and RAID 10 provide fault tolerance for disk failures, RAID 10 is the better choice when performance is critical. The mirroring in RAID 10 improves write speeds and rebuilding arrays is much faster. RAID 10 can also withstand the loss of multiple disks with only a small capacity reduction.

RAID 5 is more cost effective when you need to maximize storage capacity from a smaller number of disks. The parity disk provides fault tolerance with minimal capacity sacrifice. However, write speeds suffer due to parity calculation and rebuilds take longer.

In summary:

  • Choose RAID 10 for performance sensitive applications that require faster writes and maximum uptime.
  • Choose RAID 5 when storage capacity and cost savings are most important for your workload.
  • Test both RAID levels with your actual data and workload to see which provides the right balance of performance, capacity and fault tolerance.