forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 380
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
accounts-db: Benchmark cache evictions
The already existing `concurrent_{read,scan}_write` benchmarks are not sufficient for benchmarking the eviction and evaluating what kind of eviction policy performs the best, because they don't fill up the cache, so eviction never happens. The number of readers in that benchmark is low (5) and there are no writer threads causing more contention. The cache is RW-locked, so bencharking only concurrent reads doesn't push it to the limits. Add new benchmarks which are made with measuring contention in mind: - `read_only_accounts_cache` - benchmarks read-only cache loads and stores without causing eviction. - `read_only_accounts_cache_lo_hi` - benchmarks read-only cache eviction with low and high thresholds. After each eviction, enough stores need to be made to reach the difference between the low and high threshold, triggering another eviction. Aims to simulate contention in a manner close to what occurs on validators. - `read_only_accounts_cache_hi` - benchmarks read-only cache eviction without differentiating between low and high thresholds. Each store triggers another eviction immediately. Measures the absolutely worst-case scenario, which may not reflect actual conditions in validators.
- Loading branch information
1 parent
22c8951
commit 4419c1d
Showing
10 changed files
with
510 additions
and
29 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.