Skip to content
Wallet live · USDT TRC20 · USDT BEP20 · BTC · ETH · SOL · XMR Free SSL · Malware scan · Instant image 24/7 desk · @rexahost
RexaHostRexaHost

VPS

How Much RAM Does a VPS Need? Sizing Linux Workloads

· 5 min read

How Much RAM Does a VPS Need? Sizing Linux Workloads

Memory is usually the first limit a Linux VPS hits. Realistic RAM estimates for common workloads, how to measure what you use, and when swap is fine or a warning sign.

Key takeaways

  • A minimal Linux server uses roughly 150–400 MB before your applications start.
  • 1 GB suits one light service; 2 GB suits a typical WordPress or small app with a database.
  • Databases love RAM: more memory means more data cached and fewer disk reads.
  • Measure with free -h and look at the "available" column, not "free".
  • Plan 20–30% headroom above your measured peak.

Of all the resources on a VPS, memory is the one most people get wrong. Too little and the server swaps, slows down or kills processes. Too much and you pay for capacity that sits idle. The good news is that Linux is efficient, and most workloads have predictable needs. This guide gives realistic numbers for common Linux workloads and shows you how to measure your own. (If you are running Windows, see our separate guide to sizing a Windows desktop.)

How Linux uses memory

Run free -h on any Linux server and you may be alarmed to see very little "free" memory. That is normal. Linux uses spare RAM as a disk cache, keeping recently read files in memory so the next read is instant. When an application needs memory, the kernel gives back cache immediately.

The number that matters is available: memory that can be handed to applications without swapping. If "available" stays comfortably above zero during your busiest periods, you have enough RAM.

Baseline: the operating system

A fresh minimal install of Ubuntu 24.04, Debian 12, AlmaLinux or Rocky Linux typically uses around 150–400 MB with SSH, logging and basic services running. Debian tends to be the leanest. Every service you add builds on that baseline.

RAM estimates by workload

WorkloadTypical RAM needNotes
Static site with Nginx256–512 MBNginx itself is very light
WireGuard VPN256–512 MBKernel-level, minimal overhead
Telegram or Discord bot512 MB–1 GBDepends on language and libraries
Single WordPress site (Nginx/Apache + PHP + MariaDB)1–2 GB2 GB comfortable with caching
WooCommerce store2–4 GBMore PHP workers and database queries
Several WordPress sites4 GB+Scale PHP workers and DB buffer
Node.js or Python web app + PostgreSQL1–4 GBDepends on app and data size
Docker host with a few containers2–4 GBSum of container needs plus overhead
Minecraft (small group, vanilla)2–4 GBPlugins, mods and players add more
Busy database server8 GB+Aim to fit the working set in memory

These are planning ranges, not guarantees. Your real usage depends on traffic, configuration and code. Always measure after deployment.

The big memory consumers

PHP-FPM workers

Each PHP worker may use 30–100 MB or more depending on your application and plugins. The pm.max_children setting controls how many can run at once. Multiply workers by per-worker memory to estimate PHP's ceiling, and make sure it fits alongside the database.

Databases

MySQL and MariaDB use the InnoDB buffer pool to cache data and indexes. PostgreSQL uses shared buffers and relies on the OS cache. Giving the database enough memory to hold your frequently accessed data is the single biggest performance win for most dynamic sites.

Java applications

Java apps, including Minecraft servers, reserve heap memory set by -Xmx. Leave room outside the heap for the JVM itself and the OS.

Caches like Redis

Redis stores everything in memory. Set maxmemory and an eviction policy so it cannot grow without limit.

Matching workloads to plans

PlanvCPURAMNVMePriceGood for
VPS Sandbox1512 MB20 GB$1.98Testing, VPN, tiny static site
VPS Starter11 GB25 GB$2.78Bot, small app, light site
VPS Basic12 GB60 GB$5.98WordPress, small app + DB
VPS Pro24 GB120 GB$11.58WooCommerce, several sites, Docker
VPS Business48 GB240 GB$21.18Busy apps, larger databases
VPS Advanced412 GB300 GB$27.98Memory-heavy apps
VPS Enterprise816 GB350 GB$39.98Large databases, many containers

How to measure your real usage

  1. Snapshot: free -h shows total, used and available memory.
  2. Per process: htop (install it if needed), sorted by memory, shows what is using RAM.
  3. Over time: vmstat 5 prints memory and swap activity every five seconds; watch the si and so columns for swapping.
  4. History: a monitoring agent or simple cron job logging free -m helps you see daily peaks.
  5. Out-of-memory events: journalctl -k | grep -i oom reveals if the kernel has killed processes.

Measure during your busiest period, such as a marketing email, a sale or peak evening traffic, not at 3 a.m.

