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

Set GOMEMLIMIT when running in a containerized environment #14475

Open
marclop opened this issue Oct 30, 2024 · 0 comments
Open

Set GOMEMLIMIT when running in a containerized environment #14475

marclop opened this issue Oct 30, 2024 · 0 comments
Labels
enhancement impact:high Short-term priority; add to current release, or definitely next. performance urgency:medium

Comments

@marclop
Copy link
Contributor

marclop commented Oct 30, 2024

Descripiton

how do we look at setting soft memory limit for apm-server https://pkg.go.dev/runtime/debug#SetMemoryLimit based on total memory %.

@1pkg brought up that we should probably be setting GOMEMLIMIT to 85-90% of the container memory limit (or the detected total memory when not running in containerized environments). It would avoid the APM server running out of memory when memory usage approaches that GOMEMLIMIT.

If GOMEMLIMIT is set, then we should respect the setting and not set it ourselves in the code.

Arguably, this is something that elastic-agent could do, but if we do it in APM Server, then this limit would apply to the process regardless of the mode/manner it is run.

@marclop marclop added enhancement performance impact:high Short-term priority; add to current release, or definitely next. urgency:medium labels Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement impact:high Short-term priority; add to current release, or definitely next. performance urgency:medium
Projects
None yet
Development

No branches or pull requests

1 participant