Guest User

Untitled

a guest
Nov 16th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. swapon -s
  2.  
  3. cp /etc/fstab /etc/fstab.bak
  4. # For 4 CPU Core create 4 swap files:
  5. for i in $(seq 0 3); do
  6. fallocate -l 1G /swapfile$i;
  7. mkswap /swapfile$i;
  8. swapon /swapfile$i -p 10
  9. echo "/swapfile$i none swap sw 0 0" >> /etc/fstab;
  10. done
  11. swapon -s
  12.  
  13. cp /etc/sysctl.conf /etc/sysctl.conf.bak
  14. echo 'vm.swappiness=10' >> /etc/sysctl.conf
  15. echo 'vm.vfs_cache_pressure=50' >> /etc/sysctl.conf
  16. sysctl -p
Add Comment
Please, Sign In to add comment