Repository navigation
Description
Was tendermint/tendermint#9743
Summary
Experiment with adding in-proces compaction, so that nodes don't need to be stopped to perform compaction. This issue was originally targeting levelDB but we added support for this to all cometbft database backends that support this feature: RocksDB, PebbleDB and LevelDB.
Problem Definition
Background
One of the most common problem that operators signal is that storage growth is unbounded and compaction doesn't work. Some operators stop their node, trigger experimental-compact-goleveldb (#8564) which deletes old data, and then restart their node.
Why do we need this feature?
The use of command experimental-compact-goleveldb has the disadvantage that while this is running the node is stopped and is missing blocks. It typically take on the order of tens of minutes to finish compaction of a node on a production network, so the number of missed blocks can be significant.
Proposal
We'll go about this incrementally
- Tendermint team does initial de-risking and sanity checks to see that in-process compaction can be implemented safely
- Add a new database type that does compaction
- We ask an operator to deploy an early experiment replacing one of their full nodes with the patched tendermint version that has in-process compaction
- relayer team tests relaying against that node, monitor general health
- We collect advanced metrics on latency in particular, as well as storage growth evolution
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTodo
- StatusShow more project fieldsDone
Activity
jmalicevic commentedon Nov 23, 2023
This should apply the results done by Anton Paramonov in https://github.com/cometbft/cometbft/blob/anton/db_measurements/tools/goleveldb_perf/GoLevelDBCompaction.ipynb
melekes commentedon Dec 11, 2023
https://github.com/ethereum/go-ethereum/blob/4d086430bd8c0b9549fde5259f74f6df6c96df65/ethdb/leveldb/leveldb.go#L236-L245
This is the function for in-process compaction.
feat(pruning): trigger explicitly compaction upon pruning (#1972)
feat(pruning): trigger explicitly compaction upon pruning (#1972)
jmalicevic commentedon Feb 19, 2024
Closed with #1972 and cometbft/cometbft-db#111 . Followed up with a fix resolving: #2476
feat(pruning): trigger explicitly compaction upon pruning (#1972)
jmalicevic commentedon Feb 29, 2024
Local experiments confirmed that the storage footprint with golevelDB shrinks only when forcing compaction. This was confirmed by running the code on a real chain by Informal staking.
[-]Add in-process compaction support to LevelDB[/-][+]Add in-process compaction support to databases[/+]docs: Copy description of section on compaction to docs (#2600)
docs: Copy description of section on compaction to docs (#2600)
docs: Copy description of section on compaction to docs (backport #2600…
perf(p2p/channel): Speedup NewDelimitedWriter (backport cometbft#2949) (
chore: upgrade fork to v0.38.17 (cometbft#49)