Skip to content
Calcrivo

Pod CPU Request Calculator

Derive a Kubernetes pod's CPU request from measured average usage and a safety factor, so the scheduler reserves enough headroom without wasting capacity.

Inputs

millicores

Average CPU usage observed over a representative window (e.g. from metrics-server or Prometheus).

×

Multiplier applied to the average to absorb normal variance. Typically 1.2–1.5×.

pods

Number of replicas to size in total.

Recommended CPU Request

260millicores

Recommended CPU Request

0.260cores

Headroom Above Average

60millicores

Total Request Across Replicas

0.78cores

Step by step

  1. CPU request = avg usage × safety factor

    200m × 1.3

    = 260m

  2. Headroom above measured average

    260m − 200m

    = 60m

  3. Total request across replicas

    260m × 3

    = 780m (0.78 cores)

How it works

The Kubernetes scheduler places pods based on their CPU request, not their limit or actual usage. Setting the request equal to raw average usage leaves no room for normal fluctuation and risks CPU throttling under the node's CFS quota. Multiplying the measured average by a safety factor of 1.2–1.5× gives the scheduler an honest reservation that reflects real-world variance without permanently over-provisioning the way a peak-based request would.

Formula

request = avgUsage × safetyFactor

\bar{U}
Measured average CPU usage in millicores
S
Safety factor multiplier (typically 1.2–1.5×)
R
Recommended CPU request in millicores

Frequently Asked Questions

Why not just request the peak usage instead of the average?

Requests affect bin-packing and cost — every millicore requested is reserved on a node whether used or not. Peak-based requests waste capacity; average-based requests with a modest safety factor balance efficiency with resilience to normal variance.

What safety factor should I use?

1.2–1.5× is a reasonable default for steady workloads. Bursty or latency-sensitive services may warrant 1.5–2×, while highly predictable batch workloads can use closer to 1.1×.

How do I measure average CPU usage accurately?

Use a metrics window that spans multiple business cycles (at least 7 days including peak traffic days) from Prometheus/metrics-server, and average per-pod usage rather than node-level usage.

You might also need