Create 2GB Swap
sudo install -o root -g root -m 0600 /dev/null /swapfile
dd if=/dev/zero of=/swapfile bs=1k count=2048k
mkswap /swapfile
swapon /swapfile
echo "/swapfile swap swap auto 0 0" | sudo tee -a /etc/fstab
sudo sysctl -w vm.swappiness=10
echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf
Written by Zakaria Braksa
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Linux
Authors
Related Tags
#linux
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#