This library provides a simple Python interface for implementing erasure codes. To obtain the best possible performance, the underlying erasure code algorithms are written in C.
Project description
This library provides a simple Python interface for implementing erasure codes and is known to work with Python 2.7 and 3.5 through 3.13. To obtain the best possible performance, the library utilizes liberasurecode, which is a C based erasure code library.
PyECLib supports a variety of Erasure Coding backends including the standard Reed-Solomon implementations provided by Jerasure [1], liberasurecode [3], Intel’s ISA-L [4] and Phazr.IO’s libphazr. It also provides support for a flat XOR-based encoder and decoder (part of liberasurecode) - a class of HD Combination Codes based on “Flat XOR-based erasure codes in storage systems: Constructions, efficient recovery, and tradeoffs” in IEEE MSST 2010[2]). These codes are well-suited to archival use-cases, have a simple construction and require a minimum number of participating disks during single-disk reconstruction (think XOR-based LRC code).
Installation
Install pre-requisites:
Python 2.7 or 3.5+ (including development packages), argparse, setuptools
liberasurecode v1.4.0 or greater [3]
Erasure code backend libraries, gf-complete and Jerasure [1],[2], ISA-L [4], etc
Install dependencies:
Debian/Ubuntu hosts:
$ sudo apt-get install build-essential python-dev python-pip liberasurecode-dev $ sudo pip install -U bindep -r test-requirements.txt
RHEL/CentOS hosts:
$ sudo yum install -y redhat-lsb python2-pip python-devel liberasurecode-devel $ sudo pip install -U bindep -r test-requirements.txt $ tools/test-setup.sh
If you want to confirm all dependency packages installed successfully, try:
$ sudo bindep -f bindep.txt
For CentOS, make sure to install the latest Openstack Cloud SIG repo to be able to install the latest available version of liberasurecode-devel.
Install PyECLib:
$ sudo python setup.py install
Run test suite included:
$ ./.unittests
If the test suite fails because it cannot find any of the shared libraries, then you probably need to add /usr/local/lib to the path searched when loading libraries. The best way to do this (on Linux) is to add ‘/usr/local/lib’ to:
/etc/ld.so.conf
and then make sure to run:
$ sudo ldconfig
Getting started
Examples of using PyECLib are provided in the “tools” directory:
Command-line encoder:
tools/pyeclib_encode.py
Command-line decoder:
tools/pyeclib_decode.py
Utility to determine what is needed to reconstruct missing fragments:
tools/pyeclib_fragments_needed.py
A configuration utility to help compare available EC schemes in terms of performance and redundancy:
tools/pyeclib_conf_tool.py
PyEClib initialization:
ec_driver = ECDriver(k=<num_encoded_data_fragments>, m=<num_encoded_parity_fragments>, ec_type=<ec_scheme>))
Supported ec_type values:
liberasurecode_rs_vand => Vandermonde Reed-Solomon encoding, software-only backend implemented by liberasurecode [3]
jerasure_rs_vand => Vandermonde Reed-Solomon encoding, based on Jerasure [1]
jerasure_rs_cauchy => Cauchy Reed-Solomon encoding (Jerasure variant), based on Jerasure [1]
flat_xor_hd_3, flat_xor_hd_4 => Flat-XOR based HD combination codes, liberasurecode [3]
isa_l_rs_vand => Intel Storage Acceleration Library (ISA-L) - SIMD accelerated Erasure Coding backends [4]
isa_l_rs_cauchy => Cauchy Reed-Solomon encoding (ISA-L variant) [4]
shss => NTT Lab Japan’s Erasure Coding Library [5]
libphazr => Phazr.IO’s erasure code library with built-in privacy [6]
Code Maintenance
This library is currently mainly maintained by the Openstack Swift community. For questions or any other help, come ask in #openstack-swift on OFTC.
References
[1] Jerasure, C library that supports erasure coding in storage applications, http://jerasure.org
[2] Greenan, Kevin M et al, “Flat XOR-based erasure codes in storage systems”, http://www.kaymgee.com/Kevin_Greenan/Publications_files/greenan-msst10.pdf
[3] liberasurecode, C API abstraction layer for erasure coding backends, https://opendev.org/openstack/liberasurecode
[4] Intel(R) Storage Acceleration Library (Open Source Version), https://01.org/intel%C2%AE-storage-acceleration-library-open-source-version
[5] Kota Tsuyuzaki <tsuyuzaki.kota@lab.ntt.co.jp>, “NTT SHSS Erasure Coding backend”
[6] Jim Cheung <support@phazr.io>, “Phazr.IO libphazr erasure code backend with built-in privacy”
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file pyeclib-1.6.4.tar.gz
.
File metadata
- Download URL: pyeclib-1.6.4.tar.gz
- Upload date:
- Size: 50.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8c58ebbcc3fa6249649bc86dba32e9a78349fee17a43b6a0131e874334b2085 |
|
MD5 | e2a1f3b81dc93bd1df40f31a52980a5a |
|
BLAKE2b-256 | 0c3383bab90bfff4884fb20da73035a7c721fc4ef6aac7f6c11236d6600b2577 |
File details
Details for the file pyeclib-1.6.4-cp35-abi3-musllinux_1_1_x86_64.whl
.
File metadata
- Download URL: pyeclib-1.6.4-cp35-abi3-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 510.5 kB
- Tags: CPython 3.5+, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c57a4ce7bb47a7a6196abdb23088f8bd30537631c74c783381a830d07545f60 |
|
MD5 | 83f5b45d90c686a11f804ab3a8a017a8 |
|
BLAKE2b-256 | 922dba9dfb9728c70fccb9bc09cf3d83d8c07e514119306bd61694f9b435ff5d |
File details
Details for the file pyeclib-1.6.4-cp35-abi3-musllinux_1_1_aarch64.whl
.
File metadata
- Download URL: pyeclib-1.6.4-cp35-abi3-musllinux_1_1_aarch64.whl
- Upload date:
- Size: 471.5 kB
- Tags: CPython 3.5+, musllinux: musl 1.1+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0541281943935a657dff3a8e72975c2123653b40de76ef53627e59a68f58bc4 |
|
MD5 | f1680bc9d0113ab36ab062466a464bed |
|
BLAKE2b-256 | ddc220af7561d5ef8079b7c10c01fcbcc46859ad0bc4145b836c8f41b1162901 |
File details
Details for the file pyeclib-1.6.4-cp35-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: pyeclib-1.6.4-cp35-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 492.3 kB
- Tags: CPython 3.5+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a0c1762504474bd1c8284767b7b3095766a3378e3ee7b8912169410be43f3f7 |
|
MD5 | 5b52c29d755aa7dd64d6167535b1bae8 |
|
BLAKE2b-256 | e342b19f99a4c4083bef9c339fa3a1b72f4234473f5406108a4ea6dfbc8b05d1 |
File details
Details for the file pyeclib-1.6.4-cp35-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
.
File metadata
- Download URL: pyeclib-1.6.4-cp35-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 531.7 kB
- Tags: CPython 3.5+, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09769df01a6806d6093b723d9ca8a2ff8c0143fde801316bc591e800a559c89e |
|
MD5 | 16d1baaf21cdca04ec90add984019123 |
|
BLAKE2b-256 | 3fba8e1b7ae629a15b38d44e0b45a72d214e6f1b6d180ebb5a8b60b2e316e528 |
File details
Details for the file pyeclib-1.6.4-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
.
File metadata
- Download URL: pyeclib-1.6.4-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 530.8 kB
- Tags: CPython 2.7mu, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1daf83c24e2d0f7e95f0c9fc363049f314641a69e4e26d4bf88a981e7841858d |
|
MD5 | 8b60bcf19b2b6eba6552cd85248412ab |
|
BLAKE2b-256 | 7200d6cc31717d91ecf3bcea057935244aa758a878f621f341d6cfa3e9cc69ab |
File details
Details for the file pyeclib-1.6.4-cp27-cp27m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
.
File metadata
- Download URL: pyeclib-1.6.4-cp27-cp27m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 530.8 kB
- Tags: CPython 2.7m, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05461b842da8d8d241cc9c74d6952d0d30ab569cad062efe7e2d2ab4b1f335b7 |
|
MD5 | 22afe69857ba004a9933c91ad29bbb72 |
|
BLAKE2b-256 | 444be9df9fe314d13c298c33505ce3478387ce6afc8c9b0fc977a791e3816b21 |