Skip to content
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

Changed random eviction cache to accounts only #4650

Merged
merged 2 commits into from
Feb 25, 2025

Conversation

SirTyson
Copy link
Contributor

@SirTyson SirTyson commented Feb 19, 2025

Description

This change adds a configurable memory based cap to the LiveBucketList random eviction cache. It also modifies the cache such that only accounts are stored.

Following initial testing, the random eviction cache improved TX flooding performance, but had virtually no effect on apply time. This makes sense, since apply time already leverages the ltx cache and only makes at most one disk read per ledger entry. TX flooding on the other hand has no such queue and constantly re reads entries off disk. Given that we already have an ltx cache for apply time, it makes sense to only cache the entry types that are used by transaction flooding (i.e. ACCOUNT).

My initial default setting is to cache 3 GB. Currently accounts take up about 2.5 GB in the BucketList, so this allows us to cache all accounts with some room for growth, and 3 GB seems like a modest increase in RAM requirements for validators.

Checklist

  • Reviewed the contributing document
  • Rebased on top of master (no merge commits)
  • Ran clang-format v8.0.0 (via make format or the Visual Studio extension)
  • Compiles
  • Ran all tests
  • If change impacts performance, include supporting evidence per the performance document

@SirTyson SirTyson added this pull request to the merge queue Feb 24, 2025
Merged via the queue into stellar:master with commit c29c06e Feb 25, 2025
13 checks passed
@SirTyson SirTyson deleted the account-cache branch February 25, 2025 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants