mirror of
https://github.com/trezor/blockbook.git
synced 2026-02-20 00:51:39 +01:00
lower addrContractsCacheAlwaysSize to 600 000
This commit is contained in:
@@ -58,7 +58,7 @@ const (
|
||||
)
|
||||
|
||||
const addrContractsCacheMinSize = 300_000 // limit for caching address contracts in memory to speed up indexing
|
||||
const addrContractsCacheAlwaysSize = 1_000_000
|
||||
const addrContractsCacheAlwaysSize = 600_000
|
||||
const addrContractsCacheHotMinScore = 2.0
|
||||
const addrContractsHotHalfLife = 45 * time.Minute
|
||||
const addrContractsHotEvictAfter = 8 * time.Hour
|
||||
|
||||
@@ -2147,9 +2147,6 @@ func (d *RocksDB) logAddrContractsCacheMetrics(period time.Duration) {
|
||||
flushes := atomic.SwapUint64(&d.addrContractsCacheState.cacheFlushes, 0)
|
||||
|
||||
total := hits + misses
|
||||
if total == 0 && writes == 0 && cacheWrites == 0 && skipped == 0 && flushes == 0 {
|
||||
return
|
||||
}
|
||||
hitRate := 0.0
|
||||
if total > 0 {
|
||||
hitRate = float64(hits) * 100 / float64(total)
|
||||
|
||||
@@ -14,7 +14,7 @@ Some behavior of Blockbook can be modified by environment variables. The variabl
|
||||
Default: `300000`
|
||||
Description: Minimum packed size (bytes) to consider addressContracts hotness/caching. Accepts bytes or `K/M/G/T` suffixes (e.g. `300000`, `300K`, `1MiB`).
|
||||
- `<coin shortcut>_ADDR_CONTRACTS_CACHE_ALWAYS_SIZE`
|
||||
Default: `1000000`
|
||||
Default: `600000`
|
||||
Description: Always cache addressContracts above this packed size (bytes). Accepts bytes or `K/M/G/T` suffixes.
|
||||
- `<coin shortcut>_ADDR_CONTRACTS_CACHE_HOT_MIN_SCORE`
|
||||
Default: `2`
|
||||
|
||||
Reference in New Issue
Block a user