When you run out of memory, some of the data is stored in SWAP, so memory can be used for something else.
Also, some files might be saved to swap, so it takes less time to find and read them.
And when you hibernate your PC, the contents of RAM get saved onto the SWAP partition, but this only works when your SWAP is larger than amount of your RAM and amount of SWAP already used combined.
A swap partiton because it is a dedicated partition and not a file
82 => Linux swap / Solaris 83 => Linux ext2 & ext3 85 => Linux Extended partition
82
None. It is possible to operate Linux without a swap file or partition.
Linux swap partition has the code 82 (hex). A swap partition must be formatted with mkswap before first use. You can use swapon and swapoff utilities to enable/disable swap
Swap partition
That is the "swap partition." It is a dedicated space on the hard disk that fulfills the "swap" feature of virtual memory in Linux.
True.
It uses the swap. The swap is a dedicated partition and not a file.
You do not need to set up a dedicated partition for swap as you can also set up a swap file.
Linux uses a swap partition, a piece of the hard disk itself set aside by the system for receiving page-swapping. However, if you have more than 2-3 GiB of RAM on your desktop, you probably want need to make use of virtual memory at all in Linux.
If you have plenty of RAM: 1, as a swap partition is rarely used by Linux on systems with more than 2 or 3 GiB of RAM available, and all the toplevels of the Linux directory structure can be put on the same partition. A swap partition on a system with plenty of RAM is a waste of hard disk space. If you're strapped for memory, 2, to allow for the swap partition, so that Linux can extend its memory onto the hard disk so you won't run out. A good rule of thumb is to create a swap partition at LEAST 1.5 times larger than your system RAM. For example, if you have 512 MiB of RAM: a 768 MiB MINIMUM swap partition is advised. If you have lots of hard disk space, an ideal consideration is actually to triple your RAM in swap space: 512 MiB of RAM will be supported by a 1.5 GiB swap partition. Personally, if you have lots of hard disk space, I recommend at least 3: One for /, one for /home, and one for swap, if needed, otherwise it'll be for /boot.