mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-06 00:02:54 +00:00
triedb/pathdb: fix max buffer size
We use different default on mainnet, bumping it to 1GB. Make sure we allow this here. Previously we had a warning and buffer was reset to 256MB. Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
7b693ea17c
commit
6cb31eaa20
2 changed files with 2 additions and 2 deletions
|
|
@ -465,7 +465,7 @@ var (
|
||||||
CacheFlag = &cli.IntFlag{
|
CacheFlag = &cli.IntFlag{
|
||||||
Name: "cache",
|
Name: "cache",
|
||||||
Usage: "Megabytes of memory allocated to internal caching (default = 4096 mainnet full node, 128 light mode)",
|
Usage: "Megabytes of memory allocated to internal caching (default = 4096 mainnet full node, 128 light mode)",
|
||||||
Value: 1024,
|
Value: 1024, // Note: default is bumped to 4096 on mainnet in geth/main.go
|
||||||
Category: flags.PerfCategory,
|
Category: flags.PerfCategory,
|
||||||
}
|
}
|
||||||
CacheDatabaseFlag = &cli.IntFlag{
|
CacheDatabaseFlag = &cli.IntFlag{
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ const (
|
||||||
// Too large buffer will cause the system to pause for a long
|
// Too large buffer will cause the system to pause for a long
|
||||||
// time when write happens. Also, the largest batch that pebble can
|
// time when write happens. Also, the largest batch that pebble can
|
||||||
// support is 4GB, node will panic if batch size exceeds this limit.
|
// support is 4GB, node will panic if batch size exceeds this limit.
|
||||||
maxBufferSize = 256 * 1024 * 1024
|
maxBufferSize = 1024 * 1024 * 1024
|
||||||
|
|
||||||
// defaultBufferSize is the default memory allowance of node buffer
|
// defaultBufferSize is the default memory allowance of node buffer
|
||||||
// that aggregates the writes from above until it's flushed into the
|
// that aggregates the writes from above until it's flushed into the
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue