"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,"
"What Is Swap Memory? 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."
Swap is disk space allocated as a slower backup for physical RAM, used to hold rarely accessed memory pages so active tasks can use fast memory. The Linux kernel moves cold pages into swap when RAM fills, freeing RAM for actively used processes. Swap extends available memory but does not replace RAM, and swapped pages are slower to access because they reside on HDD/SSD/NVMe. Swap is one of the physical places Linux can store memory during pressure. Swap can prevent out-of-memory kills, but heavy swapping degrades performance and may hurt latency-sensitive production workloads.
Read at Medium
Unable to calculate read time
Collection
[
|
...
]