---

Creating SWAP partition using FDISK & FALLOCATE commands

Swap-partition holds the memory which is used in case the physical memory (RAM) is full . When RAM capacity has been utilized to maximum , Linux machine moves inactive pages from memory to swap-space which are then used by the system. Though it gets the work done, it should not be considered as a replacement to physical memory/RAM. In most cases, it is advised to keep SWAP-memory equal to size of physical memory at minimum & double the size of physical memory at maximum. So if you have 8 GB RAM on your system, Swap should be between 8-16 GB.

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis