Can I add swap memory on Linux VPS?
What this is
Swap files and swap partitions aren't supported on our Linux VPS plans, swapon won't work. Here's why that's a feature, not a gap.
Swap is a workaround from another era
Swap exists to fake extra memory by parking overflow on disk, invented when RAM was scarce and expensive. Disk, even NVMe, is orders of magnitude slower than RAM, so a system leaning on swap doesn't get more capacity, it gets slow: applications stall, latency spikes, and the problem you actually have (not enough memory) gets hidden instead of fixed.
Your Linux VPS comes with fully dedicated memory, all of it real RAM, all of it yours. When that's the case, swap adds nothing but a slow failure mode.
The economics have flipped
The honest fix for needing more memory is having more memory, and that's exactly the thing we price aggressively: our 6 GB plan is $7/month ($7 ÷ 6 GB ≈ $1.17 per GB), which is roughly what many providers charge for a single gigabyte. At that price, upgrading to real RAM costs about what limping along on swap would cost elsewhere.
If you're hitting memory limits
- Check whether you actually are: see My VPS is using too much memory, Linux's cache makes healthy systems look full.
- Find the consumer:
ps aux --sort=-%mem | head. A mistuned database buffer or a leaking app fixes for free. - Genuinely outgrown the plan? Upgrade, on Linux VPS it's live and instant, no downtime, no reboot, same IP.
(On Premium VPS, full KVM means the OS is entirely yours, swap included, if you insist. We'd still suggest sizing RAM properly instead.)
Still need help?
You can open a support ticket. So we can help on the first reply, it's worth mentioning:
- the VPS hostname or IP,
- the
free -houtput and what's eating the memory (ps aux --sort=-%mem | head).
Related questions
- "Can I create a swap file on my VPS?"
- "Why does swapon fail on Linux VPS?"
- "Do I need swap on a VPS?"
- "What do I do instead of adding swap?"