From 2eb27ddb22404212c325999cf163d4ceaf56b8c4 Mon Sep 17 00:00:00 2001 From: Alexander Marshalov <_@marshalov.org> Date: Thu, 4 May 2023 11:34:57 +0200 Subject: [PATCH] max value for `memory.allowedPercent` changed from 200 to 100 (#4171) (#4251) Signed-off-by: Alexander Marshalov <_@marshalov.org> --- docs/CHANGELOG.md | 1 + lib/memory/memory.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 55cdbc642..60fcb3208 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -52,6 +52,7 @@ The following tip changes can be tested by building VictoriaMetrics components f * BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert.html): properly display an error when using `query` function for templating value of `-external.alert.source` flag. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4181). * BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert.html): properly return empty slices instead of nil for `/api/v1/rules` and `/api/v1/alerts` API handlers. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4221). * BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent.html): add `__meta_kubernetes_endpoints_name` label for all ports discovered from endpoint. Previously, ports not matched by `Service` did not have this label. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4154) for details. +* BUGFIX: max value for `memory.allowedPercent` changed from 200 to 100. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4171). ## [v1.90.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.90.0) diff --git a/lib/memory/memory.go b/lib/memory/memory.go index 9c93fac63..4eef6ea14 100644 --- a/lib/memory/memory.go +++ b/lib/memory/memory.go @@ -33,8 +33,8 @@ func initOnce() { } memoryLimit = sysTotalMemory() if allowedBytes.N <= 0 { - if *allowedPercent < 1 || *allowedPercent > 200 { - logger.Fatalf("FATAL: -memory.allowedPercent must be in the range [1...200]; got %g", *allowedPercent) + if *allowedPercent < 1 || *allowedPercent > 100 { + logger.Fatalf("FATAL: -memory.allowedPercent must be in the range [1...100]; got %g", *allowedPercent) } percent := *allowedPercent / 100 allowedMemory = int(float64(memoryLimit) * percent)