Container Resource Calculator
Set Kubernetes CPU and memory requests and limits and determine QoS class.
About Container Resource Calculator
Requests drive scheduling and eviction priority while limits cap actual usage. Guaranteed QoS requires requests to equal limits, which protects the pod from eviction but wastes headroom. CPU limits cause throttling rather than failure while memory limits cause hard termination, so the two should be set with different degrees of caution.
Formula
Container Resource
Requests sit just above observed use; limits allow for peaks unless QoS is Guaranteed
- Guaranteed
- Requests equal limits, giving the highest eviction protection
- Burstable
- Limits above requests, allowing peaks but risking throttling
Worked example
With the default values below, Container Resource Calculator returns CPU Request of 300. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Observed CPU useminimum 1 m
- 250 m
- Observed memory useminimum 1 MiB
- 400 MiB
- Peak to average ratioaccepts 1–10 x
- 2.5 x
- Replicasminimum 1
- 4
- QoS targetone of Guaranteed, Burstable
- Burstable
Results
- CPU Request
- 300 m
- CPU Limit
- 625 m
- Memory Request
- 500 MiB
- Memory Limit
- 1,000 MiB
- Total Cluster CPU Reserved
- 1.200 cores
Step by step
- 1Values used
- 2Container Resource
- 3CPU Request= 300 m
- 4CPU Limit= 625 m
- 5Memory Request= 500 MiB
- 6Memory Limit= 1,000 MiB
- 7Total Cluster CPU Reserved= 1.200 cores
Assumptions and limits
- The result is derived only from the 5 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 3 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
How is Container Resource calculated?
Requests sit just above observed use; limits allow for peaks unless QoS is Guaranteed Requests drive scheduling and eviction priority while limits cap actual usage. Guaranteed QoS requires requests to equal limits, which protects the pod from eviction but wastes headroom.
Why does Container Resource matter?
CPU limits cause throttling rather than failure while memory limits cause hard termination, so the two should be set with different degrees of caution.
What values do I need to enter?
This calculator takes 5 inputs: Observed CPU use, Observed memory use, Peak to average ratio, Replicas, QoS target. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
Related Calculators
You might also need
- Redis Memory CalculatorCommonly used together
- Database Connection Pool CalculatorCommonly used together
- Elasticsearch Shard CalculatorCommonly used together
- WebSocket Connection CalculatorAlso in Developer & Networking
- Password GeneratorAlso in Developer & Networking
- Helm Chart Values CalculatorAlso in Developer & Networking
