Created
March 2, 2015 01:12
-
-
Save fukawi2/329aa44e9a6486f0f739 to your computer and use it in GitHub Desktop.
low-mem vps swapfile
This file contains hidden or 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
swapfile=/swapfile.0 | |
fallocate -l 1G $swapfile | |
chmod 600 $swapfile | |
mkswap $swapfile | |
swapon $swapfile | |
echo "$swapfile none swap sw 0 0" >> /etc/fstab | |
sysctl vm.swappiness=10 | |
echo vm.swappiness=10 > /etc/sysctl.d/swappiness |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment