Is RAID 10 faster than RAID 5?

RAID (Redundant Array of Independent Disks) is a data storage technology that combines multiple physical disk drives into one logical unit. RAID provides increased capacity, performance, and/or reliability compared to a single disk drive.

RAID 10 is a combination of disk striping and disk mirroring. Data is striped across multiple disks for performance, and each disk is mirrored for redundancy. RAID 10 requires a minimum of 4 drives. This article provides a good brief definition of RAID 10.

RAID 5 stripes data across multiple disks like RAID 10, but instead of mirroring, uses distributed parity to provide redundancy. RAID 5 requires a minimum of 3 drives. Both RAID 10 and RAID 5 provide protection against drive failures, but they achieve it in different ways.

Read Performance

When it comes to read speed, RAID 10 and RAID 5 are fairly comparable when using the same number of disks and assuming the RAID controller balances reads across all disks. This is because both RAID levels distribute data across multiple disks, allowing reads to occur in parallel for enhanced performance.

In a RAID 10 array, data is striped (split) across multiple disks, with a duplicate set of stripes on a second set of disks for fault tolerance. This stripe set allows reads to be distributed across multiple spindles. In RAID 5, data and parity information are striped across all disks, again distributing reads across multiple disks for better speed.

One analysis found that RAID 10 read speed matched RAID 5, providing approximately 400MB/sec sequential read speed on an 8 disk array. Generally the read speed advantage of RAID 10 vs RAID 5 depends on the controller and drive types, but both offer parallel reads for fast data access.[1]

In summary, RAID 10 and RAID 5 both provide fast read speeds by striping/distributing data across multiple disks. With appropriate controllers and balanced loads, the real-world read speeds of RAID 10 and RAID 5 are often quite similar.

[1] https://www.experts-exchange.com/questions/23481778/Hardware-requirement.html

Write Performance

When it comes to write performance, RAID 10 is significantly faster than RAID 5. This is because with RAID 10, write operations can be parallelized across multiple drives. According to Arcserve, RAID 10 offers write performance equal to the number of drives, while RAID 5 is limited to the write speed of a single drive divided by the number of drives.

For example, with 8 drives each capable of 100 IOPS write speed, RAID 10 would offer 800 IOPS (8 * 100 IOPS). But RAID 5 would be limited to 100/8 = 12.5 IOPS. So RAID 10 is over 4x faster for writes than RAID 5 with 8 drives. This significant write speed advantage makes RAID 10 better suited for workloads with lots of writes like databases or virtualization.

The write penalty gets worse for RAID 5 as more drives are added. But RAID 10 maintains its parallel write capabilities regardless of the array size. As one Reddit user pointed out, “RAID 10 is faster for both read (slightly) and write (4x faster).”

Rebuild Times

Rebuild times after a disk failure are significantly faster for RAID 10 versus RAID 5. In RAID 5, all data has to be read from the surviving disks and parity must be recalculated to rebuild the lost data. This puts considerable stress on the remaining disks. With large drives, rebuild times for RAID 5 can often exceed 1-2 days. Some estimates put rebuild times for 10TB drives in RAID 5 at up to 12 days (Synology Community).

In contrast, RAID 10 only has to copy data from an existing mirror drive, which is much faster. Rebuild times are typically 4-8 hours, even with large 10TB+ drives. This minimizes risk, as the array is vulnerable during rebuilds. The significantly faster rebuild times of RAID 10 make it more resilient after failures (ServerFault).

Failure Tolerance

RAID 10 can withstand multiple drive failures as long as no more than 1 drive fails per mirrored pair. For example, in a standard 4-disk RAID 10 array with 2 mirrored pairs, the array can survive a single drive failure in each mirrored pair, allowing up to 2 drives to fail overall without data loss. This provides excellent fault tolerance and redundancy. According to Diffen, “RAID 10 provides excellent fault tolerance — much better than RAID 5 — because of the 100% redundancy built into its designed.”

RAID 5 can only withstand a single drive failure at a time. If a second drive fails before the first failed drive is rebuilt/replaced, data loss will occur. As Promax states, “RAID 5: This RAID can survive a single drive failure.” So while RAID 10 can survive multiple concurrent drive failures, RAID 5 has very limited fault tolerance.

Cost

When it comes to hardware costs, RAID 10 generally requires more drives than RAID 5 to achieve the same amount of usable storage space. This is because RAID 10 uses mirroring, which duplicates your data across multiple drives. RAID 5 only requires enough drives to satisfy the total storage space needed, plus 1 additional drive for parity. The cost formula for RAID 5 is:

