whatis swap
Swap
Also known as: swap space, swap file, zram
Disk space (or compressed RAM with zram) the kernel uses to page out inactive memory when physical RAM runs short.
What Is Swap Space in Linux?
Swap lets the kernel move rarely used pages out of RAM so active programs and the file cache get more room. A little swap usage is normal and healthy; constant heavy swapping means you need more memory.
Swap can be a partition or a file. zram creates a compressed swap device in RAM itself, which is much faster than disk and is the default on Fedora. Hibernation requires disk swap at least as large as RAM in use.
Example
swapon --show
free -h Learn more about Swap
- Swap Space Explained What swap actually does on Linux, how it differs from RAM, how to create a swap partition or swapfile, and how to tune swappiness for desktops, laptops, and servers.
- zram and Swap Tuning: Compressed Memory Instead of Disk zram gives you swap that lives in RAM, compressed. On machines with limited memory it is dramatically faster than swapping to disk, and most distributions now enable it by default.
- Monitoring Memory Usage on Linux A practical guide to checking memory usage on Linux: reading /proc/meminfo, understanding what counts as "used" memory, finding which process is consuming RAM, and recognizing real memory pressure versus normal cache behavior.