Your Question: What Is Swap Size in Linux?
Contents Swap Space in Linux Is Used When the Amount of Physical Memory (Ram) Is Full. If the System Needs More Memory Resources and the Ram Is Full, Inactive...
Swap space in Linux is used when the amount of physical memory (RAM) is full. If the system needs more memory resources and the RAM is full, inactive pages in memory are moved to the swap space. … Swap space is located on hard drives, which have a slower access time than physical memory.
How do you define swap size?
It suggests swap size to be:
- Twice the size of RAM if RAM is less than 2 GB.
- Size of RAM + 2 GB if RAM size is more than 2 GB i.e. 5GB of swap for 3GB of RAM.
Must Read
What is a good swap size?
5 GB is a good rule of thumb that will ensure you can actually hibernate your system. That should usually be more than enough swap space, too. If you have a large amount of RAM — 16 GB or so — and you don’t need hibernate but do need disk space, you could probably get away with a small 2 GB swap partition.