From 31c70863601a143eb3b9a8254f8c0e3d4eb67129 Mon Sep 17 00:00:00 2001 From: Wang Gerui Date: Wed, 22 Jul 2026 02:28:51 +0800 Subject: [PATCH] feat: increase memory holding state trie --- cmd/utils/flags.go | 8 ++++---- core/blockchain.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 3d357fa60e5a..63b18df1e8d9 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -296,28 +296,28 @@ var ( CacheFlag = &cli.IntFlag{ Name: "cache", Usage: "Megabytes of memory allocated to internal caching", - Value: 1024, + Value: 3072, Category: flags.PerfCategory, } CacheDatabaseFlag = &cli.IntFlag{ Name: "cache-database", Aliases: []string{"cache.database"}, Usage: "Percentage of cache memory allowance to use for database io", - Value: 50, + Value: 17, Category: flags.PerfCategory, } CacheTrieFlag = &cli.IntFlag{ Name: "cache-trie", Aliases: []string{"cache.trie"}, Usage: "Percentage of cache memory allowance to use for trie caching (default = 15% full mode, 30% archive mode)", - Value: 15, + Value: 5, Category: flags.PerfCategory, } CacheGCFlag = &cli.IntFlag{ Name: "cache-gc", Aliases: []string{"cache.gc"}, Usage: "Percentage of cache memory allowance to use for trie pruning (default = 25% full mode, 0% archive mode)", - Value: 25, + Value: 34, Category: flags.PerfCategory, } CachePrefetchFlag = &cli.BoolFlag{ diff --git a/core/blockchain.go b/core/blockchain.go index c4eab60821d6..d84d9357f076 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -102,7 +102,7 @@ const ( receiptsCacheLimit = 32 maxFutureBlocks = 256 maxTimeFutureBlocks = 30 - TriesInMemory = 128 + TriesInMemory = 1024 // BlockChainVersion ensures that an incompatible database forces a resync from scratch. //