RAID 5 Vs RAID 10
Due to the threat of Unrecoverable Read Errors (UREs) when rebuilding a failed disk, RAID 5 is rarely used these days. After all, one URE could cause the entire array to fail.
RAID 6 or RAID 10 are generally recommended as safer alternatives. But these RAID levels have certain disadvantages compared to RAID 5. And with how large RAID arrays have gotten these days, they can sometimes be inadequate as well.
So, is RAID 5 ever worth using these days? Or should you always go for higher levels like RAID 10 despite their cons? We’ll try to answer such queries in this article.
What is RAID 5?
RAID 5 is a standard RAID level that stripes block-sized chunks of data across the array. It uses one disk worth of space to store parity data which is distributed across the array. As such, RAID 5 provides a good mix of everything (performance, fault tolerance, storage capacity).
- Excellent usable storage
- Good for read-intensive workloads
- Comparatively poor write performance
- Can only sustain one disk failure
- Long rebuild time
What is RAID 10?
RAID 10, or technically RAID 1+0, is a nested RAID level. It combines RAID 1 (mirroring only) as the first layer and RAID 0 (striping only) as the second layer. As such, it’s also called a stripe of mirrors.
Like RAID 5, RAID 10 also stripes data chunks at the block level. But it uses mirroring instead of parity calculation for fault tolerance. And unlike RAID 5 which is a jack-of-all-trades, RAID 10 prioritizes performance and redundancy over storage efficiency.
- Excellent write performance
- Can potentially handle multiple disk failures
- Only 50% usable storage
- Larger RAID 10 arrays are costly
RAID 5 Vs RAID 10 – Main Differences
RAID 5 and RAID 10 differ in significant ways, with the main one being how they provide fault tolerance, and to what degree.
RAID 5 calculates parity information by performing XOR operations on each byte of data. It distributes this parity data across the array such that it occupies one disk worth of space overall.
If a disk in the array fails and needs to be replaced, this parity data, along with the currently functional disks, can be used to reconstruct the lost data. Thanks to this, RAID 5 arrays can sustain one disk failure.
RAID 10 uses mirroring instead of parity calculation to provide fault tolerance. Since the lower layers are mirrored pairs of disks (RAID 1), each RAID 1 array can sustain up to 1 disk failure. Overall, this means that RAID 10’s fault tolerance level varies a lot.
Let’s say you have a 12-disk RAID 10 array. Your array might handle up to 6 concurrent disk failures, or it might fail because both disks in the same RAID 1 array failed. In the best-case scenario, RAID 10’s fault tolerance can be unmatched. In the worst case, it’ll be the same as RAID 5.
Even if only one disk fails, RAID 10 tends to fare better when rebuilding, particularly with larger arrays. This is because RAID 5 needs to read data off all disks in the array, while RAID 10 only deals with one mirrored pair.
Read and write speeds generally depend on what your workload mostly looks like. RAID 10 handles random I/O better because it has two identical datasets to work with, which helps reduce seek time.
With sequential I/O though, RAID 5 provides comparable performance. For read-intensive workloads, we’ve even seen cases where RAID 5 performed better. But write performance is a different story.
RAID 5 calculates and writes one chunk of parity for each stripe of data. This overhead leads to lowered write performance. RAID 10 technically needs to write data twice due to mirroring, but because the writes are carried out in parallel on two different drives, there’s no overhead.
As such, RAID 10 wins in terms of write performance, even when dealing with sequential I/O.
RAID 5 requires at least two disks for striping and one disk worth of space to store parity data. This means any RAID 5 array requires 3 disks at the minimum. Beyond that, you can add as many disks as you’d like.
RAID 10 stripes mirrored pairs, meaning you’ll need an even number of total disks. Additionally, a standard RAID 10 array requires at least 4 disks (two for mirroring, and two more to stripe the mirrored array). Some non-standard implementations like Linux MD do support RAID 10 with as few as 2 disks though.
A RAID 5 array reserves only one disk worth of space for parity data. This isn’t great for redundancy, but by the same token, it’s excellent in terms of storage efficiency. This statement rings even truer with larger RAID 5 arrays.
RAID 10 is the opposite. As it uses mirrored pairs, only 50% of the total storage is usable as the rest is needed for redundancy. With large arrays, this leads to a significant amount of unusable space. But by the same token, you also get potentially unmatched fault tolerance.
How Are RAID 5 and RAID 10 Similar?
We’ve already covered the main differences between RAID 5 and RAID 10, but there are also some similarities applicable to both of them. For starters, you can implement both of these using hardware or software means.
When setting up either of these RAID levels, you should use same-size disks to maximize usable storage. Using mixed sizes disks leads to a bottleneck, as demonstrated below.
Additionally, regular disk scrubbing will significantly improve the reliability of your RAID setup, regardless of which specific level you opt for.
Should You Use RAID 5?
RAID 5 is very storage-efficient, and in-turn, cost-efficient. This makes it a good option for small-scale or personal usage. RAID 5 handles sequential workloads well as long as it isn’t excessively I/O intensive. This makes it suitable for things like media servers, file servers, and backups.
It can also be a cost-effective solution when you need to set up a large array. But as RAID 5’s reliability decreases with an increase in scale, you’ll need to weigh the pros and cons to make your decision.
When is RAID 10 Better?
For write-heavy and I/O-intensive workloads, RAID 10 is the better option. It’s very commonly used for SQL servers. In addition to database servers, it’s also suitable for things like email servers, web servers, etc.
If safety and performance are the priority, RAID 10 is an excellent option. But as only half the storage space is usable, setting up large RAID 10 arrays can be an expensive ordeal. As with RAID 5, you’ll need to make your decision based on your main needs and budget.
Final Verdict – RAID 5 Vs RAID 10
When comparing RAID 5 and RAID 10, one isn’t universally better or worse than the other. It’s more about what you plan to use your RAID setup for. Generally speaking, RAID 5 is a well-rounded and accessible option for most people. RAID 10 is better when data availability and performance are the main priorities.
Regardless of which you go for though, remember that RAID’s purpose is uptime. RAID != backup.
Good practices can minimize the chance of data loss when using RAID, but even with any of the ‘safer’ RAID implementations, data loss is always a possibility. A separate external, and ideally offsite, backup is the best protection against this.
To recap, here are the main differences between RAID 5 Vs RAID 10:
|RAID 5||RAID 10|
|Fault Tolerance||Can sustain one disk failure.||Can sustain failure of one to half the disks in the array.|
|Performance||Decent read performance with sequential I/O.||Excellent write performance and comparable read performance.|
|Number of Disks||Need 3 disks at minimum.||Need 4 disks at minimum.|
|Usable Storage||Parity data occupies space equivalent to one disk.||Only 50% storage is usable overall.|