Menu

Post image 1
Post image 2
Post image 3
1 / 3
0

GOMAXPROCS Is Lying to Your Kubernetes Pod (Costing You CPU)

DEV Community·Gabriel Anhaia·about 1 month ago
#Mr6bAGGG
Reading 0:00
15s threshold

Book: The Complete Guide to Go Programming Also by me: Thinking in Go (2-book series) — Complete Guide to Go Programming + Hexagonal Architecture in Go My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools Me: xgabriel.com | GitHub You deploy a Go service to a Kubernetes cluster. The pod has resources.limits.cpu: "2" . You watch the dashboard. CPU usage hovers around 40%, well under the limit. p99 latency is 800ms. You stare at the flame graph. Most of the time is spent in scheduler code. The service is mostly idle and mostly slow at the same time. You have probably seen this exact pattern. The thing nobody told you is that your Go process thinks it has 64 cores. It is on a 64-core node. It does not know about the limits.cpu: "2" field. The Linux kernel knows. The container runtime knows. The Go runtime, before version 1.25, did not. This is the gap that has been costing teams CPU and tail latency for years.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More