6

I hope I am asking in the right community, If not, any suggestion will be appreciated.

I am doing a survey paper where I am doing a comparison between erasure coding and replication techniques. At this stage, I am comparing them regarding specific parameters as below.

The table that I am trying to construct is dealing with parameters that differentiate which technique is better in: storage efficiency, availability, durability, encoding time, latency of failure and cost of reconstruction.

  • Since replication is faster in terms of read performance when failure occurs, is it correct when I say that replication technique has Higher latency on failure? and the same for encoding time, is it correct to say replication has a high encoding time since it has better performance time in writing?

  • Does the reconstruction cost of failure in erasure coded system is higher than replication? does it involves more disk I/O ? will it be different if the failure is transient or permanent?

  • Will it be more informative if I compared all the above parameters according to transient and permanent failures?


is it correct if I compare them as below?

Erasure code: Higher ( Durability, Storage Efficiency, Availability ) and Lower (Encoding time, latency on failure, cost to reconstruct)

Replication : * Higher ( Encoding time, latency on failure, cost to reconstruct) and Lower ( Durability, Storage Efficiency, Availability)


7

Erasure coding, commonly used in RAID parity stripes, consists of high-availability through computation of parity and striping the resulting data across multiple storage subsystems (or disks). Replication, more commonly known as mirroring, simply writes multiple copies of the data to more than one storage subsystem or disk.

Erasure coding incurs added latency for all writes because the incoming data must have its parity computed and written to disk. Reads under a failure mode are going to be slower since the missing data must be reconstructed on-the-fly by comparing the non-missing data against the parity blocks.

Writes under replication are typically not affected as much as under erasure coding since the replicated data can be passed through to the underlying storage without requiring a parity calculation, and is typically written to two or more disks simultaneously in parallel. Reads of replicated data under a failure mode are typically the same speed as reads under a non-failure mode since the data is read from the non-failed disk in it's entirety without requiring any calculation be performed to "make up" missing data.

Erasure coding typically requires less storage space than replication because the only redundant data is the parity code, whereas in replication all the data is duplicated.

Arguably the most commonly storage redundancy scheme used in SQL Server storage systems is RAID-10, which uses a combination of RAID-1 (replication or mirroring in the more common vernacular), and RAID-0 striping without parity. A typical RAID-10 array might consist of 8 disks configured into 4 mirroring pairs, where data is striped across the 4 pairs of disks. This enables both fast reads, and fast writes, while maintaining redundancy. More than a single disk can fail without data loss as long as any two disks in a single mirroring pair don't fail at the same time.

Logical Disk:            C:\
                          |
Striping:    ============================
             |        |        |        |
Mirroring: =====    =====    =====    =====
           D   D    D   D    D   D    D   D
           i   i    i   i    i   i    i   i
           s   s    s   s    s   s    s   s
           k   k    k   k    k   k    k   k 
           1   2    3   4    5   6    7   8

In Raid 10, up to 4 disk failures could occur in the above setup as long as no two failures occur in the same mirror pair. With RAID-50, using erasure coding at the striping level, up to 5 disks can fail as long as only a single mirror pair has two disks fail simultaneously. For instance, Disk1, Disk2, Disk3, Disk5, and Disk8 could fail simultaneously without data-loss.

To answer your question, any I/O that incurs extra operations over-and-above writing the data to a single disk in a non-redundant manner is going to add apparent latency to the system. Whether one system is slower or faster than another depends greatly upon the actual implementation, with the optimizations made by each manufacturer varying greatly with target audience.

  • Thanks for the answer. So we can't compare them and say that erasure code is having a lower (encoding time, cost of reconstruction, latency on failure) ? – Krebto May 24 '17 at 8:36
  • I have edited the question above, can you see the comparison? – Krebto May 24 '17 at 8:42
  • 1
    It's likely safe to say that parity (erasure coding) is slower, requires more I/O, and has a lower cost-per-GB than replication. Replication is likely faster to rebuild, has lower write-latency, and costs more per GB. Again, these assumptions are broad generalizations and depend on implementation details that vary by vendor and target system. – Max Vernon May 30 '17 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.