|
|
|
|
|
by hansvm
25 days ago
|
|
Reed-Solomon speed varies heavily. For the common case of worst-case recovery on moderately reliable foundations (e.g., file storage on disk) with reasonably sized codes, encoding is bottlenecked by RAM/disk/network bandwidth (wherever you're writing the results), typical decoding is blind concatenation, and worst-case decoding pulls an already solved matrix decomposition out of a cache to decode at line rate as well. There's a trick in particular that allows you to rewrite the matmuls as a sequence of vectorized XORs, processing the same number of instruction words as other implementations (give or take control flow) but doing just a stream of zero-data-dependency vectorized math with lots of execution unit support. If you're feeling fancy you can do CSE and also choose the matrix constants minimizing XOR count. Even without that, just basic AVX2 tricks get you a few GiB/s. Unless the more expensive matrix math you're referring to is supposed to have n be the size of the code rather than the size of the data? |
|
I think this line says everything about your assumptions.
RAID-6 or other filesystems use extremely small ReedSolomon codes so these caching methods are possible.
But let's say you have a moderately sized (well, moderate for LDPC anyway) 65535-sized Reed Solomon problem (the maximum Reed Solomon that fits in 2^16 bits). Even with just 1% redundancy that's 655 parity.
Now consider the possible errors to solve for: 20 erasures means you have ~65535 choose 20 combinations of matricies to cache.
Or roughly 10^77 matricies you need to pre solve and cache to handle 20 erasures. Aka basically impossible.
----------
Now if you have 40 hard drives and are dealing with 3 or 4 errors tops, well sure caching is good and solves everything.
Reed Solomon is a perfect Maximally Distance code. For small n it's perfect.
For larger or even just moderate N (kilobytes for packets), it's too unwieldy. LDPC and Turbo Codes (which are imperfect codes) fill in the gap and allow for larger sizes as long as you give up on perfection.