-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce ttl eviction for RecycleStore #15513
Conversation
Codecov Report
@@ Coverage Diff @@
## master #15513 +/- ##
=========================================
- Coverage 80.2% 80.2% -0.1%
=========================================
Files 406 406
Lines 104172 104258 +86
=========================================
+ Hits 83603 83669 +66
- Misses 20569 20589 +20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
BEFORE AFTER We see now constant (write) lock time, this time also includes the actual expiration loop. This lock can block the blockstore_processor (= important) threads. but should be ok. That's because This also implies that each iteration of this loop (https://github.com/solana-labs/solana/pull/15513/files#diff-1090394420d51617f3233275c2b65ed706b35b53b115fe65f82c682af8134a6fR650) takes around 150ns. |
It seems that |
(cherry picked from commit 21b4300)
Problem
(mostly copied from #15188 )
recycling
AppendVec
seems to accmulate RSS usage over time. That's because RecycleStore's entries gradually occupied larger AppendVecs over time.The followings are
top
excerpts over the time for easier illustration. (I have somewhat more detailed metrics on the tested machines, if wanted)With recycling (current code; bad;):
Summary of Changes
Almost same approch is inherited from #15139.
As a context, #15139 is superceded by #15320 because #15139 had a unsolved unbounded Recyler growth problem.
However, RecycleStores shouldn't have such problem (it's capped to MAX_RECYCLE_STORES and it doesn't need to be dynamic and thus doesn't need to shrink.)..
So, I think the ttl thing can be applied here this time really. The benefit is simpler implementation compared to full-fledged dynamic implementation a la #15320.
Fixes #14366