From 27a68e2240b6d75977d7728075899b80470fcf6f Mon Sep 17 00:00:00 2001 From: Stephen Wakely Date: Wed, 11 Sep 2024 14:20:32 +0100 Subject: [PATCH] Update the `zstd` for metrics default compression level to 1 (#29242) Signed-off-by: Stephen Wakely --- pkg/config/setup/config.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/config/setup/config.go b/pkg/config/setup/config.go index 4cf537291aae8..9ed374b26e64b 100644 --- a/pkg/config/setup/config.go +++ b/pkg/config/setup/config.go @@ -78,8 +78,10 @@ const ( // DefaultCompressorKind is the default compressor. Options available are 'zlib' and 'zstd' DefaultCompressorKind = "zlib" - // DefaultZstdCompressionLevel should mirror the default compression level defined in https://github.com/DataDog/zstd/blob/1.x/zstd.go#L23 - DefaultZstdCompressionLevel = 5 + // DefaultZstdCompressionLevel is the default compression level for `zstd`. + // Compression level 1 provides the lowest compression ratio, but uses much less RSS especially + // in situations where we have a high value for `GOMAXPROCS`. + DefaultZstdCompressionLevel = 1 // DefaultLogsSenderBackoffFactor is the default logs sender backoff randomness factor DefaultLogsSenderBackoffFactor = 2.0