What are erasure-coding schemes?
Erasure-coding schemes control how many data fragments and how many parity fragments are created for each object.
When you create or edit an ILM rule, you select an available erasure-coding scheme. StorageGRID automatically creates erasure-coding schemes based on how many Storage Nodes and sites make up the storage pool you plan to use.
Data protection
The StorageGRID system uses the Reed-Solomon erasure-coding algorithm. The algorithm slices an object into k
data fragments and computes m
parity fragments.
The k + m = n
fragments are spread across n
Storage Nodes to provide data protection as follows:
-
To retrieve or repair an object,
k
fragments are needed. -
An object can sustain up to
m
lost or corrupt fragments. The higher the value ofm
, the higher the failure tolerance.
The best data protection is provided by the erasure-coding scheme with the highest node or volume failure tolerance within a storage pool.
Storage overhead
The storage overhead of an erasure-coding scheme is calculated by dividing the number of parity fragments (m
) by the number of data fragments (k
). You can use the storage overhead to calculate how much disk space each erasure-coded object requires:
disk space = object size + (object size * storage overhead)
For example, if you store a 10 MB object using the 4+2 scheme (which has 50% storage overhead), the object consumes 15 MB of grid storage. If you store the same 10 MB object using the 6+2 scheme (which has 33% storage overhead), the object consumes approximately 13.3 MB.
Select the erasure-coding scheme with the lowest total value of k+m
that meets your needs. Erasure-coding schemes with a lower number of fragments are more computationally efficient because:
-
Fewer fragments are created and distributed (or retrieved) per object
-
They show better performance because the fragment size is larger
-
They can require fewer nodes be added in an expansion when more storage is required
Guidelines for storage pools
When selecting the storage pool to use for a rule that will create an erasure-coded copy, use the following guidelines for storage pools:
-
The storage pool must include three or more sites, or exactly one site.
You can't use erasure coding if the storage pool includes two sites. -
Don't use a storage pool that includes the All Sites site.
-
The storage pool should include at least
k+m +1
Storage Nodes that can store object data.Storage Nodes can be configured during installation to contain only object metadata and not object data. For more information, see Types of Storage Nodes. The minimum number of Storage Nodes required is
k+m
. However, having at least one additional Storage Node can help prevent ingest failures or ILM backlogs if a required Storage Node is temporarily unavailable.
Erasure-coding schemes for storage pools containing three or more sites
The following table describes the erasure-coding schemes currently supported by StorageGRID for storage pools that include three or more sites. All of these schemes provide site-loss protection. One site can be lost, and the object will still be accessible.
For erasure-coding schemes that provide site-loss protection, the recommended number of Storage Nodes in the storage pool exceeds k+m +1
because each site requires a minimum of three Storage Nodes.
Erasure-coding scheme (k+m) | Minimum number of deployed sites | Recommended number of Storage Nodes at each site | Total recommended number of Storage Nodes | Site loss protection? | Storage overhead |
---|---|---|---|---|---|
4+2 |
3 |
3 |
9 |
Yes |
50% |
6+2 |
4 |
3 |
12 |
Yes |
33% |
8+2 |
5 |
3 |
15 |
Yes |
25% |
6+3 |
3 |
4 |
12 |
Yes |
50% |
9+3 |
4 |
4 |
16 |
Yes |
33% |
2+1 |
3 |
3 |
9 |
Yes |
50% |
4+1 |
5 |
3 |
15 |
Yes |
25% |
6+1 |
7 |
3 |
21 |
Yes |
17% |
7+5 |
3 |
5 |
15 |
Yes |
71% |
StorageGRID requires a minimum of three Storage Nodes per site. To use the 7+5 scheme, each site requires a minimum of four Storage Nodes. Using five Storage Nodes per site is recommended. |
When selecting an erasure-coding scheme that provides site protection, balance the relative importance of the following factors:
-
Number of fragments: Performance and expansion flexibility are generally better when the total number of fragments is lower.
-
Fault tolerance: Fault tolerance is increased by having more parity segments (that is, when
m
has a higher value.) -
Network traffic: When recovering from failures, using a scheme with more fragments (that is, a higher total for
k+m
) creates more network traffic. -
Storage overhead: Schemes with higher overhead require more storage space per object.
For example, when deciding between a 4+2 scheme and 6+3 scheme (which both have 50% storage overhead), select the 6+3 scheme if additional fault tolerance is required. Select the 4+2 scheme if network resources are constrained. If all other factors are equal, select 4+2 because it has a lower total number of fragments.
If you are unsure of which scheme to use, select 4+2 or 6+3, or contact technical support. |
Erasure-coding schemes for one-site storage pools
A one-site storage pool supports all of the erasure-coding schemes defined for three or more sites, provided that the site has enough Storage Nodes.
The minimum number of Storage Nodes required is k+m
, but a storage pool with k+m +1
Storage Nodes is recommended. For example, the 2+1 erasure-coding scheme requires a storage pool with a minimum of three Storage Nodes, but four Storage Nodes is recommended.
Erasure-coding scheme (k+m) | Minimum number of Storage Nodes | Recommended number of Storage Nodes | Storage overhead |
---|---|---|---|
4+2 |
6 |
7 |
50% |
6+2 |
8 |
9 |
33% |
8+2 |
10 |
11 |
25% |
6+3 |
9 |
10 |
50% |
9+3 |
12 |
13 |
33% |
2+1 |
3 |
4 |
50% |
4+1 |
5 |
6 |
25% |
6+1 |
7 |
8 |
17% |
7+5 |
12 |
13 |
71% |