Created
April 5, 2017 08:47
-
-
Save simonkberg/bd02fd45efcba0dfc3ee8d7a39a1ba17 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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