Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

TrieCache: Fine tune the size of the local and node cache #14191

Merged
merged 1 commit into from
May 23, 2023

Conversation

bkchr
Copy link
Member

@bkchr bkchr commented May 22, 2023

First, we increase the size to 10MiB for the local cache. Second, we give the node cache a bigger max size than the value cache, see the changed comment on why.

In general this should ensure that we are able to cache the :code and not directly throw it out of the cache because it is too big (which currently happens when the size of the runtime > 2MiB). In the future this should be improved to ensure that certain values are not removed from the cache at all, like :code.

First, we increase the size to 10MiB for the local cache. Second, we give the node cache a bigger
max size than the value cache, see the changed comment on why.

In general this should ensure that we are able to cache the `:code` and not directly throw it out of
the cache because it is too big (which currently happens when the size of the runtime > 2MiB). In
the future this should be improved to ensure that certain values are not removed from the cache at
all, like `:code`.
@bkchr bkchr added A0-please_review Pull request needs code review. C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit B1-note_worthy Changes should be noted in the release notes T0-node This PR/Issue is related to the topic “node”. labels May 22, 2023
@bkchr bkchr requested review from koute and a team May 22, 2023 15:51
@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: cargo-check-each-crate-macos
Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2873661

@michalkucharczyk michalkucharczyk requested a review from a team May 22, 2023 17:01
Copy link
Contributor

@melekes melekes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bkchr bkchr merged commit 2e494e8 into master May 23, 2023
@bkchr bkchr deleted the bkchr-trie-cache-fine-tune-parameters branch May 23, 2023 14:05
gpestana pushed a commit that referenced this pull request May 27, 2023
First, we increase the size to 10MiB for the local cache. Second, we give the node cache a bigger
max size than the value cache, see the changed comment on why.

In general this should ensure that we are able to cache the `:code` and not directly throw it out of
the cache because it is too big (which currently happens when the size of the runtime > 2MiB). In
the future this should be improved to ensure that certain values are not removed from the cache at
all, like `:code`.
Ank4n pushed a commit that referenced this pull request Jul 8, 2023
First, we increase the size to 10MiB for the local cache. Second, we give the node cache a bigger
max size than the value cache, see the changed comment on why.

In general this should ensure that we are able to cache the `:code` and not directly throw it out of
the cache because it is too big (which currently happens when the size of the runtime > 2MiB). In
the future this should be improved to ensure that certain values are not removed from the cache at
all, like `:code`.
nathanwhit pushed a commit to nathanwhit/substrate that referenced this pull request Jul 19, 2023
…#14191)

First, we increase the size to 10MiB for the local cache. Second, we give the node cache a bigger
max size than the value cache, see the changed comment on why.

In general this should ensure that we are able to cache the `:code` and not directly throw it out of
the cache because it is too big (which currently happens when the size of the runtime > 2MiB). In
the future this should be improved to ensure that certain values are not removed from the cache at
all, like `:code`.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B1-note_worthy Changes should be noted in the release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit T0-node This PR/Issue is related to the topic “node”.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants