Grokking Concurrency in Go
0% completed
GOMAXPROCS and Containers
A team moves a Go service into Linux containers. Each container is given a CPU limit of 2, and the containers run on machines with 64 logical CPUs. The service was built in a module whose go.mod declares go 1.24, so its runtime sets GOMAXPROCS to 64. Under load, 64 threads run Go code at the same time inside a container that may use the CPU time of only two.
The Linux kernel enforces the limit as a budget of CPU time in every short period. The 64 threads use up the budget early in each period, and the kernel then stops every thread in the container until the next period begins
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%