mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
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
This commit is contained in:
parent
483af3a97a
commit
9fce611fbb
1 changed files with 2 additions and 2 deletions
|
@ -13,7 +13,7 @@ import (
|
||||||
|
|
||||||
func getMaxCachedIndexBlocksPerPart() int {
|
func getMaxCachedIndexBlocksPerPart() int {
|
||||||
maxCachedIndexBlocksPerPartOnce.Do(func() {
|
maxCachedIndexBlocksPerPartOnce.Do(func() {
|
||||||
n := memory.Allowed() / 1024 / 1024 / 2
|
n := memory.Allowed() / 1024 / 1024 / 4
|
||||||
if n == 0 {
|
if n == 0 {
|
||||||
n = 10
|
n = 10
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ var (
|
||||||
|
|
||||||
func getMaxCachedInmemoryBlocksPerPart() int {
|
func getMaxCachedInmemoryBlocksPerPart() int {
|
||||||
maxCachedInmemoryBlocksPerPartOnce.Do(func() {
|
maxCachedInmemoryBlocksPerPartOnce.Do(func() {
|
||||||
n := memory.Allowed() / 1024 / 1024 / 2
|
n := memory.Allowed() / 1024 / 1024 / 4
|
||||||
if n == 0 {
|
if n == 0 {
|
||||||
n = 10
|
n = 10
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue