Unix/Linux Swap partition has the same usage
as the windows pagefile.sys; Pages of real memory are moved to/fro as needed.
The normal setup for a Swap partition is 2x real ram installed, but not more than
3x. You need a separate partition as it has its own formatting requirements
You can also use a swapfile no problem if you don't want to waste disk space on a dedicated partition. The performance difference is nonexistent unless you plan on doing very heavy swapping. 2GB of swap is more than enough for any sane use.