Last active
June 23, 2016 14:06
-
-
Save monobilisim/8896430 to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
# count=4096k -> 4G | |
sudo dd if=/dev/zero of=/swapfile bs=1024 count=4096k | |
mkswap /swapfile | |
swapon /swapfile | |
chown root:root /swapfile | |
chmod 0600 /swapfile | |
sysctl vm.swappiness=10 | |
cat /proc/sys/vm/swappiness | |
echo "/swapfile swap swap defaults 0 0" > /etc/fstab | |
echo "vm.swappiness = 0" > /etc/sysctl.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment