Last active
November 18, 2022 20:12
-
-
Save jhowbhz/8aad5db7a5ad0c72810d50bb2a4eb04f to your computer and use it in GitHub Desktop.
memoria swap linux
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
sudo swapon --show | |
sudo fallocate -l 25G /swapfile1 | |
ls -lh /swapfile1 | |
sudo chmod 600 /swapfile1 | |
ls -lh /swapfile1 | |
sudo mkswap /swapfile1 | |
sudo swapon /swapfile1 | |
sudo swapon --show | |
sudo cp /etc/fstab /etc/fstab.bak | |
echo '/swapfile1 none swap sw 0 0' | sudo tee -a /etc/fstab | |
sudo nano /etc/sysctl.conf | |
#Adicione as duas linhas | |
vm.vfs_cache_pressure=40 | |
vm.swappiness=20 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment