From da5b68ad43e305566a956b8693213cd3209ab269 Mon Sep 17 00:00:00 2001 From: Andrzej Stencel Date: Fri, 10 Jan 2025 17:40:16 +0100 Subject: [PATCH] [chore] [processor/memory_limiter] docs: improve examples (#12064) Fixes https://github.com/open-telemetry/opentelemetry-collector/issues/12063 --- processor/memorylimiterprocessor/README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/processor/memorylimiterprocessor/README.md b/processor/memorylimiterprocessor/README.md index be875843624..661d86508c1 100644 --- a/processor/memorylimiterprocessor/README.md +++ b/processor/memorylimiterprocessor/README.md @@ -117,14 +117,21 @@ processors: spike_limit_mib: 800 ``` +- Hard limit will be set to **4000 MiB**. +- Soft limit will be set to 4000 - 800 = **3200 MiB**. + ```yaml processors: memory_limiter: check_interval: 1s - limit_percentage: 50 - spike_limit_percentage: 30 + limit_percentage: 80 + spike_limit_percentage: 15 ``` +On a machine with 1000 MiB total memory available: + +- Hard limit will be set to 1000 * 0.80 = **800 MiB**. +- Soft limit will be set to 1000 * 0.80 - 1000 * 0.15 = 1000 * 0.65 = **650 MiB**. + Refer to [config.yaml](../../internal/memorylimiter/testdata/config.yaml) for detailed examples on using the processor. -