What is swap memory in linux? What It Really Is, Why It Exists, and How to Actually Use It
Briefly

What is swap memory in linux? What It Really Is, Why It Exists, and How to Actually Use It
"Swap is simply a portion of your disk (HDD/SSD/NVMe) used as a slower backup for RAM. When your RAM fills up, the Linux kernel quietly moves "cold" data( i.e. rarely used memory pages) into swap, freeing up RAM for things we are actively running. Swap doesn't replace RAM. It extends it. Swap is one of the actual physical places Linux can store memory when RAM is full or when certain pages aren't being used actively."
"If you've used Linux long enough, chances are you've bumped into the term . You probably have heard people say things like "Enable swap if your system is crashing" or "Swap makes your machine slow" or "Enable swap if app is dying with OOM" So in this article, let's talk about swap memory, what it is, how to enable it, how to check if it's running, how it's different from virtual memory, and when it helps vs. when it hurts."
Swap is a portion of disk used as a slower backup for RAM. When physical memory becomes full, the Linux kernel moves cold or rarely used memory pages into swap to free RAM for active processes. Swap extends available memory but cannot match RAM performance. Swap resides on HDDs, SSDs, or NVMe devices and serves as one of the physical places Linux stores memory when RAM is exhausted or pages are idle. Proper swap configuration can prevent out-of-memory kills and system crashes, while excessive swapping can degrade performance and increase latency.
Read at Medium
Unable to calculate read time
[
|
]