1 ========================
2 SHEC erasure code plugin
3 ========================
5 The *shec* plugin encapsulates the `multiple SHEC
6 <http://tracker.ceph.com/projects/ceph/wiki/Shingled_Erasure_Code_(SHEC)>`_
7 library. It allows ceph to recover data more efficiently than Reed Solomon codes.
10 ======================
12 To create a new *shec* erasure code profile::
14 ceph osd erasure-code-profile set {name} \
18 [c={durability-estimator}] \
19 [ruleset-root={root}] \
20 [ruleset-failure-domain={bucket-type}] \
21 [directory={directory}] \
28 :Description: Each object is split in **data-chunks** parts,
29 each stored on a different OSD.
37 :Description: Compute **coding-chunks** for each object and store them on
38 different OSDs. The number of **coding-chunks** does not necessarily
39 equal the number of OSDs that can be down without losing data.
45 ``c={durability-estimator}``
47 :Description: The number of parity chunks each of which includes each data chunk in its
48 calculation range. The number is used as a **durability estimator**.
49 For instance, if c=2, 2 OSDs can be down without losing data.
55 ``ruleset-root={root}``
57 :Description: The name of the crush bucket used for the first step of
58 the ruleset. For intance **step take default**.
64 ``ruleset-failure-domain={bucket-type}``
66 :Description: Ensure that no two chunks are in a bucket with the same
67 failure domain. For instance, if the failure domain is
68 **host** no two chunks will be stored on the same
69 host. It is used to create a ruleset step such as **step
76 ``directory={directory}``
78 :Description: Set the **directory** name from which the erasure code
83 :Default: /usr/lib/ceph/erasure-code
87 :Description: Override an existing profile by the same name.
92 Brief description of SHEC's layouts
93 ===================================
98 Space efficiency is a ratio of data chunks to all ones in a object and
99 represented as k/(k+m).
100 In order to improve space efficiency, you should increase k or decrease m.
104 space efficiency of SHEC(4,3,2) = 4/(4+3) = 0.57
105 SHEC(5,3,2) or SHEC(4,2,2) improves SHEC(4,3,2)'s space efficiency
110 The third parameter of SHEC (=c) is a durability estimator, which approximates
111 the number of OSDs that can be down without losing data.
113 ``durability estimator of SHEC(4,3,2) = 2``
118 Describing calculation of recovery efficiency is beyond the scope of this document,
119 but at least increasing m without increasing c achieves improvement of recovery efficiency.
120 (However, we must pay attention to the sacrifice of space efficiency in this case.)
122 ``SHEC(4,2,2) -> SHEC(4,3,2) : achieves improvement of recovery efficiency``
124 Erasure code profile examples
125 =============================
129 $ ceph osd erasure-code-profile set SHECprofile \
132 ruleset-failure-domain=host
133 $ ceph osd pool create shecpool 256 256 erasure SHECprofile