WESERVER / KNOWLEDGE BASE

How much RAM and how many vCPUs does a VDS need? Sizing guide

A small site or bot starts well on 1 vCPU and 2 GB RAM, a single WordPress site on 4 GB RAM, and several Docker services or Windows Server on 2 vCPUs and 8 GB RAM. Measuring under real traffic settles the final size.

Short answer

1 vCPU and 2 GB RAM is enough for one small site, bot or VPN. A single WordPress site or a small app with a database starts well on 4 GB RAM; several sites, multiple Docker services or Windows Server start well on 2 vCPUs and 8 GB RAM. Database-heavy work, build servers and multi-user remote desktops start at 4 vCPUs and 12 GB RAM.

These numbers are estimates. The right size shows up in free, vmstat and top output after the application has handled real traffic for a few days. When RAM runs out, processes get killed; when there are not enough vCPUs, work slows down. If you are unsure, sizing RAM one step up and adding CPU based on measurements causes fewer problems.

How much RAM and how many vCPUs does a VDS need? Sizing guide

RAM or vCPU: which runs out first?

RAM is a hard limit. When memory fills up, Linux first drops the disk cache, then writes to swap, and once swap is full too the kernel’s OOM killer terminates the process using the most memory. That process is usually the database, and the site suddenly starts showing database connection errors.

CPU is a soft limit. When the processor cannot keep up, requests queue and pages load slowly, but processes keep running. A vCPU is a processor thread the hypervisor assigns to the virtual server; plans also list it as a vCore. The hypervisor and resource model are covered in “What is a VDS? How a virtual dedicated server works”.

More cores do not speed up every application. A single Node.js process, most Python scripts and the main loop of a Minecraft Java server do most of their work on one core. Going from 2 to 4 vCPUs will not make a single request finish faster there; it only lets the server handle more work at the same time. PHP-FPM, Nginx, databases and parallel builds benefit from extra cores directly.

How much RAM and how many vCPUs does each workload need?

