Commit 0edb33b
committed
perf(storage): tune RocksDB options to bound FD usage and improve perf
Replaces bare `Options::default()` on every column family with a tuned
config sized for consensus-only data. The motivation is hitting the FD
limit at runtime (shared with libp2p QUIC sockets); the previous setup
left `max_open_files` at the RocksDB default of -1 and kept every SST
open forever.
Key knobs (vs RocksDB defaults):
- `max_open_files = 512` — hard cap on table-cache FDs
- `keep_log_file_num = 4` — cap LOG file FDs
- Shared 128 MB LRU block cache across all CFs
- Bloom filters on point-lookup CFs (`optimize_filters_for_memory`)
- `cache_index_and_filter_blocks` + `pin_l0_filter_and_index_blocks_in_cache`
- LZ4 on bulky CFs (`BlockBodies`, `BlockSignatures`, `States`)
- `level_compaction_dynamic_level_bytes = true`
- Tighter WAL / sync sizing (1 MB `bytes_per_sync`, 256 MB max WAL)
Each option is annotated with ethrex's value for reference; we scale
down because ethrex's config is sized for an execution client with
hundreds of GB of state trie, whereas consensus data is small and
finalization-prunes aggressively.1 parent 3e81771 commit 0edb33b
1 file changed
Lines changed: 23 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
37 | 54 | | |
38 | 55 | | |
39 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
40 | 61 | | |
41 | 62 | | |
42 | 63 | | |
| |||
0 commit comments