Top.Mail.Ru
English
Resources · 10 min

How much CPU and RAM does a VPS need?

Start with a realistic baseline, monitor production and resize the measured bottleneck. A large idle server is not reliability; useful headroom and a recovery plan are.

In this guideBaselinesCPURAMMonitoringScaling

Practical starting configurations

WorkloadvCPURAMStorage
VPN or test server11–2 GB10–20 GB SSD
Small site or bot1–22 GB20–30 GB SSD/NVMe
CMS or several sites24 GB40+ GB NVMe
Shop or database app2–44–8 GB60+ GB NVMe
Busy database or build worker4+8–16+ GBMeasured NVMe capacity

These are starting points, not traffic guarantees. Application design, data size, processor generation and provider allocation can change requirements substantially.

Interpret virtual CPU correctly

vCPU count shows available processing threads, not model or guaranteed speed. Two modern cores can outperform four older ones. Websites often value single-core performance; queues and builds can use more parallelism. Sustained CPU above 70–80% alongside rising response time is a signal to investigate, not an automatic instruction to buy cores.

Find an expensive process or query first. More cores help only when the workload can run in parallel and the provider allows the required sustained use.

Allow memory for every component

Application, database, cache, control panel and OS all share RAM. Add peak use rather than averages and keep 20–30% available under normal load. Active swap and out-of-memory kills indicate pressure; swap can soften a short peak but is much slower than RAM.

Storage and network can be the bottleneck

If CPU is idle while requests are slow, inspect storage latency, database queries and network calls. NVMe often matters more than extra capacity for small random operations, but the label alone is not a performance guarantee. The NVMe vs SSD guide explains what to test.

Metrics to collect

Collect at least a week including peak hours, updates and backups. Daily averages hide a short bottleneck that affects users every morning. Keep history to compare releases and seasonal changes.

Scale the constrained resource

  1. Correlate CPU, RAM, storage and response time with the incident.
  2. Fix an obvious query, leak or broken retry loop.
  3. Increase only the limiting resource.
  4. Run the same measurement again.

Vertical scaling is simplest for a small service. Horizontal scaling adds instances but also load balancing, shared state and operational complexity. Before purchase, confirm whether CPU and RAM can grow without changing IP, how long a restart takes and whether the disk can ever shrink.

Common sizing mistakes

Do not copy requirements from another stack without measuring: changing a database, runtime or container layout changes the profile. Do not add daily averages and ignore peaks caused by backups, updates or scheduled jobs. Finally, do not treat a larger plan as the only fix; a missing database index, unbounded retry loop or memory leak will eventually consume the new capacity too.

When several components share one VPS, add their peak memory plus operating-system headroom, but validate the result under realistic concurrency. Component limits are useful safety rails; they are not a substitute for system-wide monitoring.

Main principle: buy modest headroom and a quick upgrade path. Extra resources cannot fix a slow query, memory leak or full disk.

Frequently asked questions

More cores or higher clock speed?

Single-threaded workloads favour fast cores; parallel workers can use more cores. Profile the real application.

Can swap replace RAM?

No. It may survive a short peak, but persistent swap activity calls for optimisation or more memory.

How much headroom is sensible?

Often 20–30% memory and CPU below sustained saturation, adjusted for peak size, upgrade speed and acceptable downtime.

Match plans to a measured baselineSet CPU and RAM filters, then compare price among suitable servers.
Compare VPS resources