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

Closed
wants to merge 1 commit into from
Closed

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 force-pushed the 3735 branch 2 times, most recently from 5aed3cf to 0854af2 Compare February 25, 2024 22:54
@uhthomas uhthomas changed the title chore: match Linux container CPU quota chore: use Linux container CPU quota Feb 25, 2024
@uhthomas uhthomas force-pushed the 3735 branch 2 times, most recently from 76c626f to 3a05ee5 Compare February 25, 2024 23:17
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?

@gotjosh
Copy link
Member

gotjosh commented Oct 24, 2024

Duplicate of #3837

@gotjosh gotjosh marked this as a duplicate of #3736 Oct 24, 2024
@gotjosh gotjosh closed this Oct 24, 2024
@uhthomas
Copy link
Author

Duplicate of #3736

Wrong link? You've just marked it as a duplicate of itself.

@gotjosh gotjosh marked this as a duplicate of #3837 Oct 24, 2024
@gotjosh
Copy link
Member

gotjosh commented Oct 24, 2024

Thanks, I have updated the link now.

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
4 participants