How to Size a Cloud Server Without Guessing
Most servers are the wrong size in one direction or the other. A short measurement exercise beats an hour of speculation.
Server sizing is usually done by picking a plan that sounds reasonable and hoping. It works often enough that the habit persists, and it produces two predictable failures: paying for four times the capacity you use, or discovering the limit during your busiest hour.
The alternative is not complicated. It is one measurement, one calculation and one habit.
Work out which resource binds first
Every workload runs out of one thing before the others. Identify it and size around it.
| Workload | Usually limited by | Watch |
|---|---|---|
| Static site or CDN origin | Bandwidth | Egress volume |
| WordPress or a CMS | Memory, then CPU | PHP worker count, database RAM |
| API backend | CPU | Requests per second per core |
| Database | Memory, then disk IOPS | Working set versus RAM |
| Background jobs | CPU | Queue depth |
| Video or image processing | CPU, then disk | Job duration |
| Game or realtime server | Single-core speed | Tick rate stability |
| Container host | Memory | Sum of pod requests |
A database whose working set no longer fits in memory does not degrade gradually. It falls off a cliff, because every query starts touching disk. That is the most common sizing surprise there is.
Memory: the number that matters most
Add up what actually runs:
- Operating system and base services — roughly 300 to 500 MB.
- Web server — 50 to 200 MB, plus per-worker memory.
- Application runtime — measure one process under load and multiply by worker count.
- Database — the buffer pool or shared buffers you have configured, plus per-connection overhead.
- Cache — whatever you gave Redis or Memcached, plus headroom.
- Headroom — at least 20 per cent, so a traffic spike does not trigger the out-of-memory killer.
Then add swap. Not as a substitute for RAM, but so a temporary spike degrades into slowness rather than a killed process. One to two gigabytes is enough on most servers.
CPU: count concurrency, not requests
A useful starting estimate: concurrent requests equals requests per second multiplied by average response time in seconds. Two hundred requests per second at 200 ms is forty concurrent requests.
For CPU-bound work, cores needed is roughly concurrency multiplied by the fraction of time spent on CPU. If most of that 200 ms is waiting on a database, one or two cores handle it comfortably. If it is all computation, you need considerably more.
Measure it rather than assuming: run one worker, load it, and read the CPU time per request.
Disk: size and speed are separate decisions
- Capacity — application, dependencies, logs, database, and room for growth. Logs are the usual cause of a full disk; set up rotation on day one.
- IOPS — how many operations per second the volume sustains. Databases care; static file serving mostly does not.
- Throughput — megabytes per second, which matters for backups, large uploads and analytics scans.
On several providers IOPS scales with volume size, so a small volume can be slow regardless of the instance type. On others, local NVMe is much faster but tied to the instance lifecycle. Check which model applies before assuming disk speed.
Bandwidth is a billing decision
VPS providers such as Hetzner, DigitalOcean, Linode and UpCloud include a generous transfer allowance in the plan price. Hyperscalers bill egress per gigabyte from the first gigabyte in most regions.
For a media-heavy site, the difference between the two models is often larger than the difference in compute price. Estimate monthly egress before choosing, and see hyperscaler versus VPS provider for how those models compare.
The habit: start small and resize
- Deploy on a plan you believe is slightly too small.
- Run under real traffic for a week with monitoring in place.
- Read peak memory, peak CPU, disk usage and egress — not averages, peaks.
- If peak memory exceeds 80 per cent or CPU sits above 70 per cent, move up one size.
- If peaks stay below 30 per cent for a month, move down one size.
- Repeat quarterly, or after any significant traffic change.
Resizing a cloud server takes a reboot on most providers. That is a far smaller cost than a year of paying for four times what you need.
Common questions
Is it better to over-provision to be safe?
Modestly, yes — running at 90 per cent memory leaves no room for a spike. Four times headroom is not safety, it is waste, and it hides the fact that nobody knows the real usage.
Can I resize down as well as up?
Up is always possible. Down is possible on most providers when the disk was not enlarged, since shrinking a volume is usually not supported. Grow disk deliberately for that reason.
One large server or several small ones?
Several smaller servers behind a load balancer give redundancy and let you scale in smaller steps. One larger server is simpler and often cheaper. Below meaningful availability requirements, simple usually wins.
How much swap should I configure?
One to two gigabytes on a small server, as a buffer rather than as capacity. If the system is actively swapping under normal load, you need more RAM, not more swap.
Where to go next
See shared versus dedicated vCPU and monitoring a cloud server, which supplies the numbers this method needs.