From 41513756e06fad816f6b77710a544e99f3a8d1e6 Mon Sep 17 00:00:00 2001 From: Samiur Arif Date: Tue, 26 Mar 2024 12:54:05 -0700 Subject: [PATCH 1/4] adding upgrade section for memory_ballast --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 89bc2b8123..c684f1f049 100644 --- a/README.md +++ b/README.md @@ -176,6 +176,11 @@ manually before the backward compatibility is dropped. For every configuration u [the default agent config](https://github.com/signalfx/splunk-otel-collector/blob/main/cmd/otelcol/config/collector/agent_config.yaml) as a reference. +### From 0.96.1 to 0.97.0 +- `memory_ballast` is no longer effective rather GOMEMLIMIT env var should be used in the config to set a customized memory limit. Or else a soft limit of 90% of the total memory will be set automatically. If `SPLUNK_MEMORY_TOTAL_MIB` is set, total memory is deduced from it or else default is used. + +More details: https://github.com/signalfx/splunk-otel-collector/pull/4404. + ### From 0.68.0 to 0.69.0 - `gke` and `gce` resource detectors in `resourcedetection` processor are replaced with `gcp` resource detector. From 040626449df992461faae603ad2d6451d86ab134 Mon Sep 17 00:00:00 2001 From: Dmitry Anoshin Date: Tue, 26 Mar 2024 14:15:53 -0700 Subject: [PATCH 2/4] Update the guideline --- README.md | 11 +++++++++-- internal/configconverter/remove_memory_ballast_key.go | 3 ++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c684f1f049..b7f064f5f1 100644 --- a/README.md +++ b/README.md @@ -177,9 +177,16 @@ manually before the backward compatibility is dropped. For every configuration u as a reference. ### From 0.96.1 to 0.97.0 -- `memory_ballast` is no longer effective rather GOMEMLIMIT env var should be used in the config to set a customized memory limit. Or else a soft limit of 90% of the total memory will be set automatically. If `SPLUNK_MEMORY_TOTAL_MIB` is set, total memory is deduced from it or else default is used. -More details: https://github.com/signalfx/splunk-otel-collector/pull/4404. +- `memory_ballast` is no longer effective. The garbage collection is now controlled by the soft memory limit set to 90% + of total memory (`SPLUNK_MEMORY_TOTAL_MIB` env var) by default. + + If you haven't customized the `memory_ballast`, just remove it from the configuration. + + If you have customized it via `SPLUNK_BALLAST_SIZE_MIB` (or `extensions::memory_ballast::size_mib` config), you should + remove the `memory_ballast` extension and use `GOMEMLIMIT` env var to set a custom soft memory limit: + - To increase frequency of garbage collections: set `GOMEMLIMIT` to a higher value than the default 90% of total memory. + - To decrease frequency of garbage collections: set `GOMEMLIMIT` to a lower value than the default 90% of total memory. ### From 0.68.0 to 0.69.0 diff --git a/internal/configconverter/remove_memory_ballast_key.go b/internal/configconverter/remove_memory_ballast_key.go index 10648b68d8..5e3ac5b975 100644 --- a/internal/configconverter/remove_memory_ballast_key.go +++ b/internal/configconverter/remove_memory_ballast_key.go @@ -51,7 +51,8 @@ func (RemoveMemoryBallastKey) Convert(_ context.Context, cfgMap *confmap.Conf) e out := map[string]any{} for _, k := range cfgMap.AllKeys() { if firstRegExp.MatchString(k) { - log.Println("[WARNING] `memory_ballast` parameter in extensions is deprecated. Please remove it from your configuration.") + log.Println("[WARNING] `memory_ballast` extension is deprecated. Please remove it from your configuration. " + + "See https://github.com/signalfx/splunk-otel-collector#from-0961-to-0970 for more details") continue } if secondRegExp.MatchString(k) { From 151f95826c6496becfbe66bf4507287869a7a4c0 Mon Sep 17 00:00:00 2001 From: Samiur Arif Date: Tue, 26 Mar 2024 14:50:57 -0700 Subject: [PATCH 3/4] Update README.md Co-authored-by: Antoine Toulme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b7f064f5f1..226bffbcf2 100644 --- a/README.md +++ b/README.md @@ -184,7 +184,7 @@ as a reference. If you haven't customized the `memory_ballast`, just remove it from the configuration. If you have customized it via `SPLUNK_BALLAST_SIZE_MIB` (or `extensions::memory_ballast::size_mib` config), you should - remove the `memory_ballast` extension and use `GOMEMLIMIT` env var to set a custom soft memory limit: + remove the `memory_ballast` extension and use the [`GOMEMLIMIT`](https://pkg.go.dev/runtime) the environment variable to set a custom soft memory limit: - To increase frequency of garbage collections: set `GOMEMLIMIT` to a higher value than the default 90% of total memory. - To decrease frequency of garbage collections: set `GOMEMLIMIT` to a lower value than the default 90% of total memory. From fe072e0b09ab6061e40d2fe187e72031d9c8002b Mon Sep 17 00:00:00 2001 From: Dmitrii Anoshin Date: Tue, 26 Mar 2024 15:39:35 -0700 Subject: [PATCH 4/4] Update README.md Co-authored-by: Aunsh Chaudhari --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 226bffbcf2..a9bebb9e91 100644 --- a/README.md +++ b/README.md @@ -184,7 +184,7 @@ as a reference. If you haven't customized the `memory_ballast`, just remove it from the configuration. If you have customized it via `SPLUNK_BALLAST_SIZE_MIB` (or `extensions::memory_ballast::size_mib` config), you should - remove the `memory_ballast` extension and use the [`GOMEMLIMIT`](https://pkg.go.dev/runtime) the environment variable to set a custom soft memory limit: + remove the `memory_ballast` extension and use the [`GOMEMLIMIT`](https://pkg.go.dev/runtime) environment variable to set a custom soft memory limit: - To increase frequency of garbage collections: set `GOMEMLIMIT` to a higher value than the default 90% of total memory. - To decrease frequency of garbage collections: set `GOMEMLIMIT` to a lower value than the default 90% of total memory.