Skip to content
Snippets Groups Projects
Unverified Commit 65a92ba5 authored by Bastian Köcher's avatar Bastian Köcher Committed by GitHub
Browse files

Increase default trie cache size to 1GiB (#6546)


The default trie cache size before was set to `64MiB`, which is quite
low to achieve real speed ups. `1GiB` should be a reasonable number as
the requirements for validators/collators/full nodes are much higher
when it comes to minimum memory requirements. Also the cache will not
use `1GiB` from the start and fills over time. The setting can be
changed by setting `--trie-cache-size BYTE_SIZE`.

---------

Co-authored-by: default avatarGitHub Action <action@github.com>
parent ca8beaed
No related merge requests found
Pipeline #506342 waiting for manual action with stages
in 1 hour, 3 minutes, and 28 seconds
title: Increase default trie cache size to 1GiB
doc:
- audience: Node Operator
description: "The default trie cache size before was set to `64MiB`, which is quite\
\ low to achieve real speed ups. `1GiB` should be a reasonable number as the requirements\
\ for validators/collators/full nodes are much higher when it comes to minimum\
\ memory requirements. Also the cache will not use `1GiB` from the start and fills\
\ over time. The setting can be changed by setting `--trie-cache-size BYTE_SIZE`.\
The CLI option `--state-cache-size` is also removed, which was not having any effect anymore.\r\
\n"
crates:
- name: sc-cli
bump: patch
......@@ -78,21 +78,13 @@ pub struct ImportParams {
/// Specify the state cache size.
///
/// Providing `0` will disable the cache.
#[arg(long, value_name = "Bytes", default_value_t = 67108864)]
#[arg(long, value_name = "Bytes", default_value_t = 1024 * 1024 * 1024)]
pub trie_cache_size: usize,
/// DEPRECATED: switch to `--trie-cache-size`.
#[arg(long)]
state_cache_size: Option<usize>,
}
impl ImportParams {
/// Specify the trie cache maximum size.
pub fn trie_cache_maximum_size(&self) -> Option<usize> {
if self.state_cache_size.is_some() {
eprintln!("`--state-cache-size` was deprecated. Please switch to `--trie-cache-size`.");
}
if self.trie_cache_size == 0 {
None
} else {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment