The cluster.routing.allocation.disk.watermark.flood_stage.frozen.max_headroom
setting in Elasticsearch controls the maximum amount of disk space reserved for frozen indices before the flood stage is triggered. This setting helps prevent the cluster from running out of disk space due to frozen indices.
Description
- Default value: 5GB
- Possible values: Any byte size value (e.g., 10GB, 15000MB)
- Recommendations: Adjust based on your cluster's size and the volume of frozen indices
This setting specifies the maximum headroom (free space) that should be maintained for frozen indices before Elasticsearch enters the flood stage. When the available disk space falls below this threshold, Elasticsearch will start enforcing a read-only index block on frozen indices to prevent further data writes.
Example
To change this setting using the cluster settings API:
PUT _cluster/settings
{
"persistent": {
"cluster.routing.allocation.disk.watermark.flood_stage.frozen.max_headroom": "10GB"
}
}
You might want to increase this value if you have a large cluster with many frozen indices and want to ensure more headroom before triggering the flood stage. This change would allow more space for frozen indices before enforcing read-only blocks.
Common Issues or Misuses
- Setting the value too low, causing frequent triggering of the flood stage
- Setting the value too high, potentially allowing the cluster to run out of disk space
- Forgetting to monitor and adjust this setting as the cluster grows or shrinks
Do's and Don'ts
Do's:
- Regularly monitor disk usage and adjust this setting as needed
- Consider the size and growth rate of your frozen indices when setting this value
- Use this setting in conjunction with other disk-based allocation settings for comprehensive management
Don'ts:
- Don't set this value higher than your available disk space
- Don't ignore this setting when working with frozen indices
- Don't rely solely on this setting for disk space management; use it as part of a broader strategy
Frequently Asked Questions
Q: How does this setting differ from the non-frozen flood stage watermark?
A: This setting is specific to frozen indices, while the non-frozen flood stage watermark applies to all other index types. Frozen indices typically require less immediate disk space, so this setting allows for separate management.
Q: Can I set this value to 0 to disable the flood stage for frozen indices?
A: While technically possible, it's not recommended as it removes an important safeguard against running out of disk space. Instead, consider setting a very low value if you want to minimize its impact.
Q: How often does Elasticsearch check against this watermark?
A: Elasticsearch continuously monitors disk usage and checks against this watermark as part of its disk-based shard allocation process.
Q: What happens when the flood stage is triggered for frozen indices?
A: When triggered, Elasticsearch enforces a read-only index block on frozen indices to prevent further writes and protect against disk full scenarios.
Q: Can this setting be configured on a per-node basis?
A: No, this is a cluster-wide setting. It applies uniformly across all nodes in the cluster that store frozen indices.