From a0a56d6c1ca9c7cb9a5e8edcf618c4a79883e908 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 8 Feb 2022 17:58:47 +0200 Subject: [PATCH] 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 --- lib/mergeset/part.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mergeset/part.go b/lib/mergeset/part.go index d49e19ee3..fc9955200 100644 --- a/lib/mergeset/part.go +++ b/lib/mergeset/part.go @@ -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 }