chore[storage]: Limit the total size of RocksDB WAL files#1518
Merged
chore[storage]: Limit the total size of RocksDB WAL files#1518
Conversation
124a8e8 to
243c38b
Compare
msbrogli
previously approved these changes
Feb 5, 2026
|
| Branch | chore/storage/limit-rocksdb-wal-files |
| Testbed | ubuntu-22.04 |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result minutes (m) (Result Δ%) | Lower Boundary minutes (m) (Limit %) | Upper Boundary minutes (m) (Limit %) |
|---|---|---|---|---|
| sync-v2 (up to 20000 blocks) | 📈 view plot 🚷 view threshold | 1.69 m(-1.17%)Baseline: 1.71 m | 1.54 m (91.06%) | 2.06 m (82.36%) |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1518 +/- ##
==========================================
- Coverage 85.76% 85.70% -0.06%
==========================================
Files 439 441 +2
Lines 33767 33829 +62
Branches 5277 5285 +8
==========================================
+ Hits 28960 28993 +33
- Misses 3795 3817 +22
- Partials 1012 1019 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
msbrogli
approved these changes
Feb 6, 2026
jansegre
approved these changes
Feb 6, 2026
Member
jansegre
left a comment
There was a problem hiding this comment.
I think we only need to bump python-rocksdb's version before merging.
r4mmer
added a commit
that referenced
this pull request
Feb 24, 2026
…print-move-1 * origin/master: feat: pydantic settings (#1600) fix[thin_wallet]: handle address history invalid tx version (#1590) refactor(nano): Make NCBlockExecutor a pure executor with no side effects fix[nginx]: Make sure we trust the GCP IPs to get the real client IP (#1595) refactor: Upgrade to Pydantic v2 chore(github): Split GitHub main action into lint, test-cli, test-lib, test-other fix[nginx]: Use a larger buffer size for /v1a/status (#1594) chore: adjust testnet config for v0.69.0 release chore[storage]: Limit the total size of RocksDB WAL files (#1518) chore: adjust testnet config for v0.69.0 release chore: configure feature activations for v0.69.0 release refactor: wallet on_new_tx (#1561) refactor(nano): Remove dead reorg cleanup code from block executor
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.
Motivation
We have been observing cases of long-running fullnodes where the size of the RocksDB WAL files (the .log files) grow indefinitely, usually up to fill most of the available space in the disk. In one of the cases, we found 13 GB of .log files.
Acceptance Criteria
max_total_wal_sizeto 3 GB, which will cause RocksDB to flush all in-memory memtable data to .sst files and clean up the .log files when they reach this size in totalstorage.rocksdb.flush=: This will make RocksDB flush the memory (and consequently clean up the .log files). It's a way to trigger the process manually.storage.rocksdb.wal_stats: This will show information about the size each column-family is holding in WAL files. It's useful to check whether the other comand worked for all column-families, for instanceTesting
To test this, you will need to:
Run `poetry lock && poetry update rocksdb
Change the max_total_wal_size to 3 MB, so that we can observe RocksDB behavior with it:
Run
mkdir data-testnet-indiaRun this command to start the node and sync with testnet-india:
Stop the fullnode, undo the change we did to
max_total_wal_sizeso it gets back to 3 GBStart the fullnode again
Run
nc -U /tmp/sysctl.sockand send the commandstorage.rocksdb.flush=. You should check the .log files before and after running it, and they should decrease in size and get rotated. You may want to wait a little for them to grow bigger before doing so, they should grow quickly during the sync with the network.Checklist
master, confirm this code is production-ready and can be included in future releases as soon as it gets merged