-
Notifications
You must be signed in to change notification settings - Fork 1.5k
perf: Remove unnecessary caches #5439
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
base: develop
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5439 +/- ##
=======================================
Coverage 78.5% 78.6%
=======================================
Files 813 813
Lines 70084 69999 -85
Branches 8283 8262 -21
=======================================
- Hits 55031 54985 -46
+ Misses 15053 15014 -39
🚀 New features to boost your workflow:
|
Just looping in @kuznetsss before approving, I don’t believe we do any node-level DB caching in Clio, right? So no changes should be needed on our side? |
As I understand this is rippled's internal database. So no changes on Clio's side are required. |
High Level Overview of Change
NuDB and RocksDB internally already use caches, making the additional caches in the code not very valuable or even unnecessary. Moreover, some caches are defined but are not even used, which can also be removed.
Context of Change
The codebase contains many caches, and this PR is one of several to refactor the codebase with as goal to improve performance, such as reducing memory use, to support future account, trust line, and transaction growth.
This PR removes unnecessary caches in
DatabaseNodeImp
andSHAMapStoreImp
; in the former we will instead rely on the caches built into the underlying NuDB or RocksDB stores, while the latter merely instantiated the caches but never used them. A performance analysis demonstrated that memory use reduced by 7%, CPU use increased by 2%, while all other metrics did not change significantly - a reasonable trade-off between memory and CPU. A more extensive performance analysis will be performed before this change is to be released.Type of Change
.gitignore
, formatting, dropping support for older tooling)