This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Tune RocksDB to avoid unbounded cache growth #15266
Closed
Closed
Conversation
This file contains 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
FYI, these two call sites are the exact call sites to allocate these unfreed mem
|
Codecov Report
@@ Coverage Diff @@
## master #15266 +/- ##
=======================================
Coverage 79.5% 79.5%
=======================================
Files 402 402
Lines 102344 102345 +1
=======================================
+ Hits 81431 81445 +14
+ Misses 20913 20900 -13 |
We could plumb it as an command-line option, and then it will be easy to test out. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
stale
bot
added
the
stale
[bot only] Added to stale content; results in auto-close after a week.
label
Mar 19, 2021
This stale pull request has been automatically closed. Thank you for your contributions. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Problem
Yet another slow mem leak is spotted; this time... by our usage of RocksDB (or lack of proper configuration...)
Unless we set
max_open_files
(-1
; inifinite; is the default), rocksdb holds associated cache in memory. Putting aside just mere File descriptors, it burdens long-running validator operation. Note that, generally we continue to create SST files.comparison of validators before/after running roughly equal time with same options against mainnet-beta under heaptrack
BEFORE
(Note: peak is same as leaked amount... so not freeing at all. lol)
AFTER
(Note: this report is taken when rocksdb dir contained more than 512 (new tuned value) files and lsof -p indicated actually less than 512 open file descriptor)
After very long run even after daily manually-triggered compaction was completed
(note: Dunno about small difference between peak vs leak)
resource: facebook/rocksdb#4112 (sadly, very cluttered not-authoritative info...)
Summary of Changes
TODO:
--rpc-port
or not).context #14366