Docker RAM Planner
Plan container memory usage against your available RAM.
Add Container
Services
Custom
Total RAM Used
0 MB
Remaining
3584 MB
System Reserved
512 MB
Fits comfortably
Good headroom for scaling and memory spikes.
What is a Docker RAM calculator?
A Docker RAM calculator estimates the total memory needed to run a set of Docker containers on a server or homelab machine. Each containerized service (database, web server, monitoring, media server) has specific memory requirements. This tool helps you plan your hardware needs by summing up container memory allocations with overhead for the host operating system and Docker engine.
Running out of RAM is the most common cause of Docker container crashes and server instability. Unlike CPU, which can be time-shared, RAM is a hard limit โ when a container exceeds its memory allocation, Docker kills it (OOM โ Out of Memory). Proper planning prevents unexpected downtime and helps you decide whether to upgrade your server or optimize your stack.
How to use this tool
Add the containers you plan to run and specify their memory requirements. The tool sums the total, adds overhead for the OS and Docker engine, and shows the recommended total RAM. It warns if your planned configuration exceeds typical hardware configurations.
Common container memory requirements
- PostgreSQL: 256MB-1GB+ depending on database size and query complexity.
- Nginx/Caddy: 50-128MB for typical reverse proxy use.
- Grafana + Prometheus: 256MB + 512MB-2GB for monitoring stacks.
- Home Assistant: 256MB-512MB for home automation.
- Plex/Jellyfin: 1-4GB depending on transcoding and library size.
Memory optimization tips
Set memory limits on all containers (docker run --memory=512m) to prevent any single container from consuming all available RAM. Use Alpine-based images which are smaller and use less memory. Monitor actual usage with 'docker stats' before making final sizing decisions. Leave at least 1-2GB free for the host OS, file caching, and Docker overhead. Swap space can provide a safety net but should not be relied upon for normal operations.
Frequently asked questions
How much RAM overhead does Docker itself need?
The Docker engine itself uses about 100-200MB of RAM. The host Linux OS typically needs 500MB-1GB for a minimal server installation. Combined, plan for about 1-1.5GB of overhead before container allocations. On a 16GB server, you realistically have about 14-15GB available for containers.
What happens when a container runs out of memory?
When a container exceeds its memory limit, the Linux kernel's OOM (Out of Memory) killer terminates it. Docker reports this as an exit code 137. Without memory limits, a misbehaving container can consume all available system RAM, potentially crashing other containers and the host OS. Always set explicit memory limits and monitor usage.