Docker Container Resource Calculator
Calculate recommended CPU and memory requests and limits for Docker containers and Kubernetes pods. Pick a workload preset or enter custom values, cap them to your host capacity, and copy a ready docker run command and Kubernetes resources block.
Input
Output
| Property | Value |
|---|---|
| No data yet | |
Guides
The Docker Container Resource Calculator turns a plain description of your host and workload into concrete CPU and memory numbers for Docker and Kubernetes. Tell it how many cores and how much RAM the machine has, how many containers will share it, and what kind of workload you are running — and it recommends per-container resource requests and limits, then hands you a ready-to-run docker run command and a Kubernetes resources: block you can paste straight into a manifest.
It is built for the moment you are about to deploy and are not sure what to put after --cpus, --memory, or under resources.limits. Instead of guessing, you get sensible defaults that are automatically capped to what the host can actually provide per container.
How to use it
- Choose a Workload Type. Presets cover common cases: web server, background worker, database, cache (Redis/Memcached), and ML inference. Each carries tuned request/limit values.
- Enter your Host CPU (cores), Host RAM (GB), and the Number of Containers that will run on the host.
- To set your own figures, pick Custom and fill in CPU request, CPU limit, memory request, and memory limit directly.
Results update as you type. The table shows requests and limits in both cores and millicores, memory in MB/GB, and the total draw across all containers versus the host capacity. If the requested limits would over-subscribe the host, the calculator caps them to an even per-container share and flags a warning row so you know the numbers were adjusted.
What is the difference between a request and a limit?
A request is the amount of CPU or memory the scheduler guarantees the container — it is used to decide where the container fits. A limit is the hard ceiling: the container is throttled at the CPU limit and killed (OOM) if it exceeds the memory limit. Requests should reflect normal usage; limits protect the host from a runaway container.
How are values capped to the host?
Each container is allotted at most an even share of the host: host cores divided by container count, and host RAM divided by container count. If a preset or custom limit is larger than that share, it is reduced to the share and a warning is shown. This keeps the sum of all container limits from exceeding what the machine physically has.
Can I use the output with Docker Compose?
Yes. The --cpus and --memory values map directly to Compose's deploy.resources.limits (cpus and memory), and the millicore/Mi values match Kubernetes conventions one-to-one.
Are these numbers production-ready?
They are a solid starting point, not a substitute for load testing. Real memory and CPU footprints depend on your image and traffic, so measure actual usage and tune requests and limits before relying on them in production.
Privacy
Every calculation runs entirely in your browser. Your host specs and container settings are never uploaded, logged, or stored — nothing leaves your device.