Erasure coding (EC) is one of the best-known methods for data protection, due in part to its efficiency, as more of the disk is available for data compared with RAID and mirroring strategies.
What is erasure coding, and how does it compare to RAID and mirroring data protection schemes? What are the advantages and disadvantages of erasure coding compared to other methods for data protection, like RAID striping and mirroring? This blog post will answer these questions, and explain how Qumulo leverages erasure coding in its on-premises storage instances to maximize performance and efficiency while protecting against hardware failure.
What is erasure coding?
Erasure Coding is a storage data protection method that leverages advanced mathematics to allow a storage system to regenerate lost data blocks by comparing the surviving data blocks with their accompanying parity blocks. n.
Erasure coding vs. RAID: pros and cons
To help explain how erasure coding is superior to other methods of data protection, it helps to understand the various forms of data protection out there as well as their advantages and disadvantages.
Redundant Array of Inexpensive Disks (RAID)
RAID has been around a long time. The most basic data protection configuration is RAID1, also called Mirroring. As its name suggests, mirroring involves writing all data simultaneously to two (or more) drives, making two identical copies.
Should one of the disks in a RAID1 mirroring configuration fail, the lost data is recoverable from the ‘mirror image’ since each copy resides on its own independent disk. Mirroring is simple to implement, but it has some disadvantages. Since mirroring requires at least one redundant copy of the entire dataset, it is wasteful in terms of the space required for data protection. Also, mirroring can only handle a single drive failure at a time, which generally isn’t enough protection for most failure scenarios, particularly as cluster sizes increase.
Beyond the mirroring option of RAID1, RAID standard offers other configurations to optimize for performance, protection, or both. Options include RAID5, in which a group of hard disks (typically between 5-10) are tied together in a single array, with one disk in the set used for parity data. Another approach, called RAID6, uses the same basic approach, but dedicates two separate disks in the set to store parity data. Another configuration, RAID10, mirrors the entire set of disks to an identical set of disks.
Each of these options comes with its own tradeoffs. RAID5 and RAID6 both provide excellent read performance, but write performance is slower because every write operation requires the calculation of one or two parity blocks. Additionally, these more advanced RAID configurations can become extremely complex and difficult to manage and maintain. And, in the event of a component failure, rebuild times with RAID can be unacceptably slow, which significantly affects performance for users.
Erasure coding
Qumulo’s on-premises storage stack includes the Qumulo Scalable Block Store (SBS), which is the foundation layer that enables efficient block-based data protection using erasure coding rather than RAID.
Unlike RAID striping or mirroring, erasure coding provides scalable protection for massive data storage. Erasure coding delivers better performance, more flexibility, and higher efficiency, enabling unlimited growth while maintaining full data protection and responsiveness in an on-premises Qumulo cluster.
Qumulo’s erasure coding algorithm is based on Reed-Solomon error correction principles, maximizing performance and efficiency using established best practices. Additionally, Qumulo’s Adaptive Data Protection support means that your Qumulo cluster’s erasure coding framework can adjust for greater efficiency as your cluster grows.
Erasure coding explained (examples)
Erasure coding is easiest to understand with examples. Here is an example of our 3,2 encoding algorithm:
In a 3,2 encoding, three blocks (m = 3) are spread across three distinct physical devices. Blocks 1 and 2 contain the user data we want to protect (n = 2), and the third block contains parity data. The contents of the parity block are calculated using the erasure coding algorithm.
Since each block is written to a separate drive, any one of the three drives could fail and the information stored in blocks 1 and 2 is still safe because it can be recreated from the parity block.
How erasure coding works
Here’s how it works. If data block 1 is available, the system simply reads it. The same is true for data block 2. However, if data block 1 is missing, the erasure coding system reads data block 2, plus the parity block, and reconstructs the value of data block 1.
Similarly, if data block 2 resides on the failed disk, the system reads data block 1 and the parity block. SBS always makes sure that the blocks are on different spindles so the system can read from blocks simultaneously.
A 3,2 encoding has efficiency of 2 / 3 (n/m), or 67%. While it is better than the 50% efficiency of mirroring, 3,2 encoding can still only protect against a single disk failure.
Erasure coding provides configurable data protection
Erasure Coding can be configured to optimize for performance, optimized for recovery time in the case of failed media, or optimized for more resilience—up to any four failed disks, or any four failed nodes at once. Generally, increased protection is at the cost of usable capacity.
At a minimum, Qumulo uses 6,4 encoding, which stores a third more user data in the same amount of space as mirroring, and has the ability to tolerate two disk failures instead of just one as mirroring or 3,2 does. In a 6,4 configuration, even if two blocks containing user data are unavailable, the system only needs to read the two remaining data blocks and the two parity blocks to recover the missing data.
So what does it all mean?
Working at the block level rather than the file level like other file platforms, Qumulo’s unique use erasure coding not only makes it possible to protect data effectively without having to create a 1:1 copy of the entire data volume, it also means the size of files has no impact on encoding and recovery times. Whether files are mammoth or mini in size, encoding and recovery performance is more than just fast, it is also dependable.
Other systems can take from hours to days, or longer to recover from an event depending on the mix of file sizes stored on the cluster. Qumulo recovers quickly and reliably without impacting performance regardless of the mix of file data stored. This also enables Qumulo customers the ability to leverage the largest, most economical drives in the market without risk.
Data protection on Qumulo’s cloud-native instances!
The Scalable Block Store manages erasure coding on physical (on-premises) Qumulo clusters only. Cloud-native Qumulo instances, such as Azure Native Qumulo (ANQ), are built on the cloud provider’s own persistent data services, e.g. Azure Blob Storage.
Editor’s Note: Originally published November 3, 2021, this blog post has since been updated for accuracy and comprehensiveness.