Go 1.25 introduces container-aware GOMAXPROCS defaults that automatically adjust based on container CPU limits instead of total machine cores. This prevents CPU throttling in containerized environments, improves tail latency, and provides better out-of-the-box behavior for production workloads. The runtime now periodically checks and adjusts GOMAXPROCS when CPU limits change, while still allowing manual override through environment variables or runtime calls.

8m read timeFrom go.dev
Post cover image
Table of contents
GOMAXPROCS ¶Container Orchestration ¶New default ¶Slightly different models ¶CPU Requests ¶Should I set a CPU limit? ¶Conclusion ¶
1 Comment

Sort: