Skip to content

Commit 3c54930

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 1661a9a commit 3c54930

3 files changed

Lines changed: 81 additions & 1 deletion

File tree

hadoop-hdds/docs/content/feature/ErasureCoding.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,41 @@ When using ofs/o3fs, we can pass the EC Replication Config by setting the config
228228

229229
In the case bucket already has default EC Replication Config, there is no need of passing EC Replication Config while creating key.
230230

231+
#### Calculating EC Pipeline Limits
232+
233+
The target number of open EC pipelines SCM aims to maintain is calculated dynamically for each EC replication configuration (e.g., RS-6-3, RS-3-2). The calculation is based on the following two properties, with the final target being the greater of the two resulting values.
234+
235+
* `ozone.scm.ec.pipeline.minimum`
236+
* **Description**: The guaranteed minimum number of open pipelines to maintain for each EC configuration, regardless of other factors.
237+
* **Default Value**: `5`
238+
239+
* `ozone.scm.ec.pipeline.per.volume.factor`
240+
* **Description**: A factor used to calculate a target number of pipelines based on the total number of healthy volumes across all datanodes in the cluster.
241+
* **Default Value**: `1.0`
242+
243+
**Calculation Logic:**
244+
245+
SCM first calculates a volume-based target using the formula:
246+
`(<pipeline.per.volume.factor> * <total healthy volumes>) / <required nodes for EC config>`
247+
248+
The final target number of pipelines is then determined by:
249+
`max(<volume-based target>, <pipeline.minimum>)`
250+
251+
**Example:**
252+
253+
Consider a cluster with **200 total healthy volumes** across all datanodes and an EC policy of **RS-6-3** (which requires 9 nodes).
254+
* `ozone.scm.ec.pipeline.minimum` = **5** (default)
255+
* `ozone.scm.ec.pipeline.per.volume.factor` = **1.0** (default)
256+
257+
1. The volume-based target is: `(1.0 * 200) / 9 = 22`
258+
2. The final target is: `max(22, 5) = 22`
259+
260+
SCM will attempt to create and maintain approximately **22** open, RS-6-3 EC pipelines.
261+
262+
**Production Recommendation:**
263+
264+
The default values are a good starting point for most clusters. If you have a very high number of volumes and a write-heavy EC workload, you might consider slightly increasing the `pipeline.per.volume.factor`. Conversely, for read-heavy workloads, the default minimum of 5 pipelines is often sufficient.
265+
231266
### Enable Intel ISA-L
232267

233268
Intel Intelligent Storage Acceleration Library (ISA-L) is an open-source collection of optimized low-level functions used for

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

hadoop-hdds/docs/content/start/ProductionDeployment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,5 @@ A typical production Ozone cluster includes the following services:
8585
### Ozone Configuration
8686

8787
* **Monitoring**: Install Prometheus and Grafana for monitoring the Ozone cluster. For audit logs, consider using a log ingestion framework such as the ELK Stack (Elasticsearch, Logstash, and Kibana) with FileBeat, or other similar frameworks. Alternatively, you can use Apache Ranger to manage audit logs.
88-
* **Pipeline Limits**: Increase the number of allowed write pipelines to better suit your workload by adjusting `ozone.scm.datanode.pipeline.limit` and `ozone.scm.ec.pipeline.minimum`.
88+
* **Pipeline Limits**: Increase the number of allowed write pipelines to better suit your workload by adjusting `ozone.scm.datanode.pipeline.limit` (for Ratis) and `ozone.scm.ec.pipeline.minimum` (for EC).
8989
* **Heap Sizes**: Configure sufficient heap sizes for Ozone Manager (OM), Storage Container Manager (SCM), Recon, DataNode, S3 Gateway (S3G), and HttpFs services to ensure stability.

0 commit comments

Comments
 (0)