Linux uses the SWAP SPACE to increase virtual memory. Swap space is the partition on the hard disk. When a Linux is set up, a swap partition is created on the hard disk; this serves as an extension of a computer’s real memory (RAM) so that the effective size of usable memory grows.
Having a swap space helps your system pretend as though you have more RAM than you actually do. Linux can use either a normal file in the system or a separate partition for swap space.
It is important to also note that Linux allows one to use several swap partitions and / or swap files at the same time.
Swap-swap space in linux is used when the amount of physical memory(ram) is full. if the system needsmore memory resources and the ram is full,inactive pages in memory are moved to the swap space.while swap space can helpmachines with a small amount of ram, it should not be considered areplacement for more ram. swap space is located on hard drives, which have a sloweraccess timethan physical memory. swap space can be a dedicated swap partition (recommended), aswap file, or a combination of swap partitions and swap files. the size of your swapshould be equal to twice your computers physical ram for up to 2 gb of physicalram. for physical ram above 2 gb, the size of your swap should be equal to theamount of physical ram above 2 gb. the size of your swap should never less than 32mb. using this basic formula, a system with 2 gb of physical ram would have 4 gb ofswap, while one with 3 gb of physical ram would have 5 gb of swap.