How to size a VPS: the rules of thumb behind an open calculator
Most "what VPS do I need" answers are a single number with no reasoning. When I built a small open calculator for this, I decided every assumption had to be visible, so anyone can disagree with it. Here are the rules of
Most "what VPS do I need" answers are a single number with no reasoning. When I built a small open calculator for this, I decided every assumption had to be visible, so anyone can disagree with it. Here are the rules of thumb it uses. They are rules of thumb, not benchmarks.
1. Turn monthly visits into a peak, not an average
- Visits are converted to page views at 2.5 page views per visit.
- That gives an average rate per second.
- The average is multiplied by 4 for steady traffic and by 12 for spiky traffic (launches, newsletters, social).
The server has to survive the peak. Sizing on the average is the most common mistake.
2. CPU: peak rate times cost per uncached request
Assumed CPU time for one uncached request:
| Stack | CPU-seconds per uncached request |
|---|---|
| Static site (Nginx / Caddy) | 0.002 |
| Node.js app | 0.02 |
| Docker containers | 0.05 |
| Laravel / PHP app | 0.06 |
| WordPress | 0.08 |
| WooCommerce | 0.15 |
The result is doubled to leave room for bots, admin pages, cron and updates. A page cache cuts PHP stacks to roughly a third.
3. RAM: add the layers, then 30 %
Per app, plus a shared database:
| Stack | App RAM (GB) | Database RAM (GB) |
|---|---|---|
| Static | 0.05 | 0 |
| WordPress | 0.25 | 0.75 |
| Laravel | 0.3 | 0.75 |
| Node.js | 0.3 | 0.5 |
| WooCommerce | 0.4 | 1.0 |
| Docker | 0.6 | 0.75 |
Then add the operating system, the request workers needed at peak, extras (Redis, staging copy, mail, queues), and a 30 % safety margin.
4. Disk: system + apps + media, then 50 %
The extra 50 % covers logs, updates and local backups. Disk is the resource people run out of silently.
Where these numbers break
A heavy plugin set, a large catalogue or slow queries can double them. If the site already runs somewhere, the real numbers from htop and your database beat any calculator. And for a static site, 1 vCPU is fine. For anything with PHP or a database, 2 vCPU is the comfortable minimum, because backups and bots run at the same time as visitors.
Try it
The calculator runs entirely in the browser, nothing is sent anywhere: VPS size calculator. If you then want to translate the specs into a budget, I wrote up how much a VPS costs separately.
Which of these assumptions looks wrong for your stack? I would rather fix the table than defend it.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.