Swap: safety net, not a substitute

Swap is disk space used as overflow memory. On NVMe it is much faster than on old hard drives, but still far slower than RAM. A small swap file (for example 1–2 GB) prevents sudden crashes when memory briefly spikes. If you see constant swap activity, you need more RAM, not more swap.

To add a 1 GB swap file on most distributions: create it with fallocate -l 1G /swapfile, set permissions with chmod 600 /swapfile, format with mkswap /swapfile, enable with swapon /swapfile, and add it to /etc/fstab to persist. Setting vm.swappiness=10 tells the kernel to prefer RAM.

Reducing memory usage before upgrading

  • Tune PHP-FPM: lower pm.max_children to what your RAM allows; use pm = ondemand on low-traffic sites.
  • Use page caching: serving cached HTML avoids PHP and database work entirely.
  • Right-size the database buffer: do not allocate more than your data needs.
  • Remove unused services: check ss -tulpn and disable what you do not use.
  • Limit container memory: set limits in Docker Compose so one container cannot starve others.

Signs you need more RAM

  • "Available" memory falls near zero at peak times.
  • Swap usage grows steadily and vmstat shows constant swapping.
  • The kernel OOM killer appears in logs.
  • Pages slow down under load even though CPU is not maxed.
  • Database performance drops as data grows.

A worked example

Suppose you run two WordPress sites with a shared MariaDB database. The OS uses 300 MB. MariaDB with a 512 MB buffer pool uses about 700 MB. PHP-FPM with eight workers at 60 MB each could reach 480 MB. Nginx and Redis add 150 MB. That totals roughly 1.6 GB at peak. Add 25% headroom and you need about 2 GB, so VPS Basic fits. If you add WooCommerce or a third site, move to VPS Pro with 4 GB.

Common sizing mistakes

  • Sizing for the average. Memory problems happen at peaks: a newsletter send, a sale, a bot crawl. Plan for the busiest hour, not the typical one.
  • Forgetting background jobs. Backups, cron tasks and log rotation run at night and can briefly double memory use on a small server.
  • Copying settings from a bigger server. A database configuration written for 16 GB will try to allocate far more than a 2 GB VPS can give.
  • Treating swap as free RAM. It prevents crashes, but heavy swapping makes everything slow.

Upgrading is easy

You do not have to get it perfect on day one. Start with a sensible size, measure for a week, and upgrade when the data says so. If you are deciding between tiers, see VPS vs VDS vs dedicated. Browse all plans with NVMe storage and full root access on the Linux VPS page.

Frequently asked questions

Is 1 GB of RAM enough for a VPS?

For a single lightweight service such as a small static site, a VPN or a bot, yes. For WordPress with a database, 2 GB is a more comfortable minimum.

How much RAM do I need for WordPress?

A single low-traffic WordPress site runs on 1 GB with tuning, but 2 GB is comfortable. Several sites or WooCommerce benefit from 4 GB.

Should I enable swap on a VPS?

A small swap file is a useful safety net against out-of-memory crashes. If the server uses swap constantly, you need more RAM.

Why does Linux show almost no free memory?

Linux uses spare RAM for disk cache, which it releases when applications need it. Look at the 'available' column in free -h, not 'free'.

Does more RAM make my site faster?

Only up to the point where your workload fits comfortably, including cache. Beyond that, CPU, disk and code efficiency matter more.

#vps ram#how much ram#linux vps sizing#wordpress ram#vps memory

Plans in this article

Servers mentioned here

VPS Starter

Standard
$1.89 /mo
$2.50Save 24% billed monthly
  • 1 vCPU
  • 1 GB RAM
  • 25 GB NVMe
  • 1 TB traffic
  • Root access · dedicated IPv4
  • Ashburn · London · Amsterdam · Frankfurt +6

VPS Basic

Standard
$2.79 /mo
$5.38Save 48% billed monthly
  • 1 vCPU
  • 2 GB RAM
  • 60 GB NVMe
  • 3 TB traffic
  • Root access · dedicated IPv4
  • Ashburn · London · Amsterdam · Frankfurt +6
Most popular

VPS Pro

Standard
$4.69 /mo
$10.42Save 55% billed monthly
  • 2 vCPU
  • 4 GB RAM
  • 120 GB NVMe
  • 5 TB traffic
  • Root access · dedicated IPv4
  • Ashburn · London · Amsterdam · Frankfurt +6

VPS Business

Standard
$8.39 /mo
$19.06Save 56% billed monthly
  • 4 vCPU
  • 8 GB RAM
  • 240 GB NVMe
  • 7 TB traffic
  • Root access · dedicated IPv4
  • Ashburn · London · Amsterdam · Frankfurt +6

Keep reading

Related articles

Live Chat · offline