[HDD]
We recommends to 2 Gig of ram, and 4 Gig of swap.
The more ram the better, but much more than 4Gig of swap isn't as useful.
[SSD]
500MB is enought
To add 4 Gig of swap, assuming you have enough space on disk, would be to run:
4096 = size of your swap, ( MB )
dd if=/dev/zero of=/swapfile count=4096 bs=1MiB
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
and confirm it's loaded in with:
free -m
or by running "top".
If it works, then add this into your /etc/fstab:
/swapfile swap swap sw 0 0