Overview#Swap Space, in Linux, is a Virtual Memory mechanism.
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.
Swap Space can be a dedicated swap partition (recommended), a swap file, or a combination of swap partitions and swap files.
Swap should equal 2x physical RAM for up to 2 GB of physical RAM, and then an additional 1x physical RAM for any amount above 2 GB, but never less than 32 MB.