Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[processor/memory_limiter] Common confusion when configuring soft limit #12063

Open
andrzej-stencel opened this issue Jan 10, 2025 · 1 comment · May be fixed by #12064
Open

[processor/memory_limiter] Common confusion when configuring soft limit #12063

andrzej-stencel opened this issue Jan 10, 2025 · 1 comment · May be fixed by #12064

Comments

@andrzej-stencel
Copy link
Member

Is your feature request related to a problem? Please describe.

I saw it more than once that users misconfigure the Memory Limiter processor by setting the spike limit to a large value, not realizing that soft limit is calculated as hard limit - spike limit.

Recent example: https://cloud-native.slack.com/archives/C01N6P7KR6W/p1736477043653559

processors:
  memory_limiter:
    check_interval: 1s
    limit_percentage: 80
    spike_limit_percentage: 75

In this case, assuming 1000 MiB total available memory, the soft limit will be set to 1000 * (0.80 - 0.75) = 50 MiB.

I presume the user wanted spike_limit_percentage: 5 and soft limit 1000 * (0.80 - 0.05) = 750 MiB.

Describe the solution you'd like

Perhaps we can improve the documentation.

Describe alternatives you've considered

We could change the way the component is configured, but I don't think it's needed. Happy to hear others' thoughts.

Additional context

The documentation already explicitly says it:

The soft limit value will be equal to (limit_mib - spike_limit_mib).

This sentence is a bit buried inside the description of the spike_limit_mib option. It is not mentioned in the spike_limit_percentage option. Perhaps that's why not every user finds it?

andrzej-stencel added a commit to andrzej-stencel/opentelemetry-collector that referenced this issue Jan 10, 2025
andrzej-stencel added a commit to andrzej-stencel/opentelemetry-collector that referenced this issue Jan 10, 2025
@andrzej-stencel
Copy link
Member Author

I've created #12064 that will hopefully eliminate the confusion. Let me know what you think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant