You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
0 commit comments