In short
For a single WordPress site or a small Laravel app, 2 vCPUs and 2-4 GB of RAM are usually enough. For WooCommerce, several sites or a multi-service Docker stack, 4-8 GB of RAM and 4 vCPUs is a safer starting point. The right number comes from adding up the operating system, web server, app workers, database and cache, then adding a 25-30% safety margin.
In this guide
- What Do RAM and vCPUs Actually Control?
- How to Calculate How Much RAM You Need
- How to Calculate How Many vCPUs You Need
- Recommended RAM and vCPUs by Use Case
- Database Workloads: Where the Memory Really Goes
- Measuring Your Current Usage
- Swap: Insurance, Not Extra RAM
- Ryzen Premium VDS or Intel Premium VDS?
- When Should You Upgrade?
- Next Step: Pick the Plan That Matches Your Numbers
Short answer: for a single WordPress site or a small Laravel app, 2 vCPUs and 2–4 GB of RAM are usually enough. For WooCommerce, multiple sites or a multi-service stack running on Docker, 4–8 GB of RAM and 4 vCPUs is a safer starting point. Still, the right number comes from the total of everything that runs on the server at the same time. This guide shows you how to calculate that total, how to measure your current usage, and gives you a ready-made sizing table by use case.
What Do RAM and vCPUs Actually Control?
RAM is the memory that running processes (web server, PHP-FPM workers, database, cache, containers) hold at the same time. When RAM runs out, the system starts writing to swap and slows down; if that is not enough, the Linux kernel's OOM Killer terminates the process using the most memory, which is very often MySQL. This is the most common reason a site throws a database error "every now and then."
A vCPU (virtual CPU) is a processor thread that the virtualization layer assigns to the virtual machine. The number of vCPUs determines how many tasks can run in parallel. A running PHP request keeps one core busy; four simultaneous heavy requests will queue up on a 2-vCPU server.
The rule of thumb: too little RAM shows up as crashes, too few vCPUs show up as slowdowns. That is why you should plan RAM slightly above your needs and size vCPUs based on the load you actually observe.
How to Calculate How Much RAM You Need
Instead of guessing, add it up component by component. The values below are rough starting points you can use before measuring (they are guidelines only); the exact figure comes from measuring your own server.
- Operating system: A headless Ubuntu Server uses a few hundred MB at idle; reserve 0.5–1 GB including system services.
- Web server: Nginx usually runs in tens of MB; Apache can use more depending on the process model (MPM) you choose.
- Application workers: With PHP-FPM, total memory is roughly
pm.max_children× average process size. In WordPress, a single PHP process typically ranges from about 40 to 100 MB depending on your plugin load. - Database: In MySQL/MariaDB the biggest item is
innodb_buffer_pool_size. When frequently used data and indexes fit in this pool, queries do not have to hit the disk. - Cache and side services: Extra services such as Redis, queue workers, cron jobs and a search engine.
- Safety margin: Add 25–30% on top of the total. Traffic spikes, backups and updates will use this headroom.
Example: A Mid-Size WooCommerce Store
Picture a store running Nginx, PHP-FPM, MariaDB and Redis on the same server:
OS and system services : 0.8 GB
Nginx : 0.1 GB
PHP-FPM (12 workers x 80 MB) : 0.96 GB
MariaDB buffer pool + overhead : 1.5 GB
Redis object cache : 0.25 GB
Subtotal : ~3.6 GB
With 30% safety margin : ~4.7 GB => plan with 6-8 GB RAMYou can use the same logic in reverse to find your PHP-FPM worker count: memory you can give to PHP ÷ average process size = the upper limit for pm.max_children. Setting this value high regardless of available RAM pushes the server into swap at peak times and makes the site slower instead of faster.
How to Calculate How Many vCPUs You Need
The key question for vCPUs is how many dynamic requests per second you need to handle. Pages served from a page cache use almost no CPU; the real load comes from requests that cannot be cached: cart, checkout, search, the admin dashboard and API calls.
- Rough formula: If a request takes 200 ms of CPU time, one core can handle about 5 such requests per second. Divide your peak-hour dynamic requests per second by this rate to get a rough core count. This is a guideline; disk and network waits change the math.
- Builds:
npm run build,docker buildandcomposer installcreate short spikes that use every core. If you build on the same server, 4 vCPUs make a noticeable difference. - Single-core speed: PHP and Node.js process a single request on a single core, so core speed directly affects response time. We cover this in detail in Ryzen VDS vs. Intel Xeon VDS: Which One Should You Choose?
Recommended RAM and vCPUs by Use Case
The table below shows practical values you can use as a starting point before you measure. Traffic, plugin count and code quality can push these numbers either way.
| Use case | RAM | vCPU | Note |
|---|---|---|---|
| Single WordPress site, low to medium traffic | 2–4 GB | 2 | Page caching is a must |
| Several WordPress sites or a control panel | 4–8 GB | 2–4 | The panel itself uses memory too |
| WooCommerce with thousands of products | 8–16 GB | 4–8 | Redis object cache recommended |
| Laravel + MySQL + Redis + queue worker | 4–8 GB | 2–4 | Each queue worker is a separate PHP process |
| Docker Compose stack (app, database, Redis, reverse proxy) | 4–8 GB | 2–4 | Add up the memory usage of your containers |
| Multiple apps with Coolify | 8 GB and up | 4+ | CPU and RAM spike during builds |
| n8n automation server | 2–4 GB | 2 | Workflows that process large data need more |
| Dedicated database server | Based on the working set | 4+ | 50–70% of RAM for the buffer pool |
Database Workloads: Where the Memory Really Goes
On database servers, RAM needs are driven not by total disk size but by the working set: the combined size of frequently read tables and indexes. You can see the current size of your databases with this query:
SELECT table_schema AS veritabani,
ROUND(SUM(data_length + index_length) / 1024 / 1024) AS boyut_mb
FROM information_schema.tables
GROUP BY table_schema;On a server that runs only the database, 50–70% of RAM for innodb_buffer_pool_size is a widely accepted starting point. If the web server and database share the same machine, lower this ratio; otherwise they will compete with PHP workers for memory.
# /etc/mysql/mariadb.conf.d/50-server.cnf
# 8 GB RAM, web and database on the same server
[mysqld]
innodb_buffer_pool_size = 2GMeasuring Your Current Usage
If you already have a server, look at real consumption instead of guessing:
free -h # total, used and available memory
vmstat 1 5 # si/so columns show swap traffic
ps aux --sort=-rss | head -n 15 # processes using the most RAM
uptime # load average values
docker stats --no-stream # CPU and RAM per container
dmesg -T | grep -i "out of memory" # OOM Killer entriesWhen reading the output, watch for these:
- If available stays below 10% of total RAM or swap is used regularly, you do not have enough RAM. Linux using free RAM as disk cache (buff/cache) is normal and not a problem.
- If the load average stays above your vCPU count for long periods, the CPU is not keeping up.
- If wa is high in
top, the bottleneck is the disk; if st (steal) is high, CPU time is waiting at the virtualization layer.
To pinpoint which component is the bottleneck step by step, see Server Slowing Down? How to Find CPU, RAM and Disk Bottlenecks.
Swap: Insurance, Not Extra RAM
On small-RAM servers, 1–2 GB of swap delays the OOM Killer during sudden spikes. But swap lives on disk, and even on NVMe it is far slower than RAM. If swap is in constant use, the fix is a bigger plan.
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstabRyzen Premium VDS or Intel Premium VDS?
At Sunucu Atlas, both VDS (VPS) families come in the same RAM tiers (from 2 GB to 32 GB). Both include KVM virtualization, NVMe storage, a 1G port, layered DDoS protection, automated setup and root access. The difference is in the processor and the number of vCPUs per GB of RAM:
- Ryzen Premium VDS plans use the AMD Ryzen 9 5900X processor. Its high single-core performance is an advantage for WordPress, WooCommerce and Laravel sites, where fast response to each request matters.
- Intel Premium VDS plans use Intel Xeon processors and give you more vCPUs for the same RAM in the middle tiers. For example, the 8 GB SA-XEON-4 comes with 4 vCPUs, while the 8 GB SA-R9-4 in the Ryzen family has 2 vCPUs. For parallel Docker containers, queue workers and build jobs, this difference is decisive.
In short: if your math says "plenty of RAM, fewer but faster cores," go with Ryzen; if it says "moderate RAM, more parallel cores," the Xeon family is the better fit.
When Should You Upgrade?
- You see OOM Killer entries in the
dmesgoutput. - Swap usage keeps climbing throughout the day and never comes back down.
- The load average stays above your vCPU count during peak hours.
- The
server reached pm.max_children settingwarning keeps repeating in the PHP-FPM log and your RAM does not allow you to raise that number.
If you are thinking about moving off shared hosting for the first time, When Should You Move from Shared Hosting to a VDS? will help you decide.
Next Step: Pick the Plan That Matches Your Numbers
- Add up total RAM using the component list above and add a 25–30% margin.
- Set your vCPU count based on peak-hour dynamic requests and the number of parallel jobs.
- Choose your processor: if single-core speed comes first, look at the Ryzen 9 5900X VDS family; if parallel workloads come first, look at the Intel Xeon VDS family.
- Once the server is live, watch
free -handuptimeduring the first few weeks; if real usage differs from your estimate, adjust your plan accordingly.
All Sunucu Atlas VDS plans run in our Istanbul data center; if you get stuck on setup or sizing, open a support ticket and our team will help.
Frequently asked questions
Is a VPS with 2 GB of RAM enough?
It is usually enough for a single WordPress site with page caching, a small Laravel app or a light n8n setup. If you will run a control panel, WooCommerce or several services with Docker, 4 GB or more is safer.
How much RAM does a VPS need for WordPress?
For a single WordPress site with low to medium traffic, 2-4 GB of RAM is a good start. For multiple sites or a WooCommerce store, 4-8 GB is recommended, and 8-16 GB for stores with thousands of products.
How much RAM do I need for Docker?
Add up the memory usage of each container and add a 25-30% margin. For a typical Docker Compose stack with an app, database, Redis and a reverse proxy, 4-8 GB of RAM and 2-4 vCPUs is a practical starting point.
Is a vCPU the same as a physical core?
No. A vCPU is a processor thread that the virtualization layer assigns to the virtual machine. Its performance depends on the processor model and clock speed, so the same vCPU count can perform differently on different processors.
Can I reduce my RAM needs by adding swap?
Swap is only insurance that delays crashes during sudden spikes. Because it lives on disk, it is much slower than RAM; if swap is in constant use, you need a plan with more RAM.