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

[chainstate] implement cache strategies for nodes in tries that are persisted to disk #3042

Closed
jcnelson opened this issue Feb 10, 2022 · 1 comment
Assignees

Comments

@jcnelson
Copy link
Member

Once a trie is stored to the MARF, it will never be modified. We should be able to fearlessly cache any/all of its nodes in RAM. The trie storage system should be updated to support a variety of caching strategies, which the user can choose in the config file (i.e. to trade RAM for speed). At a minimum, we should support the following:

  • No-op (the default; what happens now)
  • Everything (keep all nodes in RAM -- useful for miners)
  • Node256 (keep TrieNode256's in RAM, but nothing else)

I've tried all of the above. Node256 offers decent performance without eating your RAM, for example.

@jcnelson jcnelson self-assigned this Feb 10, 2022
@gregorycoppola
Copy link
Contributor

Related: This issue is the line of work suggested in #3014, which suggests looking for ways to cache the MARF in RAM to improve performance.

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

No branches or pull requests

2 participants