Over-provisioning wastes money. Under-provisioning causes outages. This guide helps you estimate the CPU, RAM, storage, and bandwidth your application actually needs, with formulas and real-world benchmarks for common workloads.
The Estimation Process
- Identify your application stack and its base resource consumption
- Estimate traffic volume and concurrent users
- Calculate resource needs per request
- Add overhead for the operating system and background tasks
- Include a safety margin (30-50%)
RAM Estimation
Base OS Consumption
# Minimal Ubuntu 24.04 server uses approximately:
# - Kernel + system services: ~200-300MB
# - SSH daemon: ~5MB
# - systemd + journald: ~50MB
# Total base: ~300-400MB
# Check current memory usage on a fresh server:
free -h
ps aux --sort=-%mem | head -20
Per-Application RAM Estimates
# Web Servers
# Nginx: ~5-10MB base + ~2MB per worker process
# Apache: ~20-40MB base + ~10-25MB per worker process (prefork)
# LiteSpeed: ~20MB base + ~5MB per worker
# Application Runtimes
# PHP-FPM: ~30-50MB per worker process
# Node.js: ~50-100MB per process (varies heavily by app)
# Python/Gunicorn: ~50-80MB per worker
# Java/Spring: ~256-512MB minimum heap
# Databases
# MySQL 8: ~400MB default (innodb_buffer_pool_size)
# PostgreSQL 16: ~128MB default (shared_buffers)
# Redis: ~3MB base + data size
# MongoDB: ~500MB default (WiredTiger cache)
RAM Calculation Formula
# Total RAM = OS Base + Web Server + App Workers + Database + Cache + 30% Safety
# Example: WordPress site with 50 concurrent users
# OS Base: 400MB
# Nginx: 20MB (4 workers x 5MB)
# PHP-FPM: 400MB (10 workers x 40MB)
# MySQL: 512MB (innodb_buffer_pool_size)
# Redis (optional): 100MB (session/object cache)
# Subtotal: 1,432MB
# + 30% safety: 1,862MB
# Recommendation: 2GB RAM minimum, 4GB comfortable
CPU Estimation
# CPU needs depend on workload type:
# I/O-bound (most web apps):
# - Spend most time waiting for database/disk/network
# - 1-2 vCPUs handles surprisingly high traffic
# - Example: WordPress serves ~100-200 req/sec on 2 vCPUs
# CPU-bound workloads:
# - Video transcoding, image processing, ML inference
# - Need more vCPUs, benefit from faster clock speeds
# - Example: ffmpeg transcoding uses 100% of available cores
# Benchmark your application:
ab -n 1000 -c 50 http://localhost/
wrk -t4 -c100 -d30s http://localhost/
Storage Estimation
# Calculate storage needs:
# OS + packages: 2-5GB
# Application code: 50MB - 2GB (including dependencies)
# Database: Varies (see below)
# Logs: 1-10GB (depends on traffic and rotation)
# User uploads: Varies (plan for growth)
# Backups (local): 2-3x database size
# Database size estimation:
# 1,000 users with profiles: ~10MB
# 100,000 products with images: ~5GB (metadata) + image storage
# 1M rows simple table: ~100-500MB
# Application logs (1 year): ~5-20GB
Bandwidth Estimation
# Bandwidth = Average Page Size x Requests per Day x Overhead Factor
# Average page sizes (2025):
# Static HTML page: ~500KB
# WordPress page: ~2-3MB
# SPA (React/Vue): ~1-2MB initial, ~50KB subsequent
# API response: ~5-50KB
# Example calculation:
# 10,000 daily visitors x 5 pages x 2MB avg = 100GB/day = 3TB/month
Common Workload Recommendations
| Workload | vCPU | RAM | Storage | Monthly Transfer |
|---|---|---|---|---|
| Static website | 1 | 512MB | 10GB | 500GB |
| WordPress (small) | 1 | 2GB | 25GB | 1TB |
| WordPress (medium) | 2 | 4GB | 50GB | 3TB |
| Node.js API | 2 | 2GB | 20GB | 2TB |
| Django/Rails app | 2 | 4GB | 40GB | 2TB |
| E-commerce (WooCommerce) | 4 | 8GB | 80GB | 5TB |
| Minecraft server (20 players) | 4 | 8GB | 30GB | 2TB |
| CI/CD runner | 4 | 8GB | 100GB | 5TB |
Start Small, Scale Smart
- Deploy with your best estimate — Use the guidelines above
- Monitor actual usage for 1-2 weeks — Use htop, df, vnstat
- Right-size based on data — Scale up or down based on real metrics
- Plan for peaks — If your traffic spikes 3x during promotions, size for 2x average