-
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
AcctIdx: move zero lamport out of accounts index #21526
Conversation
5bb6744
to
37747ed
Compare
599ac3e
to
4e2fc3f
Compare
4e2fc3f
to
3b4cf33
Compare
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
//! AccountInfo represents a reference to AccountSharedData in either an AppendVec or the write cache. | ||
//! AccountInfo is not persisted anywhere between program runs. | ||
//! AccountInfo is purely runtime state. | ||
//! Note that AccountInfo is saved to disk buckets during runtime, but disk buckets are recreated at startup. |
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.
Thanks for the doc comments!
Codecov Report
@@ Coverage Diff @@
## master #21526 +/- ##
=========================================
- Coverage 81.3% 81.3% -0.1%
=========================================
Files 516 516
Lines 144033 144192 +159
=========================================
+ Hits 117139 117230 +91
- Misses 26894 26962 +68 |
3b4cf33
to
1477b5f
Compare
Pull request has been modified.
Problem
Lamport balance in account index is an optimization for shrinking (maybe also cleaning). But, this information already exists in the code path that produces lists of pubkeys.
Thus, lamports in the accounts index require the accounts index entries to be larger. Larger means more space in memory, less cache hits, more size on disk, more pages needing to map in, etc. These issues become worse with disk buckets and 10B accounts.
Summary of Changes
Remove lamports from an AccountsIndex entry for perf.
Note that the first attempt was trying to calculate the zero lamport information in clean and shrink. This proved to be difficult with deferred dirty keys.
Fixes #