Disk Growth Guidance
This document provides disk growth estimates and sizing recommendations for testnet and mainnet deployments.
Storage Components
Section titled “Storage Components”The chain stores data in several components:
| Component | Location | Growth Rate | Description |
|---|---|---|---|
| Blocks | data/blocks/ | ~2-5 KB/block | Block headers and transaction data |
| State | data/state/ | Variable | Account state, contract storage |
| Marshal Archive | data/marshal/ | ~1-3 KB/finalization | Finality proofs and attestations |
| Checkpoints | data/checkpoints/ | ~10-50 MB/checkpoint | Periodic state snapshots |
Estimating Growth
Section titled “Estimating Growth”Per-Block Growth
Section titled “Per-Block Growth”block_size = header_size + (tx_count * avg_tx_size) = ~200 bytes + (N * ~250 bytes)For a network with:
- 1 block/second
- Average 10 txs/block
- ~2.7 KB/block
Monthly growth: ~7 GB/month raw blocks
Per-Finalization Growth
Section titled “Per-Finalization Growth”Finality proofs include BLS signatures and attestations:
- ~1-3 KB per finalization
- With 1 finalization/second: ~2.5-7.5 GB/month
State Growth
Section titled “State Growth”State growth depends heavily on contract activity:
- Account creation: ~100 bytes/account
- Contract deployment: ~1-100 KB/contract
- Storage writes: 32 bytes key + value size
Recommended Sizing
Section titled “Recommended Sizing”Testnet Node
Section titled “Testnet Node”| Resource | Minimum | Recommended |
|---|---|---|
| Disk | 100 GB SSD | 250 GB NVMe |
| Expected 6-month growth | ~50 GB | ~50 GB |
| Headroom | 50 GB | 200 GB |
Mainnet Validator
Section titled “Mainnet Validator”| Resource | Minimum | Recommended |
|---|---|---|
| Disk | 500 GB NVMe | 1 TB NVMe |
| Expected 1-year growth | ~200 GB | ~200 GB |
| Headroom | 300 GB | 800 GB |
Archive Node
Section titled “Archive Node”Archive nodes retain all historical state:
| Resource | Minimum | Recommended |
|---|---|---|
| Disk | 2 TB NVMe | 4 TB NVMe |
| Expected 1-year growth | ~500 GB - 1 TB | ~500 GB - 1 TB |
Monitoring Disk Usage
Section titled “Monitoring Disk Usage”Key Metrics
Section titled “Key Metrics”Monitor these Prometheus metrics to track disk usage:
# Block height (track growth rate)rate(ashen_block_height[1h]) * 3600
# Estimated blocks per dayrate(ashen_block_height[1d]) * 86400
# Transaction throughputrate(ashen_block_transaction_count[5m])Grafana Dashboard
Section titled “Grafana Dashboard”The included dashboard (ops/grafana/ashen-dashboard.json) provides:
- Block height and finalized height
- Transaction throughput
- RPC request rates
- Block production timing
- Txpool size
Disk Usage Alerts
Section titled “Disk Usage Alerts”Recommended Prometheus alert rules:
groups: - name: disk-alerts rules: - alert: DiskSpaceLow expr: node_filesystem_avail_bytes{mountpoint="/data"} / node_filesystem_size_bytes{mountpoint="/data"} < 0.15 for: 5m labels: severity: warning annotations: summary: "Disk space below 15%"
- alert: DiskSpaceCritical expr: node_filesystem_avail_bytes{mountpoint="/data"} / node_filesystem_size_bytes{mountpoint="/data"} < 0.05 for: 1m labels: severity: critical annotations: summary: "Disk space below 5%"Pruning Strategies
Section titled “Pruning Strategies”Block Pruning (Non-Archive Nodes)
Section titled “Block Pruning (Non-Archive Nodes)”Keep only recent blocks (e.g., last 10,000):
# Pruning is configured via node config--pruning-keep-recent 10000State Snapshots
Section titled “State Snapshots”State checkpoints are stored and accessible via RPC (NodeRpcV1.list_checkpoints, NodeRpcV1.get_checkpoint).
Note: Automatic checkpoint interval configuration (--checkpoint-interval) is not yet implemented. Checkpoints are currently created during state sync and snapshot operations.
Log Rotation
Section titled “Log Rotation”Configure log rotation for node logs:
/var/log/ashen-node/*.log { daily rotate 7 compress delaycompress missingok notifempty}Capacity Planning
Section titled “Capacity Planning”Formula
Section titled “Formula”required_disk = current_usage + (daily_growth * retention_days) + (headroom_factor * 1.2)Example Calculation
Section titled “Example Calculation”For a testnet validator running 6 months:
- Current usage: 20 GB
- Daily growth: ~300 MB
- Retention: 180 days
- Headroom factor: 1.2
required_disk = 20 GB + (0.3 GB * 180) + (54 GB * 0.2) = 20 GB + 54 GB + 10.8 GB = ~85 GB minimum = ~125 GB recommended (with buffer)Performance Considerations
Section titled “Performance Considerations”SSD vs HDD
Section titled “SSD vs HDD”- Required: NVMe SSD for validators
- Acceptable: SATA SSD for archive/RPC nodes
- Not recommended: HDD (too slow for consensus)
IOPS Requirements
Section titled “IOPS Requirements”| Node Type | Minimum IOPS | Recommended IOPS |
|---|---|---|
| Validator | 5,000 | 10,000+ |
| RPC Node | 3,000 | 5,000+ |
| Archive | 1,000 | 3,000+ |
Filesystem
Section titled “Filesystem”- Recommended: ext4 or XFS
- Mount options:
noatime,nodiratime