Created
August 5, 2016 06:14
-
-
Save toanant/3d2c8e016d2790fce214f3a2679ec241 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
sudo dd if=/dev/zero of=/swapfile1 bs=1024 count=8388608 | |
sudo chown root:root /swapfile1 | |
sudo chmod 0600 /swapfile1 | |
sudo mkswap /swapfile1 | |
sudo swapon /swapfile1 | |
free -m | |
sudo swapon -s | |
sudo -s | |
echo '/swapfile1 none swap sw 0 0' >> /etc/fstab | |
echo 'vm.swappiness=30' >> /etc/sysctl.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment