Created
April 12, 2021 16:07
-
-
Save noudadrichem/524c666ca924ba5b9aaa8a06ebeeeb44 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
echo "Creating 3gb swap for $(whoami)" | |
free -h | |
sudo fallocate -l 3G /swapfile | |
ls -lh /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
sudo swapon --show | |
free -h | |
sudo sysctl vm.swappiness=10 | |
sudo sysctl vm.vfs_cache_pressure=50 | |
echo "--DONE--" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment