How much RAM does my VPS need?
It depends what is running, but free -h on an existing server and a look at what each extra service costs gets you a real answer fast.
There is no single figure that fits every VPS, because it depends entirely on what the server is running — the operating system itself is a small, fairly fixed cost, and everything on top of it is what actually varies. If you already have a server running something similar to what you plan to deploy, free -h will give you a far more accurate answer than any general rule.
What actually consumes memory
- The operating system and its base services — typically a few hundred MB, fairly consistent regardless of what else you run.
- A database server — MariaDB or MySQL can be tuned to use very little or a great deal, depending on its buffer settings and how much data it is working with.
- A web server and its worker processes — Nginx is generally lighter than Apache under equivalent load, but the bigger factor is usually what is generating the dynamic content behind either one.
- PHP-FPM or an application runtime — each worker process holds its own memory, so the number of concurrent workers matters more than any single request's footprint.
- Anything else you install — a caching layer, a queue, a second application — each adds its own baseline on top of everything above.
Measure it on a running server
free -h
Read the available column rather than free — Linux uses spare memory for disk caching, so a low free figure with a healthy available figure is completely normal, not a sign of a problem. See seeing what is using your server resources for the fuller picture, including which specific process is consuming what.
Rough starting points
| Workload | Typical starting point |
|---|---|
| A single low-traffic WordPress site, no caching layer | Modest — the constraint is usually PHP worker count, not raw headroom |
| Several small sites, or one with real traffic | Comfortably more, plus attention to how many PHP-FPM workers are configured |
| A database doing meaningful work alongside the web server | Enough for both to run without one starving the other under load |
| Anything running its own in-memory cache or queue | The cache's configured size, on top of everything else |
These are directional, not specifications — for the actual RAM tiers we offer and what each is generally suited to, see /vps-hosting.
Signs you have genuinely outgrown your current tier
free -hconsistently shows very littleavailablememory, not just during occasional spikes.- Swap usage is climbing steadily rather than sitting near zero — see adding swap space, which is a short-term cushion, not a fix for this.
- A service is being killed outright by the kernel's out-of-memory handler — check
dmesgor the system log forOut of memory: Killed process. - Performance degrades specifically under load rather than being uniformly slow, which points at resource exhaustion rather than a configuration problem.
If you are seeing several of these together on a server that has not changed recently, that is a genuine capacity signal rather than something to tune your way out of indefinitely. If your workload might be outgrowing a VPS altogether rather than just needing a bigger tier of one, VPS or dedicated server: where the line is covers that decision, and our team can help you size a move either way.
Related reading
Creating a swap file with fallocate and mkswap, making it permanent in fstab, and why swap is a cushion rather than a substitute for RAM.
How to see what is using your server resourcesThe commands that show you exactly what is consuming CPU, memory and disk on a VPS, and how to identify the process responsible.
VPS or dedicated server: where the line isA VPS is an isolated slice of shared hardware; a dedicated server is the entire physical machine to yourself. Here is what that changes.
How to check whether your server is performingMeasuring your own server with sysbench, dd and iperf3, and why comparing today against last month matters more than any single number.