TLDR Web Dev · MISCELLANEOUS

CONTAINER-AWARE GOMAXPROCS

go.dev8 min read

Summary from the TLDR Web Dev newsletter

Go 1.25 introduces container-aware GOMAXPROCS defaults that automatically adjust based on container CPU limits rather than total machine cores, helping avoid throttling issues that can impact application performance. Previously, Go applications in containers would often try to use more CPU than allowed by container limits, causing the Linux kernel to throttle execution and increase tail latency. The new default sets GOMAXPROCS to match the container's CPU limit when it's lower than the total core count, providing better out-of-the-box behavior for containerized workloads.