Container Size Calculator
Right-size CPU and memory requests and limits for your containers.
Recommended Resources
CPU Request
100m
guaranteed
CPU Limit
500m
maximum
Memory Request
128Mi
guaranteed
Memory Limit
256Mi
maximum
Request:Limit Ratio
1:5 CPU, 1:2 Memory
Total Cluster Resources (Requests × Replicas)
Total CPU
200m
Total Memory
256Mi
Kubernetes YAML
resources:
requests:
cpu: "100m"
memory: "128Mi"
limits:
cpu: "500m"
memory: "256Mi" Common Resource Profiles by Workload
| Workload | CPU Req | CPU Limit |
|---|---|---|
| Web Server | 100m | 500m |
| API Service | 250m | 1000m |
| Background Worker | 500m | 2000m |
| Database | 500m | 2000m |
| Cache (Redis) | 100m | 500m |
| Message Queue | 250m | 1000m |
How to Use This Calculator
1
Select workload type
Web server, API, worker, database, etc.
2
Choose runtime & traffic
Language affects memory, traffic affects CPU
3
Copy the YAML
Paste directly into your K8s manifests
Requests ≠ Limits
Requests are guaranteed resources (used for scheduling). Limits are the maximum allowed. Setting requests too high wastes cluster capacity. Setting limits too low causes OOMKilled and CPU throttling. Start with a 1:2 to 1:4 ratio.
The Essentials
Requests vs Limits
Requests = guaranteed. Limits = maximum allowed
OOMKilled
Container exceeds memory limit → killed immediately
CPU Throttling
Container exceeds CPU limit → throttled, not killed
QoS Classes
Guaranteed (req=limit), Burstable (req<limit), BestEffort (none)
JVM Needs More
Java apps need 2-3x memory vs Go/Rust for same work
Start Small
Begin with low requests, monitor actual usage, then adjust
Frequently Asked Questions
Sources & References
The resource profiles and runtime multipliers in this calculator are based on official documentation, production benchmarks, and community best practices:
- Kubernetes Docs: Resource Management for Pods and Containers — Official guide on CPU/memory requests and limits
- Google Cloud: Kubernetes Best Practices — Resource Requests and Limits — Recommended ratios and sizing strategies
- Red Hat: Node.js 20+ Memory Management in Containers — Node.js container-aware memory behavior
- Xebia: A Practical Guide to Kubernetes and JVM Integration — JVM memory overhead, heap sizing, and GC in containers
- Datadog: Java on Containers — JVM memory breakdown and container best practices
- Running Rust in Kubernetes: Production Deployment Guide — Rust minimal memory footprint and resource configs
- Troubleshooting High Memory Usage with ASP.NET Core on Kubernetes — .NET GC modes and memory behavior in containers
- Redis Docs: Sizing on Kubernetes — Redis resource recommendations for Kubernetes
- Kubernetes Requests and Limits for Postgres — PostgreSQL resource sizing in Kubernetes
- RabbitMQ Docs: Memory Threshold and Limit — Message queue memory management in containers
- Sysdig: Understanding Kubernetes Limits and Requests — Request/limit ratios and sizing best practices
Running containers in production?
Warden monitors your containerized services externally with 10-second health checks.
Join the waitlist →