
Choosing the right amount of RAM for your web server is one of the most impactful decisions you'll make when setting up or scaling your infrastructure. Too little and your server will struggle under load, causing slowdowns or crashes. Too much and you're overpaying for resources you'll never use.
This guide breaks down exactly how much RAM you need based on your website type, traffic levels, and technology stack.
RAM (Random Access Memory) is your server's short-term working memory. Every active process, open database connection, cached file, and running application takes up a slice of it.
When your server runs out of available RAM, one of two things happens:
Understanding your server performance metrics is the first step to knowing whether your current RAM allocation is actually sufficient.
There's no one-size-fits-all answer, but here are solid starting points:
| Use Case | Recommended RAM |
|---|---|
| Static HTML site | 512MB – 1GB |
| Small WordPress site | 1GB – 2GB |
| Medium WordPress / CMS | 2GB – 4GB |
| E-commerce store | 4GB – 8GB |
| High-traffic application | 8GB – 16GB+ |
| Large SaaS / enterprise | 32GB+ |
Apache uses a process-based model, spawning a new process (or thread) for each connection. This makes it memory-hungry under load. A single Apache worker process typically uses 10–20MB of RAM.
If you're running 50 concurrent connections, that's potentially 1GB just for Apache alone — before your application, database, or PHP processes use a single byte.
Recommended minimum for Apache: 1GB for low-traffic sites, 4GB+ for anything with meaningful concurrent visitors.
Nginx uses an event-driven, asynchronous architecture that handles thousands of connections with far less memory. A typical Nginx worker uses under 5MB of RAM.
For most use cases, Nginx is the more memory-efficient choice. Read our guide to monitoring your Nginx server to understand how to keep an eye on it once it's running.
Recommended minimum for Nginx: 512MB for small sites, 2GB+ for higher traffic.
WordPress is one of the most common culprits of memory-related server issues. A default PHP-FPM process can use 30–80MB per worker. If you're running 20 workers, that's up to 1.6GB for PHP alone.
Add MySQL on the same server and you'll want:
Node.js is single-threaded but can hold a lot of in-memory state. A lightweight Node app might use 50–150MB, but apps with large dependency trees or in-memory caching can balloon to 500MB+.
Recommended: 1–2GB for small Node apps, 4GB+ for production services with real traffic.
Python applications typically consume 50–200MB per worker process. If you're running Gunicorn with 4 workers, budget at least 800MB just for the application layer.
Check out our guide to monitoring Django applications if you're running a Python-based stack.
Running your database (MySQL, PostgreSQL, MongoDB) on the same machine as your web server compounds memory usage significantly. MySQL's InnoDB buffer pool alone can consume gigabytes of RAM.
Best practice: Separate your web server and database onto different machines as your traffic grows, or use a managed database service.
Your baseline RAM usage tells only part of the story. A traffic spike — from a viral post, a product launch, or a sale — can multiply your concurrent connections by 10x or more in minutes.
Signs your server is running low on RAM:
free -h on Linux)dmesg for OOM killer logs)This is exactly why having a reliable uptime monitor in place is so important. If you're not monitoring your site 24/7, you won't know about RAM-related outages until a customer complains. Setting up uptime monitoring takes minutes and gives you immediate visibility.
On a Linux server, run:
free -h
This shows total, used, and available RAM. If your "available" column is consistently close to zero, it's time to either upgrade your plan or optimise your stack.
You can also check which processes are consuming the most memory with:
ps aux --sort=-%mem | head -20
Before throwing money at more RAM, try these optimisations:
innodb_buffer_pool_size if it's over-allocatedOur cloud server monitoring guide covers more strategies for keeping your server healthy under load.
If you're on shared hosting, you often have no control over RAM allocation — and no visibility into how much you're actually using. Upgrading to a VPS or dedicated server gives you full control over your resources and the ability to monitor them properly.
Most quality VPS providers offer plans starting at 1–2GB RAM, which is sufficient for a small-to-medium website. As your traffic grows, you can scale vertically (more RAM on the same server) or horizontally (more servers behind a load balancer).
The right answer depends on your stack, your traffic, and how much headroom you want before problems occur. When in doubt, start with more than you think you need — downtime caused by resource exhaustion is one of the most disruptive issues any website owner can face.
And once your server is set up, make sure you're monitoring it. Domain Monitor checks your website every minute from multiple locations around the world, alerting you the moment something goes wrong — so you can act before your users even notice.
Generative AI creates new content — text, images, code, and more. This guide explains how it works, what tools are available, and where it's genuinely useful versus overhyped.
Read moreCursor AI is an AI-powered code editor built on VS Code. Learn what it does, how it works, and whether it's the right tool for your development workflow.
Read moreClaude Opus is Anthropic's most capable AI model, built for complex reasoning and demanding tasks. Learn what it does, how it compares, and when to use it.
Read moreLooking to monitor your website and domains? Join our platform and start today.