Pre-Production Cost Hygiene: Stop Paying for Idle Environments
Staging and QA often cost as much as prod. Here’s how to cut that in half without slowing releases.
The great debate: Should you set CPU limits in Kubernetes? We dive into CFS quotas, throttling latency, and why 'Requests Only' might be the better FinOps move.
In the Kubernetes world, there’s a piece of advice that gets repeated like gospel: “Always set Requests and Limits for everything.”
It sounds logical. Requests guarantee resources; Limits prevent a rogue pod from eating the whole node. Safety first, right?
But for CPU, setting limits can actually hurt your performance and waste money.
Kubernetes implements CPU limits using the Linux kernel’s CFS (Completely Fair Scheduler) Bandwidth Control.
Here is how it works:
1000m (1 core).100ms).100ms of runtime every period.The Trap: If your app receives a burst of traffic and tries to use 20ms of CPU in the first 5ms of the cycle, it might get throttled for the rest of that period—even if the host machine is completely idle!
This is called Micro-bursting.
Many Kubernetes experts (including folks at Zalando and Buffer) now advocate for removing CPU limits entirely for latency-sensitive workloads.
The Setup:
Why it works:
Request share.The fear is that one runaway process will starve everyone else.
But remember: Requests provide a guarantee. Even without a limit, if Pod A requests 1 core and Pod B goes rogue, the kernel ensures Pod A still gets its 1 core. Pod B only eats the spare capacity.
Note: This logic applies to CPU (a compressible resource). For Memory (incompressible), you MUST set limits equal to requests, or you risk OOM kills.
Stop blindly setting CPU limits.
container_cpu_cfs_throttled_seconds_total metric.Your users don’t care about your “fairness” policy. They care about speed. Give your apps the breathing room they need.
Founder & CEO
Staging and QA often cost as much as prod. Here’s how to cut that in half without slowing releases.
Use policies, quotas, and network controls that keep costs predictable while preserving developer autonomy.
Is it cheaper to self-host Focalboard on AWS EKS or just pay for Notion/Trello? We break down the TCO, including hidden cluster costs.
Get Kubernetes and ECS cost tactics delivered weekly.