From fdc5cfd8385bb3915ac7bb235a2b227bc1628e81 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 30 Sep 2019 12:25:34 +0300 Subject: [PATCH] lib/mergeset: reduce the maximum number of cached blocks, since there are reports on OOMs due to too big caches Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/189 Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/195 --- 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 2257c6f4e2..f892a1b8c1 100644 --- a/lib/mergeset/part.go +++ b/lib/mergeset/part.go @@ -13,7 +13,7 @@ import ( func getMaxCachedIndexBlocksPerPart() int { maxCachedIndexBlocksPerPartOnce.Do(func() { - n := memory.Allowed() / 1024 / 1024 / 2 + n := memory.Allowed() / 1024 / 1024 / 4 if n == 0 { n = 10 } @@ -29,7 +29,7 @@ var ( func getMaxCachedInmemoryBlocksPerPart() int { maxCachedInmemoryBlocksPerPartOnce.Do(func() { - n := memory.Allowed() / 1024 / 1024 / 2 + n := memory.Allowed() / 1024 / 1024 / 4 if n == 0 { n = 10 }