-
Notifications
You must be signed in to change notification settings - Fork 622
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
config: adjust shard cache sizes #10409
config: adjust shard cache sizes #10409
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #10409 +/- ##
==========================================
- Coverage 72.00% 71.90% -0.11%
==========================================
Files 718 719 +1
Lines 144544 144914 +370
Branches 144544 144914 +370
==========================================
+ Hits 104080 104199 +119
- Misses 35705 35942 +237
- Partials 4759 4773 +14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks a lot for looking into it!
@@ -240,17 +240,22 @@ impl Default for StoreConfig { | |||
block_size: bytesize::ByteSize::kib(16), | |||
|
|||
trie_cache: TrieCacheConfig { | |||
default_max_bytes: DEFAULT_SHARD_CACHE_TOTAL_SIZE_LIMIT, | |||
default_max_bytes: 500_000_000, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not for this pr, but bytesize is a nice type safe helper for dealing with bytes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
core/store/src/config.rs
Outdated
(ShardUId { version: 1, shard_id: 3 }, 3_000_000_000), | ||
// After resharding "token.sweat" account moves to shard 4 | ||
(ShardUId { version: 2, shard_id: 4 }, 3_000_000_000), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
// In simple nightshade the heavy contract "token.sweat" is in shard 3
(ShardUId { version: 1, shard_id: 3 }, 3_000_000_000),
// In simple nightshade v2 the heavy contract "token.sweat" is in shard 4
(ShardUId { version: 2, shard_id: 4 }, 3_000_000_000),
(ShardUId { version: 1, shard_id: 1 }, 50_000_000), | ||
(ShardUId { version: 2, shard_id: 1 }, 50_000_000), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it the default now? Does it need to be set explicitly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope, I've changed the default via default_max_bytes
field above to 500MB
As suggested in #10409 (comment) to keep it consistent with the rest of `StoreConfig`.
* Do not apply default size increase introduced in #10373 to `view_trie_cache` since view calls are not latency-sensitive * Opt out shard 1 from the increase since it only contains aurora account and based on the current metrics has very low cache miss rate even with a size of 50MB * Configure shard 3 override of 3GB to also apply after resharding
view_trie_cache
since view calls are not latency-sensitive