mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
reduce initial block cache threshold to a reasonable value
This commit is contained in:
parent
e5350c9b81
commit
31f3ddf684
2 changed files with 4 additions and 5 deletions
|
|
@ -42,10 +42,10 @@ const (
|
|||
)
|
||||
|
||||
var (
|
||||
blockCacheMaxItems = 32768 // Maximum number of blocks to cache before throttling the download
|
||||
blockCacheInitialItems = 2048 // Initial number of blocks to start fetching, before we know the sizes of the blocks
|
||||
blockCacheSizeWeight = 0.1 // Multiplier to approximate the average block size based on past ones
|
||||
blockCacheMemory uint64 = 2 * 1024 * 1024 * 1024 // Maximum amount of memory to use for block caching
|
||||
blockCacheMaxItems = 32768 // Maximum number of blocks to cache before throttling the download
|
||||
blockCacheInitialItems = blockCacheMemory / (10 * 1024 * 1024) // Initial number of blocks to start fetching, before we know the sizes of the blocks
|
||||
blockCacheSizeWeight = 0.1 // Multiplier to approximate the average block size based on past ones
|
||||
blockCacheMemory uint64 = 2 * 1024 * 1024 * 1024 // Maximum amount of memory to use for block caching
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -73,7 +73,6 @@ func (r *resultStore) SetThrottleTarget(targetRatio common.StorageSize) uint64 {
|
|||
return r.throttleThreshold
|
||||
}
|
||||
targetRatio = max(targetRatio, 0.1)
|
||||
|
||||
// use the target ratio to determine
|
||||
// (pendingGasUsed / target) <- estimated total size of collective in-flight retrievals
|
||||
estBlockSize := common.StorageSize(r.pendingGasUsed/uint64(r.pendingCount)) / targetRatio
|
||||
|
|
|
|||
Loading…
Reference in a new issue