mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-23 20:37:12 +01:00
lib/mergeset: tune sizes for indexdb/dataBlocks
and indexdb/indexBlocks
according to production workload
This should help with https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2007#issuecomment-1032308742
This commit is contained in:
parent
af77f449da
commit
2455a988e4
@ -17,7 +17,7 @@ var ibCache = blockcache.NewCache(getMaxInmemoryBlocksCacheSize)
|
||||
|
||||
func getMaxIndexBlocksCacheSize() int {
|
||||
maxIndexBlockCacheSizeOnce.Do(func() {
|
||||
maxIndexBlockCacheSize = int(0.2 * float64(memory.Allowed()))
|
||||
maxIndexBlockCacheSize = int(0.1 * float64(memory.Allowed()))
|
||||
})
|
||||
return maxIndexBlockCacheSize
|
||||
}
|
||||
@ -29,7 +29,7 @@ var (
|
||||
|
||||
func getMaxInmemoryBlocksCacheSize() int {
|
||||
maxInmemoryBlockCacheSizeOnce.Do(func() {
|
||||
maxInmemoryBlockCacheSize = int(0.3 * float64(memory.Allowed()))
|
||||
maxInmemoryBlockCacheSize = int(0.45 * float64(memory.Allowed()))
|
||||
})
|
||||
return maxInmemoryBlockCacheSize
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user