Skip to content

Instantly share code, notes, and snippets.

@jhowbhz
Last active November 18, 2022 20:12
Show Gist options
  • Save jhowbhz/8aad5db7a5ad0c72810d50bb2a4eb04f to your computer and use it in GitHub Desktop.
Save jhowbhz/8aad5db7a5ad0c72810d50bb2a4eb04f to your computer and use it in GitHub Desktop.
memoria swap linux
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