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

Automatically set GOMAXPROCS #31920

Open
Tracked by #3640 ...
cmacknz opened this issue Jun 13, 2022 · 4 comments
Open
Tracked by #3640 ...

Automatically set GOMAXPROCS #31920

cmacknz opened this issue Jun 13, 2022 · 4 comments
Labels
enhancement estimation:Day Task that represents a day of work. Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Comments

@cmacknz
Copy link
Member

cmacknz commented Jun 13, 2022

Describe the enhancement:
Automatically set GOMAXPROCS when beats are run in containers with a CFS quota set to minimize CPU throttling.

See elastic/apm-server#7967 and elastic/apm-server#8278 for more context. https://github.com/uber-go/automaxprocs can be used to easily add this feature.

Describe a specific use case for the enhancement or feature:
Setting GOMAXPROCS based on the configured CPU quota makes performance more predictable in containerized environments. Kubernetes deployments are particularly likely to experience problems from unoptimized GOMAXPROCS configurations.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@cmacknz
Copy link
Member Author

cmacknz commented Feb 24, 2023

Increasing the priority of this issue as I have been running into more cases of Beats and Elastic Agent performing poorly because of improperly tuned Kubernetes CPU quota configurations.

@joshdover
Copy link
Contributor

@cmacknz In those SDHs that you mention, have customers been successful with setting GOMAXPROCS manually to solve their problem?

@cmacknz
Copy link
Member Author

cmacknz commented Nov 14, 2023

I haven't had this come up in a while, this is still a well known performance optimization though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement estimation:Day Task that represents a day of work. Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

No branches or pull requests

5 participants