From ea2b39a31e7b091d4ad25f1c6bcbfea57e37bd67 Mon Sep 17 00:00:00 2001 From: SuperQ Date: Mon, 10 Jun 2024 09:34:55 +0200 Subject: [PATCH] Tune default GOGC Adjust the default GOGC value to 75. This is less of a memory savings, but has less impact on CPU use. Signed-off-by: SuperQ --- config/config.go | 2 +- docs/configuration/configuration.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/config.go b/config/config.go index d02081d2e..9defa10d4 100644 --- a/config/config.go +++ b/config/config.go @@ -154,7 +154,7 @@ var ( DefaultRuntimeConfig = RuntimeConfig{ // Go runtime tuning. - GoGC: 50, + GoGC: 75, } // DefaultScrapeConfig is the default scrape configuration. diff --git a/docs/configuration/configuration.md b/docs/configuration/configuration.md index 26c088e13..f0e13cf13 100644 --- a/docs/configuration/configuration.md +++ b/docs/configuration/configuration.md @@ -125,7 +125,7 @@ runtime: # Configure the Go garbage collector GOGC parameter # See: https://tip.golang.org/doc/gc-guide#GOGC # Lowering this number increases CPU usage. - [ gogc: | default = 50 ] + [ gogc: | default = 75 ] # Rule files specifies a list of globs. Rules and alerts are read from # all matching files.