fix(l1): apply RocksDB max_bytes_for_level_base on state CFs - #7113
Open
NikhilSharmaWe wants to merge 1 commit into
Open
fix(l1): apply RocksDB max_bytes_for_level_base on state CFs#7113NikhilSharmaWe wants to merge 1 commit into
NikhilSharmaWe wants to merge 1 commit into
Conversation
Signed-off-by: Nikhil Sharma <nikhilsharma230303@gmail.com>
Greptile SummaryThe PR moves the 2 GiB RocksDB base-level target from ineffective top-level options to the descriptors for all four state column families.
Confidence Score: 5/5The PR appears safe to merge, with all four intended state column families receiving the corrected RocksDB option. The descriptor branches cover both account and storage variants of the trie-node and flat-key-value state column families, and no concrete regression from removing the ineffective top-level setters remains.
|
| Filename | Overview |
|---|---|
| crates/storage/backend/rocksdb.rs | Correctly applies the base-level target to all four intended state column-family descriptors while removing ineffective top-level column-family settings. |
Reviews (1): Last reviewed commit: "fix(l1): apply RocksDB max_bytes_for_lev..." | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #7096
Summary
open_cf_descriptorsonly applies DBOptions from the top-levelOptions. CF setters on that object never reach any column family, somax_bytes_for_level_base(2GB)was a no-op and every CF kept RocksDB’s 256 MiB default. State CFs (large memtables / L0) were especially exposed to excess compaction write amp.This change:
max_bytes_for_level_base(2GB)on the four state CFs (account_trie_nodes,storage_trie_nodes,account_flatkeyvalue,storage_flatkeyvalue)optsBenchmarking
A/B tooling is on
perf/rocksdb-level-base-bench(stacked on this fix): tunable--rocksdb.max-bytes-for-level-base, compaction settle afterimport-bench, and state-CFrocksdb.cfstatsdump. Primary metric is Sum W-Amp / Write(GB).Compare 256 MiB vs 2 GiB vs 4 GiB on a frozen DB with a long
chain.rlp(≥5k–10k blocks), fresh copy per run.I could not run that A/B locally (no frozen bench DB; machine too small to sync one). I smoke-tested the tooling on a 30-block
perf-ciimport: flag, settle, and cfstats dump all worked. RocksDB unit tests pass.Test plan
cargo test -p ethrex-storage --features rocksdb -- backend::rocksdb::testsperf/rocksdb-level-base-bench