alertmanager icon indicating copy to clipboard operation
alertmanager copied to clipboard

chore: use Linux container CPU quota

Open uhthomas opened this issue 1 year ago • 3 comments

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 avatar Feb 25 '24 22:02 uhthomas

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

TheMeier avatar Mar 10 '24 11:03 TheMeier

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

roidelapluie avatar Mar 14 '24 10:03 roidelapluie

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?

TheMeier avatar Mar 14 '24 11:03 TheMeier