Very simple and useful tutorial how to increase swap space.
Source: http://askubuntu.com/questions/178712/how-to-increase-swap-space
- creat .img file
sudo dd if=/dev/zero of=/swap.img bs=1M count=1000
note!: bs=1M count=1000 ==> 1GB
(bs * count = size in megabytes )
other example :
sudo dd if=/dev/zero of=/swap.img bs=10M count=100
- format .img file
sudo mkswap /swap.img
- enable swap file
sudo swapon /swap.img
- add swap file to fstab
add this line to your fstab (/etc/fstab)
/swap.img none swap sw 0 0
How to increase swap space