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

Performance: AccountsDB #4272

Open
bw-solana opened this issue Jan 3, 2025 · 0 comments
Open

Performance: AccountsDB #4272

bw-solana opened this issue Jan 3, 2025 · 0 comments
Assignees

Comments

@bw-solana
Copy link

bw-solana commented Jan 3, 2025

Doesn't scale to many txs, nor large data. There are locks (read/write caches) that are contended with many txs. There are large copies with large data.

For real organic content, where the working set of accounts isn't large, so say 10-100x txs but only ~2 times as large account data size, we can mitigate the copies part by being smarter in allocating memory.

For the read write caches, we don't have mitigations at the moment.

We probably have to rewrite the accountsdb to be a proper database. Won't scale to 1M tps and it can't be fixed. Alessandro has ideas that should be easy to prototype.

A “pragmatic” LSM tree DB would work well here. Clickhouse is one option (read this paper). Even RocksDB would be an improvement. Pragmatic here means not being pure as the pure LSM designs. Instead, having a mix of keys and data or keys and split data (a la whisper) depending on account sizes, etc.

Read only cache LRU contention is a problem. Alessandro suspects we could move to a sampled LRU to approximate LRU while reducing contention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

No branches or pull requests

3 participants