Swap: Why You Need It and How to Enable It
September 3, 2025
Swap is virtual memory on disk that saves your VPS from crashing when RAM runs out. On low-cost servers, it’s an indispensable tool to avoid failures during short-term memory usage spikes. Setup is simple: create a file, enable it, and add it to autoload. But remember — it’s insurance, not a replacement for RAM.
Introduction
Modern VPSs are usually provisioned with enough RAM but often without swap (swap file or partition). This is a deliberate choice by providers who want you to quickly upgrade to a more expensive plan.