So I investigated, finally finding a solution on this askubuntu.com post:
askubuntu-link
So here's what we do:
total memory in KB: +-8000000kb (8gb)
total CPU cores: 4 cores
min_free_kbytes = (total memory * 5%) / cores = 100000kb
Set minimum free ram:
sudo sysctl -w vm.min_free_kbytes=100000
Set how much of the disk to cache:
sudo sysctl -w vm.swappiness=5
Now to make it permanent just add the following to you /etc/sysctl.conf file:
vm.swappiness=5
vm.min_free_kbytes=100000
Hope this helps someone!
Now to make it permanent just add the following to you /etc/sysctl.conf file:
vm.swappiness=5
vm.min_free_kbytes=100000
Hope this helps someone!