The values below are starting points for low and medium traffic. The smallest WeServer Turkey VDS plan that covers each one is in brackets; plans range from 1 vCore and 2 GB RAM to 12 vCores and 32 GB RAM.

  • Static site, a small Telegram or Discord bot, WireGuard VPN or a single proxy service: 1 vCPU, 2 GB RAM (TR-VDS #1). These services usually run in a few hundred MB, leaving room for package updates and monitoring tools.
  • A single WordPress site (Nginx, PHP-FPM and MariaDB): 1 vCPU, 4 GB RAM (TR-VDS #2). It will run on 2 GB, but memory gets tight as plugins and the database grow.
  • Several WordPress sites, a WooCommerce store or a control panel installed on the server: 2 vCPUs, 8 GB RAM (TR-VDS #3). Cart and checkout pages are not cached, so every store request reaches PHP and the database.
  • Several services with Docker Compose, for example n8n, PostgreSQL and Redis together: 2 vCPUs, 8 GB RAM (TR-VDS #3). Each container loads its own runtime into memory, so as the service count grows you will need 4 vCPUs and 12 GB RAM (TR-VDS #4).
  • Windows Server with Remote Desktop: 2 vCPUs, 8 GB RAM (TR-VDS #3). On 1-vCPU plans the desktop and Windows updates are noticeably slow. If several people will be connected at once, start at 4 vCPUs and 12 GB RAM.
  • A game server for a small group: 2 vCPUs, 8 GB RAM (TR-VDS #3). Player count, map size and plugins drive memory use. Single-core speed matters more than the number of cores.
  • A database-heavy application, a CI/CD build server or a busy API: 4 vCPUs, 12 GB RAM or more (TR-VDS #4 and up). Keeping frequently read data in memory cuts disk access, so RAM matters as much as CPU here.

How do you calculate RAM requirements?

Work out the memory of each component that will run on the server, add them up and add headroom:

  • Operating system: a minimal Ubuntu or Debian server uses a few hundred MB at idle. Microsoft documents 2 GB as the minimum memory for Windows Server with Desktop Experience; that is enough to boot, not to run workloads.
  • Web server: Nginx runs in a few tens of MB. In Apache’s prefork mode each connection is a separate process, so memory grows with the number of connections.
  • Application processes: the most PHP-FPM can use is pm.max_children multiplied by memory per process. Get the per-process value from the average of ps -C php-fpm8.3 -o rss= (the output is in KB; change the version number to match your install).
  • Database: in MariaDB and MySQL, innodb_buffer_pool_size accounts for most of the memory and defaults to 128 MB. On a server that runs only the database, it is usually set between half and three quarters of RAM. When the application shares the server, set it smaller, based on the size of your database.
  • Cache: Redis or Memcached use memory up to the limit you set (maxmemory in Redis).
  • Headroom: add 25–30% to the total. Linux uses free memory as disk cache, which speeds up file reads.

Example RAM calculation: a single WordPress site

The values are assumptions: Ubuntu 400 MB, Nginx 50 MB, 12 PHP-FPM processes at 80 MB each for 960 MB, MariaDB with a 1 GB buffer pool using about 1.3 GB including connections, and Redis capped at 256 MB. The total is about 2.9 GB, or 3.8 GB with 30% headroom.

This site will run on 4 GB RAM with little to spare; if you expect traffic to grow, 8 GB leaves comfortable room. On a 2 GB server the same setup starts swapping at peak hours, and once memory is completely full the OOM killer kills MariaDB.

How do you measure a server’s resource usage?

To check your estimate, run these commands while the application is under real traffic:

  • free -h: the available column shows the memory applications can actually use. A low free column alone is not a problem, because Linux uses spare memory for cache.
  • vmstat 5: prints a line every five seconds. If the si and so columns stay above zero, the server is swapping in and out, which means RAM is short. If the r column keeps exceeding the vCPU count, the processor cannot keep up.
  • nproc and uptime: nproc gives the vCPU count, uptime the 1-, 5- and 15-minute load averages. If the 15-minute value stays above the vCPU count for long periods, work is waiting in a queue.
  • top or htop: on the CPU line, us is time spent by applications, wa is time waiting on disk and st is time the virtual server waited for the physical CPU. Inside top, M sorts by memory and P by CPU.
  • ps aux --sort=-%mem | head: lists the processes using the most memory.
  • journalctl -k | grep -i "out of memory": shows whether the OOM killer has killed a process before.
  • Windows Server: the Performance tab in Task Manager and Resource Monitor (resmon) show memory, CPU and disk use per process.

When should you move to a bigger plan?

Do not decide from a single snapshot; watch usage at peak hours for a few days. sar from the sysstat package also shows past days (sar -r for memory, sar -u for CPU); on Ubuntu and Debian it starts collecting once you set ENABLED="true" in /etc/default/sysstat after installing. Add resources when these signs keep showing up:

  • available memory drops below 10% of total RAM at peak hours and si and so in vmstat are above zero: RAM is short.
  • load average stays above the vCPU count and us in top is high: CPU is short.
  • load average is high, us is low and wa is high: the bottleneck is the disk, not the CPU, and more vCPUs will not help. Find the process using the disk with iotop.
  • st stays high: the virtual server is waiting for the physical CPU. No setting on your side fixes this; send your vmstat and top output to the support team.

What should you check before upgrading your plan?

Resource problems sometimes come from configuration. An oversized pm.max_children, a WordPress site with no caching plugin or a buffer pool that takes most of the RAM will cause the same pressure on a bigger plan. Fix those settings using the calculation above first, then measure again.

Swap keeps services from being killed during short memory spikes, but it does not replace RAM. It lives on disk, so it is slow; if it is in constant use, the server slows down and what you actually need is more RAM. Under constant heavy CPU and disk load, a dedicated server is also an option; see “VDS vs dedicated server: key differences”.

What errors appear when resources run out?

  • “Out of memory: Killed process … (mysqld)” in the kernel log. Cause: RAM and swap are full and the kernel killed the process using the most memory. Fix: find what was using memory with ps, lower the buffer pool or the PHP-FPM process count, and add RAM if needed.
  • “Error establishing a database connection” in WordPress. Cause: usually MariaDB or MySQL killed by the OOM killer. Fix: check the service with systemctl status mariadb and the OOM entry with journalctl -k.
  • 502 Bad Gateway in Nginx and “server reached pm.max_children setting” in the PHP-FPM log. Cause: all PHP processes are busy and new requests are waiting. Fix: if RAM allows, raise pm.max_children using the calculation above; if not, add page caching or more RAM.
  • “fork: Cannot allocate memory” when running a command. Cause: there is no memory left to start a new process. Fix: find and stop the process using the most memory. If you cannot open an SSH session at all, reboot the server, then first check the previous boot’s kernel log with journalctl -k -b -1.
  • The server is slow but top shows the CPU as idle. Cause: disk waits (high wa) or swapping. Fix: check vmstat 5 and iotop output.

Frequently asked questions

Is 1 GB RAM enough for a VDS? It can be for one light service such as a static site or a small bot. It gets tight once a database, PHP and package updates run together. WeServer’s smallest plan comes with 2 GB RAM.

Is a vCPU the same as a physical core? No. A vCPU is a processor thread the hypervisor assigns to the virtual server. On a CPU with hyper-threading, one physical core runs two threads. Performance depends on the processor model and clock speed as well as the vCPU count.

Can swap replace RAM? No. Swap is written to disk, so it is much slower than RAM. It prevents services from being killed during short spikes; if it is in constant use, you do not have enough RAM.

Can I upgrade my plan later? On a virtual server, CPU, RAM and disk are usually increased by moving to a larger plan. Before ordering, ask the provider how the upgrade works and whether it requires downtime.

Does IPv6 Subnet VDS have different resource options? No. IPv6 Subnet VDS plans use the same CPU, RAM and disk options as Turkey VDS; the difference is the /64 or /48 IPv6 subnet.

Browse related productsAsk on WhatsApp← Back to category

RELATED

Related articles

ALL IN WE1

Let’s build your infrastructure together.

Share your requirements and we will help you choose the right resources and server type.

Chat on WhatsApp