Leopard-RS : O(N Log N) MDS Reed-Solomon Block Erasure Code for Large Data
Go to file
Christopher Taylor 7b3f1442a4 Cleanup 2017-05-27 23:48:57 -07:00
docs WIP 2017-05-26 19:51:30 -07:00
proj Selectable fields 2017-05-26 20:10:53 -07:00
tests Cleanup 2017-05-27 23:48:57 -07:00
.gitignore First commit 2017-05-17 20:06:13 -07:00
LeopardCommon.cpp Fixes 2017-05-27 19:39:38 -07:00
LeopardCommon.h Fixes 2017-05-27 19:39:38 -07:00
LeopardFF8.cpp Cleanup 2017-05-27 23:48:57 -07:00
LeopardFF8.h Fixes 2017-05-27 19:39:38 -07:00
LeopardFF16.cpp WIP some FF8 math 2017-05-27 18:44:06 -07:00
LeopardFF16.h Fix build errors 2017-05-26 20:30:48 -07:00
License.md Project structure 2017-05-25 02:24:15 -07:00
README.md Project structure 2017-05-25 02:24:15 -07:00
leopard.cpp Add benchmark tests for 4-way ops 2017-05-27 01:15:24 -07:00
leopard.h Selectable fields 2017-05-26 20:10:53 -07:00

README.md

Leopard-RS

Leopard Reed-Solomon Error Correction Codes in C

Leopard-RS is a portable, fast library for Forward Error Correction. From a block of equally sized original data pieces, it generates recovery symbols that can be used to recover lost original data.

  • It requires that data pieces are all a fixed size, a multiple of 64 bytes.
  • The original and recovery data must not exceed 65536 pieces.

Motivation:

It gets slower as O(N Log N) in the input data size, and its inner loops are vectorized using the best approaches available on modern processors, using the fastest finite fields (8-bit or 16-bit Galois fields) for bulk data.

It sets new speed records for MDS encoding and decoding of large data. It is also the only open-source production ready software for this purpose available today.

Example applications are data recovery software and data center replication.

Encoder API:

#include "leopard.h"

For full documentation please read leopard.h.

  • leo_init() : Initialize library.
  • leo_encode_work_count() : Calculate the number of work_data buffers to provide to leo_encode().
  • leo_encode(): Generate recovery data.

Decoder API:

#include "leopard.h"

For full documentation please read leopard.h.

  • leo_init() : Initialize library.
  • leo_decode_work_count() : Calculate the number of work_data buffers to provide to leo_decode().
  • leo_decode() : Generate recovery data.

Benchmarks:

TODO

Comparisons:

TODO

Background

This library implements an MDS erasure code introduced in this paper:

    S.-J. Lin,  T. Y. Al-Naffouri, Y. S. Han, and W.-H. Chung,
    "Novel Polynomial Basis with Fast Fourier Transform and Its Application to Reed-Solomon Erasure Codes"
    IEEE Trans. on Information Theory, pp. 6284-6299, November, 2016.

The paper is available here: http://ct.ee.ntust.edu.tw/it2016-2.pdf And also mirrored in the /docs/ folder.

The high-level summary is that instead of using complicated fields, an additive FFT was introduced that works with familiar Galois fields for the first time. This is actually a huge new result that will change how Reed-Solomon codecs will be written.

My contribution is extending the ALTMAP approach from Jerasure for 16-bit Galois fields out to 64 bytes to enable AVX2 speedups, and marry it with the row parallelism introduced by ISA-L.

Credits

The idea is the brain-child of S.-J. Lin. He is a super bright guy who should be recognized more widely!

This software was written entirely by myself ( Christopher A. Taylor mrcatid@gmail.com ). If you find it useful and would like to buy me a coffee, consider tipping.