Get the latest tech news
CPU Throttling for containerized Go applications explained
GOMAXPROCS value under a container is not what you think it is
Even in this scenario, without an appropriate value for GOMAXPROCS, your Go application still sees all cores on the node and thus, spawns the same number of machine threads to schedule work. This is a one-line import into the cmd of your application which sets your GOMAXPROCS at startup time by reading the cgroup quota information inside the container. I expect this to be eventually incorporated into the runtime, given that everyone almost universally deploys Go in containers and the fact that other languages like Java have followed suit and made JVM CFS aware.
Or read this on Hacker News