Swap is the extension of the physical memory of the computer. Swap partition is creating during the initial Linux setup.
Swap twice as large as the physical (silicon) memory-RAM but not less than 64 MB. Otherwise e swap space at least 1.5 times the amount of the physical memory on the system. Swanon command is used to enable swap partition for example swapon /dev/hda4. Swap enabled automatically at boot up at the proper entry in /etc/fstab by the following line /dev/hda4 swap swap defaults 0 0. Swapoff used to disable the partition example swapoff /dev/hda2