Namespace Resource Calculator
Sum up total CPU and memory consumption across all workloads in a namespace.
About Namespace Resource Calculator
A ResourceQuota caps the total requests and limits summed across every pod in a namespace, preventing one team from starving others sharing the cluster. This calculator multiplies per-pod requests by pod count to get namespace totals, then compares those totals against the configured CPU and memory quotas so you can see utilization before the API server starts rejecting new pod creations.
Formulas
Total CPU request
totalCPU = pods × perPodCPU
- N
- Number of pods in the namespace
- C_p
- Per-pod CPU request in millicores
- T_c
- Total namespace CPU request in millicores
Quota utilization
cpuQuotaUsed% = (totalCPU / quotaCPU) × 100
- T_c
- Total namespace CPU request
- Q_c
- Configured CPU quota
- U_c
- CPU quota utilization percentage
Worked example
With the default values below, Namespace Resource Calculator returns Total Namespace CPU Request of 8.00. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Pod Countaccepts 0–100,000 pods
- 40 pods
- Per-Pod CPU Requestaccepts 0–64,000 millicores
- 200 millicores
- Per-Pod Memory Requestaccepts 0–1,000,000 MiB
- 256 MiB
- ResourceQuota CPU Limitaccepts 0–10,000 cores
- 16 cores
- ResourceQuota Memory Limitaccepts 0–100,000 GiB
- 32 GiB
Results
- Total Namespace CPU Request
- 8.00 cores
- Total Namespace Memory Request
- 10.00 GiB
- CPU Quota Used
- 50.0%
- Memory Quota Used
- 31.3%
- CPU Quota Exceeded
- false
- Memory Quota Exceeded
- false
Step by step
- 1Total CPU request= 8.00 cores
- 2Total memory request= 10.00 GiB
- 3CPU quota utilization= 50.0%
- 4Memory quota utilization= 31.3%
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 2 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
What happens when a namespace hits its ResourceQuota?
The API server rejects any new pod (or object with a resource request) that would push the namespace total above quota, returning a 403 Forbidden with a quota-exceeded message — existing pods are not evicted.
Does ResourceQuota apply to limits, requests, or both?
You can configure quotas separately for requests.cpu/requests.memory and limits.cpu/limits.memory, plus object counts like pods, services and persistentvolumeclaims — this calculator models the requests side.
How should teams plan headroom under a shared quota?
Leave 15-20% headroom below the hard quota for rolling deployments, since a new ReplicaSet's pods briefly coexist with the old ones during a rollout and temporarily double-count requests.
