I am one of those Linux users who either skips SWAP during installation or assigns minimum space possible.
Reason being, now a days RAM is affordable, 2Gb RAM is common. Thus there is no logic assigning one & half OR double size of your RAM to SWAP. With routine work I hardly consume 400Mb.
So basically we do not require higher SWAP unless we use memory hogging application, e.g I want to try new Linux distro on virtual machine (although VM works on physical memory, just for example).
Create 1Gb swapfile
dd if=/dev/zero of=/tmp/swapfile bs=1MB count=1024
Create swap area
mkswap /tmp/swapfile
Enable Swapfile
swapon /tmp/swapfile
Check total size of SWAP memory.
free -m
If you wish to make it permanent enter following line in /etc/fstab
/tmp/swapfile swap swap defaults 0 0
In case you wish to remove additional swap
swapoff /tmp/swapfile
rm -rf /tmp/swapfile
Pingback: How to Modify Swap Size – Ubuntu 10.04 « It Could Always Be Worse