A swap partition is treated in Linux as the extension of RAM. Swap partitions are used as virtual memory when the system runs out of physical memory. Swapping occurs when a running process requires more RAM than there is available. One or more pages of RAM that have not been used recently are swapped out to make RAM available. Because disks are much slower than RAM, the more swapping occurs, the slower your system will be.
If you have a large amount of RAM, you probably won’t need to use the swap partition. However, if you’ve created the swap partition during the installation, you can use the swapon -s command to display information about the swap partition: