Go 1.25's Container-Aware GOMAXPROCS: Recheck Your Old Runtime Override
Before Go 1.25, the default GOMAXPROCS generally followed the number of logical CPUs visible to the process. In a Linux container with a lower CPU quota, that could mean the Go scheduler tried to run more work in parallel than the container was allowed to consume. The kernel throttled the process, which can contribute to latency spikes.
Go 1.25 changes the default: on Linux, the runtime can take the cgroup CPU bandwidth limit into account and periodically update its choice when limits change. That behavior applies only when the application has not set GOMAXPROCS manually or called the runtime setter. An old environment variable can therefore disable the smarter default without anyone noticing.
During an upgrade, inspect deployment manifests, base images, Helm values, and startup scripts for GOMAXPROCS overrides. Compare the configured value with CPU requests and limits. The Go runtime uses the CPU limit, not Kubernetes CPU requests, for this behavior. If a service intentionally pins parallelism for measured reasons, document why and re-benchmark under the new version.
Watch throttling and tail latency before and after rollout. A lower effective parallelism may improve latency under a quota while reducing peak throughput in a different workload. Verify autoscaling behavior too: runtime awareness does not replace the need to set realistic CPU limits and service-level resource requests.
The Go 1.25 release notes and container-aware GOMAXPROCS article explain the Linux cgroup behavior, periodic updates, and opt-out controls.