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

chore: use Linux container CPU quota #3736

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

uhthomas
Copy link

Go is not cgroup aware and by default will set GOMAXPROCS to the number of available threads, regardless of whether it is within the allocated quota. This behaviour causes high amount of CPU throttling and degraded application performance.

Fixes: #3735

@uhthomas uhthomas changed the title chore: match Linux container CPU quota chore: use Linux container CPU quota Feb 25, 2024
Go is not cgroup aware and by default will set GOMAXPROCS to the number
of available threads, regardless of whether it is within the allocated
quota. This behaviour causes high amount of CPU throttling and degraded
application performance.

Fixes: prometheus#3735

Signed-off-by: Thomas Way <[email protected]>
@TheMeier
Copy link
Contributor

Can you make the output maxprocs: Updating GOMAXPROCS=2: determined from CPU quota getting put in the logs instead of stdout?
https://github.com/uber-go/automaxprocs/blob/v1.5.3/automaxprocs.go#L32

@roidelapluie
Copy link
Member

LGTM, but I would prefer to see this behind a flag

@TheMeier
Copy link
Contributor

Can you make the output maxprocs: Updating GOMAXPROCS=2: determined from CPU quota getting put in the logs instead of stdout? https://github.com/uber-go/automaxprocs/blob/v1.5.3/automaxprocs.go#L32

D'oh stdout is the log, right? So basically just adapt the tests?

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

Successfully merging this pull request may close these issues.

Alertmanager should be cgroup aware
3 participants