GOMAXPROCS and a CPU-bound job on a 32-core box
We have a CPU-heavy batch job running in a container on a 32-core host. Go 1.22 defaults GOMAXPROCS to 32, but the container has a 4-core CPU quota. We're seeing tons of context switching and worse throughput than expected. Should I set GOMAXPROCS manually? I'd like to understand the mechanism before I go changing settings again, since the job behaves differently on my machine.
4 replies