The node.bandwidth.recovery.disk.write
setting in Elasticsearch controls the maximum allowed bandwidth for writing to disk during recovery operations. This setting helps manage the impact of recovery processes on overall cluster performance by limiting the rate at which data can be written to disk during shard recovery.
- Default value: 40mb
- Possible values: Any valid byte size value (e.g., 10mb, 50mb, 1gb)
- Recommendations: The optimal value depends on your hardware capabilities and specific use case. For systems with high-performance SSDs, you may consider increasing this value to speed up recovery processes.
This setting is particularly useful in scenarios where you want to balance recovery speed with the overall performance of your Elasticsearch cluster. By limiting the disk write bandwidth during recovery, you can ensure that other operations in the cluster are not severely impacted.
Version Information
This setting was introduced in Elasticsearch 7.5.0 and is available in all subsequent versions.
Example
To change the node.bandwidth.recovery.disk.write
setting using the cluster settings API:
PUT _cluster/settings
{
"persistent": {
"node.bandwidth.recovery.disk.write": "60mb"
}
}
In this example, we're increasing the disk write bandwidth limit to 60MB/s. This might be beneficial in a scenario where you have high-performance SSDs and want to speed up the recovery process without significantly impacting other operations.
Common Issues and Misuses
- Setting the value too high can overwhelm the disk I/O, potentially slowing down other critical operations.
- Setting the value too low can unnecessarily prolong recovery times, especially in clusters with high-performance storage.
- Forgetting to adjust this setting when upgrading hardware, potentially underutilizing new, faster disks.
Do's and Don'ts
Do's:
- Monitor your cluster's performance during recovery operations to find the optimal setting.
- Adjust the setting based on your specific hardware capabilities and workload requirements.
- Consider increasing this value temporarily during large-scale recovery operations, then reverting to a lower value.
Don'ts:
- Don't set this value arbitrarily without considering your hardware capabilities.
- Avoid setting this too high on systems with slower disks or in environments where disk I/O is shared with other critical applications.
- Don't forget to review and potentially adjust this setting after hardware upgrades or significant changes to your cluster configuration.
Frequently Asked Questions
Q: How does node.bandwidth.recovery.disk.write affect cluster recovery time?
A: This setting directly impacts the speed at which data can be written to disk during recovery operations. A higher value can potentially reduce recovery time, but may also increase the load on your storage system.
Q: Can changing node.bandwidth.recovery.disk.write impact the performance of other operations?
A: Yes, setting this value too high can potentially impact other disk-intensive operations in your cluster by consuming a larger share of the available I/O bandwidth.
Q: Is it safe to change node.bandwidth.recovery.disk.write dynamically?
A: Yes, this setting can be changed dynamically using the cluster settings API without requiring a cluster restart. However, changes will only affect new recovery operations.
Q: How do I determine the optimal value for node.bandwidth.recovery.disk.write?
A: The optimal value depends on your hardware capabilities, current workload, and recovery requirements. Start with the default value and gradually increase it while monitoring cluster performance and recovery times to find the best balance.
Q: Does node.bandwidth.recovery.disk.write affect all types of recovery operations?
A: This setting affects all recovery operations that involve writing data to disk, including peer recovery, snapshot restore, and shard allocation.