-
Notifications
You must be signed in to change notification settings - Fork 201
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
Replaces DashMap with HashMap in secondary indexes #1137
Replaces DashMap with HashMap in secondary indexes #1137
Conversation
@vovkman Can you share your experiences? |
@stakeconomy Can you comment on the results you've seen too? |
@dnut Have you been running this patch on any production RPC nodes? If yes, how has your experience been? |
I've been running tests on a portion of prod traffic and not seeing any noticeable performance difference. Can confirm the account index size shrinks to about 230GB so allows running on smaller ram servers. |
👍
For posterity and comparison, how much memory is used without this patch? |
We have this patch running on all our RPC nodes for 2-3 months without any problems |
We have seen over 1TB memory usage on 64 core machines. Somehow more cores = more memory usage with dashmap |
On the same machine, 745gb without this patch (32c, 1tb) |
@carllin @jeffwashington Requesting your review here. Is there any additional testing you feel is necessary? @t-nelson Tagging you here so you know about it, and can opt to champion a backport 😉 |
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.
looks right to me. I don't have a lot of experience with rpc.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1137 +/- ##
=========================================
- Coverage 82.1% 82.1% -0.1%
=========================================
Files 880 880
Lines 235665 235634 -31
=========================================
- Hits 193716 193634 -82
- Misses 41949 42000 +51 |
DashMap has some static allocations per-core |
done! |
Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis. |
(cherry picked from commit 9606a13)
Hey there. What's the best branch to clone to merge this in? I have tried 1.17.16 and I got build failures. |
…anza-xyz#1137) (anza-xyz#1155) Replaces DashMap with HashMap in secondary indexes (anza-xyz#1137) (cherry picked from commit 9606a13) Co-authored-by: Brooks <brooks@anza.xyz>
Problem
This is a copy of the original PR to upstream
solana
: solana-labs#34955. Please read the description and the discussion afterwards.Summary of Changes
Results
Anecdotally I have heard from a few RPC providers that have run this patch. I'll ask them to reply here as well, and did want to share the summary that results have been positive. RAM usage is significantly reduced, and performance was not impacted. One noted that servicing getProgramAccounts actually was a bit faster with this PR!
A quote: