From 50c1d75b815a084dd783975a5084d83c8daaef6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Tue, 19 Nov 2024 21:42:28 +0100 Subject: [PATCH 1/3] Increase default trie cache size to 1GiB 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`. --- substrate/client/cli/src/params/import_params.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/substrate/client/cli/src/params/import_params.rs b/substrate/client/cli/src/params/import_params.rs index add7cb4f8505..e4b8b9644feb 100644 --- a/substrate/client/cli/src/params/import_params.rs +++ b/substrate/client/cli/src/params/import_params.rs @@ -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, } impl ImportParams { /// Specify the trie cache maximum size. pub fn trie_cache_maximum_size(&self) -> Option { - 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 { From faf4aa596f250454edddd8ba492bcc1b87f5b232 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Tue, 19 Nov 2024 20:58:18 +0000 Subject: [PATCH 2/3] Update from bkchr running command 'prdoc --bump patch --audience node_operator' --- prdoc/pr_6546.prdoc | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 prdoc/pr_6546.prdoc diff --git a/prdoc/pr_6546.prdoc b/prdoc/pr_6546.prdoc new file mode 100644 index 000000000000..901759f9a8ef --- /dev/null +++ b/prdoc/pr_6546.prdoc @@ -0,0 +1,12 @@ +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`.\r\ + \n" +crates: +- name: sc-cli + bump: patch From fb726a1f2f33966483da64aa8ff84e6e90cb3123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Wed, 20 Nov 2024 10:30:35 +0100 Subject: [PATCH 3/3] Update prdoc/pr_6546.prdoc --- prdoc/pr_6546.prdoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/prdoc/pr_6546.prdoc b/prdoc/pr_6546.prdoc index 901759f9a8ef..353578a7f58f 100644 --- a/prdoc/pr_6546.prdoc +++ b/prdoc/pr_6546.prdoc @@ -5,7 +5,8 @@ doc: \ 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`.\r\ + \ 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