| Crates.io | es-disk-planner |
| lib.rs | es-disk-planner |
| version | 0.1.0 |
| created_at | 2025-10-16 14:55:46.819931+00 |
| updated_at | 2025-10-16 14:55:46.819931+00 |
| description | A CLI and library to estimate Elasticsearch cluster disk capacity. |
| homepage | |
| repository | https://github.com/cdelmonte-zg/es-disk-planner |
| max_upload_size | |
| id | 1886250 |
| size | 25,807 |
This tool estimates the disk capacity requirements for an Elasticsearch cluster, taking into account:
The output helps plan realistic disk sizes per node and total cluster capacity.
base = primaries * shard_size_gb * (1 + replicas)
with_merge = base * (1 + overhead_merge)
with_headroom = with_merge * (1 + headroom)
buffer_total = buffer_per_node_gb * nodes
total_cluster = with_headroom + buffer_total
per_node = total_cluster / nodes
disk_per_node = per_node / target_utilization
| Parameter | Default | Description |
|---|---|---|
--shard_size_gb |
50 |
Average size of a single shard on disk (compressed Lucene data) |
--overhead_merge |
0.20 (20%) |
Temporary space required by Lucene segment merges |
--headroom |
0.30 (30%) |
Safety margin to stay below disk watermarks (85–90%) |
--buffer_per_node_gb |
= shard_size_gb |
Space reserved per node for shard relocation/rebalancing |
--target_utilization |
0.75 (75%) |
Maximum desired disk usage ratio |
=== Elasticsearch Disk Capacity Planner ===
Nodes: 5
Primary shards: 10
Replicas per shard: 1
Shard size: 50.0 GB | Overhead merge: 20% | Headroom: 30%
Relocation buffer per node: 50.0 GB
Target disk utilization: 75%
Base (primaries+replicas): 1000.0 GB (1.00 TB)
+ Overhead merge: 1200.0 GB (1.20 TB)
+ Headroom: 1560.0 GB (1.56 TB)
+ Total buffer: 250.0 GB (0.25 TB)
= Cluster total: 1810.0 GB (1.81 TB)
Per node (recommended): 362.0 GB (0.36 TB)
Disk per node @ <75%: 482.7 GB (0.48 TB)
This model provides an approximate but operationally safe estimation for capacity planning in Elasticsearch clusters.
Result: ~1.8 TB total cluster capacity, or ~480–500 GB per node to stay below 75% usage.
The results refer to disk usage, not JVM heap or RAM.
Typical Elasticsearch node sizing guidelines:
The model aligns with Elastic’s published best practices.
# Default example
cargo run -- \
--nodes 5 \
--primaries 10 \
--replicas 1 \
--shard_size_gb 50 \
--overhead_merge 0.20 \
--headroom 0.30 \
--target_utilization 0.75
# Two replicas, larger shards
cargo run -- --nodes 5 --primaries 10 --replicas 2 --shard_size_gb 80
# Conservative watermarks
cargo run -- --nodes 6 --headroom 0.4 --target_utilization 0.65
--units iec to switch between GB/TB (1000-based) and GiB/TiB (1024-based)_cat/shards via REST API