1. sudo fallocate -l 4G /swapfile
2. sudo chmod 600 /swapfile
3. sudo mkswap /swapfile
4. sudo swapon /swapfile
5. sudo swapon -s
6. free -m
7. sudo nano /etc/fstab
8. /swapfile none swap sw 0 0
https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04