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}] \
20 [crush-failure-domain={bucket-type}] \
21 [crush-device-class={device-class}] \
22 [directory={directory}] \
29 :Description: Each object is split in **data-chunks** parts,
30 each stored on a different OSD.
38 :Description: Compute **coding-chunks** for each object and store them on
39 different OSDs. The number of **coding-chunks** does not necessarily
40 equal the number of OSDs that can be down without losing data.
46 ``c={durability-estimator}``
48 :Description: The number of parity chunks each of which includes each data chunk in its
49 calculation range. The number is used as a **durability estimator**.
50 For instance, if c=2, 2 OSDs can be down without losing data.
58 :Description: The name of the crush bucket used for the first step of
59 the ruleset. For intance **step take default**.
65 ``crush-failure-domain={bucket-type}``
67 :Description: Ensure that no two chunks are in a bucket with the same
68 failure domain. For instance, if the failure domain is
69 **host** no two chunks will be stored on the same
70 host. It is used to create a ruleset step such as **step
77 ``crush-device-class={device-class}``
79 :Description: Restrict placement to devices of a specific class (e.g.,
80 ``ssd`` or ``hdd``), using the crush device class names
87 ``directory={directory}``
89 :Description: Set the **directory** name from which the erasure code
94 :Default: /usr/lib/ceph/erasure-code
98 :Description: Override an existing profile by the same name.
103 Brief description of SHEC's layouts
104 ===================================
109 Space efficiency is a ratio of data chunks to all ones in a object and
110 represented as k/(k+m).
111 In order to improve space efficiency, you should increase k or decrease m.
115 space efficiency of SHEC(4,3,2) = 4/(4+3) = 0.57
116 SHEC(5,3,2) or SHEC(4,2,2) improves SHEC(4,3,2)'s space efficiency
121 The third parameter of SHEC (=c) is a durability estimator, which approximates
122 the number of OSDs that can be down without losing data.
124 ``durability estimator of SHEC(4,3,2) = 2``
129 Describing calculation of recovery efficiency is beyond the scope of this document,
130 but at least increasing m without increasing c achieves improvement of recovery efficiency.
131 (However, we must pay attention to the sacrifice of space efficiency in this case.)
133 ``SHEC(4,2,2) -> SHEC(4,3,2) : achieves improvement of recovery efficiency``
135 Erasure code profile examples
136 =============================
140 $ ceph osd erasure-code-profile set SHECprofile \
143 crush-failure-domain=host
144 $ ceph osd pool create shecpool 256 256 erasure SHECprofile