Skip to content

Commit 8d43d43

Browse files
committed
docs: Correct EC pipeline calculation and limits
Discovered and corrected the documentation for how the number of EC pipelines is calculated. The previous analysis was incorrect. - `ErasureCoding.md` is updated to describe the two new properties `ozone.scm.ec.pipeline.minimum` and `ozone.scm.ec.pipeline.per.volume.factor` and the `max()` logic used to determine the target number of pipelines. - `ProductionDeployment.md` is updated to reference the correct and existing configuration property for tuning EC pipelines. Change-Id: I393dc60d8745da2b2bb7899530665a108956446d
1 parent ac7a9a9 commit 8d43d43

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

hadoop-hdds/docs/content/feature/multi-raft-support.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,51 @@ Ratis handles concurrent logs per node.
6969
This property is effective only when the previous property is set to 0.
7070
The value of this property must be greater than 0.
7171

72+
### Calculating Ratis Pipeline Limits
73+
74+
The target number of open, FACTOR_THREE Ratis pipelines is controlled by three properties that define the maximum number of pipelines in the cluster at a cluster-wide level, datanode level, and metadata disk level, respectively. SCM will create pipelines until the most restrictive limit is met.
75+
76+
1. **Cluster-wide Limit (`ozone.scm.ratis.pipeline.limit`)**
77+
* **Description**: An absolute, global limit for the total number of open, FACTOR_THREE Ratis pipelines across the entire cluster. This acts as a final cap on the total number of pipelines.
78+
* **Default Value**: `0` (which means no global limit is enforced by default).
79+
80+
2. **Datanode-level Fixed Limit (`ozone.scm.datanode.pipeline.limit`)**
81+
* **Description**: When set to a positive number, this property defines a fixed maximum number of pipelines for every datanode. This is one of two ways to calculate a cluster-wide target.
82+
* **Default Value**: `2`
83+
* **Calculation**: If this is set, the target is `(<this value> * <number of healthy datanodes>) / 3`.
84+
85+
3. **Datanode-level Dynamic Limit (`ozone.scm.pipeline.per.metadata.disk`)**
86+
* **Description**: This property is used only when `ozone.scm.datanode.pipeline.limit` is explicitly set to `0`. It calculates a dynamic limit for each datanode based on its available metadata disks.
87+
* **Default Value**: `2`
88+
* **Calculation**: The limit for each datanode is `(<this value> * <number of metadata disks on that datanode>)`. The total cluster-wide target is the sum of all individual datanode limits, divided by 3.
89+
90+
#### How Limits are Applied
91+
92+
SCM first calculates a target number of pipelines based on either the **Datanode-level Fixed Limit** or the **Datanode-level Dynamic Limit**. It then compares this calculated target to the **Cluster-wide Limit**. The **lowest value** is used as the final target for the number of open pipelines.
93+
94+
**Example (Dynamic Limit):**
95+
96+
Consider a cluster with **10 healthy datanodes**.
97+
* **8 datanodes** have 4 metadata disks each.
98+
* **2 datanodes** have 2 metadata disks each.
99+
100+
And the configuration is:
101+
* `ozone.scm.ratis.pipeline.limit` = **30** (A global cap is set)
102+
* `ozone.scm.datanode.pipeline.limit` = **0** (Use dynamic calculation)
103+
* `ozone.scm.pipeline.per.metadata.disk` = **2** (Default)
104+
105+
**Calculation Steps:**
106+
1. Calculate the limit for the first group of datanodes: `8 datanodes * (2 pipelines/disk * 4 disks/datanode) = 64 pipelines`
107+
2. Calculate the limit for the second group of datanodes: `2 datanodes * (2 pipelines/disk * 2 disks/datanode) = 8 pipelines`
108+
3. Calculate the total raw target from the dynamic limit: `(64 + 8) / 3 = 24`
109+
4. Compare with the global limit: `min(24, 30) = 24`
110+
111+
SCM will attempt to create and maintain approximately **24** open, FACTOR_THREE Ratis pipelines.
112+
113+
**Production Recommendation:**
114+
115+
For most production deployments, using the dynamic per-disk limit (`ozone.scm.datanode.pipeline.limit=0`) is recommended, as it allows the cluster to scale pipeline capacity naturally with its resources. You can use the global limit (`ozone.scm.ratis.pipeline.limit`) as a safety cap if needed. A good starting value for `ozone.scm.pipeline.per.metadata.disk` is **2**. Monitor the `NumOpenPipelines` metric in SCM to see if the actual number of pipelines aligns with your configured targets.
116+
72117
## How to Use
73118
1. Configure Datanode metadata directories:
74119
```xml

0 commit comments

Comments
 (0)