Skip to content

Instantly share code, notes, and snippets.

@simonkberg
Created April 5, 2017 08:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonkberg/bd02fd45efcba0dfc3ee8d7a39a1ba17 to your computer and use it in GitHub Desktop.
Save simonkberg/bd02fd45efcba0dfc3ee8d7a39a1ba17 to your computer and use it in GitHub Desktop.
fallocate -l 1G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
sysctl vm.swappiness=10
sysctl vm.vfs_cache_pressure=50
echo 'vm.swappiness = 10' | sudo tee -a /etc/sysctl.conf
echo 'vm.vfs_cache_pressure = 50' | sudo tee -a /etc/sysctl.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment