Knowledgebase | VPSGrid
English
EnglishBeta EspañolPortuguês (Brasil)Coming soonFrançaisComing soonDeutschComing soon
Client Area

How RAM Works on a VPS

KB-019, VPS Fundamentals, VPSGrid, unmanaged 0 found helpful

How RAM Works on a VPS

Short answer

RAM is fast working memory for running programs. Your VPS plan includes a fixed RAM allocation (e.g. 2 GB, 4 GB). When RAM fills up, the OS may use swap (disk) or kill processes — both can cause slowdowns or outages if you under-size memory.

Overview

RAM sits between CPU and disk in the speed hierarchy — much faster than NVMe, but limited by your plan. Understanding RAM helps you interpret crashes, tune web stacks, and choose the right VPS tier. New to VPS concepts? Read What Is a VPS?.

How RAM is assigned on a VPS

  • Your plan includes a fixed memory allocation (marketing pages list GB per tier)
  • The hypervisor enforces that limit for your VM — you cannot use another customer’s RAM
  • The guest OS (Linux or Windows) sees the allocated amount as installed memory
  • Applications, caches, and the kernel all compete for the same pool

Unlike burstable shared hosting, RAM on a VPS plan is a defined resource — running out is a hard operational problem, not a soft throttle.

What uses RAM on a typical VPS

  • Operating system — kernel, services, desktop shell (Windows)
  • Web server — nginx/Apache worker processes
  • Application runtimes — PHP-FPM pools, Node.js, Java heap
  • Databases — MySQL/MariaDB/PostgreSQL buffer pools (often the largest consumer)
  • Caches — Redis, Memcached, OPcache
  • Containers — each container adds overhead

Right-sizing means leaving headroom — running at 95% RAM constantly leaves no room for traffic spikes.

Swap: when it helps and when it hurts

Swap is disk space used as overflow when RAM is full. Linux often uses a swap file or partition; Windows uses the page file.

ScenarioSwap behavior
Light occasional overflowSwap prevents instant crashes; slight slowdown
Sustained RAM pressureHeavy swapping (“thrashing”) — VPS feels extremely slow
Database serverSwap is usually bad — keep DB in RAM; size plan accordingly
No swap configuredKernel may invoke OOM killer instead of swapping

Some admins disable swap on database VPS instances; others keep a small swap as a safety valve. There is no universal rule — avoid relying on swap as “extra RAM.”

OOM (Out Of Memory) errors

When the kernel cannot free enough RAM (and swap is full or unavailable), Linux’s OOM killer may terminate processes to survive. Symptoms:

  • Services disappear from systemctl status
  • MySQL/MariaDB restarts in logs
  • Messages like Out of memory: Kill process in dmesg or /var/log/syslog
  • 502/504 errors when PHP-FPM or the web stack is killed

Fix the root cause: reduce memory usage, tune pool sizes, or upgrade the plan — not just restart services repeatedly.

Checking memory on Linux

  1. free -h — total, used, available, swap
  2. htop or top — sort by memory per process
  3. systemctl status mysql nginx php*-fpm — see which service restarted
  4. dmesg | tail — OOM killer lines after incidents

For web stacks, also review PHP-FPM pm.max_children — too many workers × per-worker RAM can exhaust memory instantly under load.

Checking memory on Windows

  1. Task Manager → Performance → Memory
  2. Resource Monitor → Memory tab → sort by commit
  3. Event Viewer for application/service restarts

Windows Server benefits from the same headroom principle — IIS + SQL Server + remote desktop can consume RAM quickly on smaller plans.

Sizing RAM for your workload

WorkloadStarting RAM guidance
Static site, small API1–2 GB may suffice
WordPress / CMS2–4 GB+ depending on plugins and traffic
MySQL/Postgres primary4 GB minimum for small DB; scale with dataset + buffer pool
Multiple apps + Redis + workersAdd RAM for each layer; monitor before peak season

Confirm current RAM on VPSGrid store pages — Spark / Flame / Blaze scale memory with tier:

Common misconceptions

  • “Unused RAM is wasted RAM.” Linux uses free RAM for disk cache — that is normal. Watch available memory, not only “free.”
  • “OOM means VPSGrid broke my server.” OOM almost always means guest workload exceeded allocation — tune or upgrade.
  • “More RAM fixes slow disk.” RAM helps caching but cannot replace NVMe for heavy I/O — What Is NVMe Storage?.

Frequently Asked Questions

How much RAM does my VPS have?

Check your product details in the client area and inside the OS (Linux: free -h; Windows: Task Manager).

Should I enable swap on a 1 GB VPS?

A small swap file (512 MB–1 GB) can prevent instant OOM on tiny instances, but swap is slow — upgrading RAM is the real fix for production workloads.

Can I upgrade RAM without reinstalling?

Plan upgrades typically resize the VM allocation; confirm steps in the client area or with support for your product type.

Related Articles

Need More Help?

After checking free -h or Task Manager, open a ticket at billing.vpsgrid.net with your service ID and memory output if you suspect a platform issue.

Was this answer helpful?

Related Articles