RAID 5 cost = C * ((Total storage space needed / Size of each drive) + 1)

The cost formula for RAID 10 is:

RAID 10 cost = C * ((Total storage space needed / Size of each drive) * 2)

In the formulas, C is the cost per drive. As you can see, RAID 10 requires buying twice as many drives as the minimum needed to satisfy the total storage requirement. So in most cases, RAID 10 will have a higher upfront hardware cost compared to RAID 5 for the same usable capacity.

Capacity

When it comes to total storage capacity, RAID 5 is generally more efficient than RAID 10. The total capacity of a RAID 5 array is the sum of all the drives minus one drive. So for example, four 1TB drives in RAID 5 would provide 3TB of total storage (4 – 1 = 3TB). This is because RAID 5 reserves the equivalent of one drive’s worth of capacity for parity information.
On the other hand, RAID 10 provides only 50% of the total capacity of the drives. For example, four 1TB drives configured as RAID 10 would provide only 2TB of usable capacity. This is because RAID 10 creates mirrored pairs and then stripes across the pairs. Each mirror cuts the capacity in half. So RAID 10 sacrifices a significant amount of potential storage capacity for the performance gains of striping and mirroring.
In summary, RAID 5 provides more total capacity, while RAID 10 provides less capacity but faster performance. When storage capacity is the primary concern, RAID 5 is likely the better choice. When performance is critical and capacity is less important, RAID 10 can make more sense (ExamTopics.com, 2022).

Controller Cache

The controller cache has a significant impact on RAID performance. RAID controllers that have a battery-backed cache can greatly improve both read and write speeds for RAID arrays.

For RAID 5 and RAID 10 configurations, having a controller cache enables read-ahead and write-back caching. This allows the controller to satisfy read requests directly from its fast cache rather than having to fetch data from the physical disks. Writes can also be quickly acknowledged by the controller before the data is lazily written to the disks later. Overall, this provides much faster apparent performance.

According to Dell, RAID 5 performance can be in the 100-150MB/s range for a controller with cache depending on the number of drives: https://www.dell.com/support/kbdoc/en-us/000139333/perc-performance-concerns-for-raid-controllers-without-cache-h330-h310-s130-s110-s300-s100-h200-sas-6-ir-sas-5-ir

In contrast, a RAID controller without any cache would have much slower performance since all reads and writes have to go directly to the physical disks. The controller cache is like having an additional layer of ultra-fast SSD storage in front of the mechanical hard drives.

When to Choose RAID 10

RAID 10 is the preferred RAID level for performance-critical applications that demand faster read and write speeds. Here are some use cases where RAID 10 is a better choice than RAID 5:

  • Database servers – Databases require very fast I/O performance to serve data efficiently. The parallelization of RAID 10 provides faster reads and writes perfect for database workloads.

  • Virtualization environments – Hypervisors need to rapidly read and write virtual machine data across multiple disks. RAID 10 delivers excellent performance for these demanding workloads.

  • High-traffic web servers – For web servers that serve many concurrent requests, RAID 10 offers faster response times with its striping and mirroring capabilities.

  • Video editing – When editing high-resolution video, RAID 10 enables smoother playback and faster rendering times.

  • Online transaction processing (OLTP) – OLTP systems require very fast read and write I/O for processing high volumes of transactions. RAID 10 is great for supporting these I/O-intensive workloads.

In summary, for mission-critical applications where blazing fast performance is the top priority, RAID 10 is the better choice over RAID 5.

When to Choose RAID 5

RAID 5 offers a good balance of features for certain use cases. Here are some scenarios where RAID 5 can be preferable over RAID 10:

Budget constraints – RAID 5 requires far fewer disks than RAID 10, so it is significantly cheaper to implement for a given storage capacity. If budget is a major concern, RAID 5 provides adequate redundancy at a lower cost.

Large capacity needs – For very large arrays (10+ disks), RAID 10 can become prohibitively expensive. RAID 5 is more cost effective for large storage volumes, while still providing redundancy.

Media/back-office file serving – For network storage arrays mainly used for static media files or backups, RAID 5 provides sufficient redundancy and performance at low cost.

Non-critical applications – For staging environments, test servers, self-contained applications, and other non-critical uses, RAID 5 offers a good balance of cost, capacity, and redundancy.

Low disk count arrays – With only 2-6 disks, RAID 10 provides limited read performance gains compared to RAID 5. The capacity and cost of RAID 5 is preferable for low disk count setups.

Sequential read workloads – If data is mainly accessed sequentially, RAID 5 can provide read performance approaching RAID 10 levels. For these workloads, the redundancy of RAID 5 is advantageous.