Switch language한국어
Back to the list

GOMAXPROCS and Kubernetes: Go App Throttled, How to Fix It

TL;DR AI

Key summary

2 min read
  1. Go services in Kubernetes can hit latency spikes when GOMAXPROCS follows the node CPU count instead of the pod’s CPU quota.

  2. That mismatch can trigger Linux CFS throttling, causing intermittent freezes and worse tail/P99 latency under load.

  3. The fix is to set GOMAXPROCS to the container limit, either manually or with Uber’s automaxprocs.

  4. Go 1.25 adds cgroup-aware runtime behavior to align concurrency with container CPU limits.

Read the original