further tweaks - add vm.min_free_kbytes=20480

This commit is contained in:
Paul Angus 2018-11-27 17:28:38 +00:00
parent 7aa12dbc62
commit 7a5b167f90
2 changed files with 5 additions and 2 deletions

View File

@ -66,3 +66,6 @@ vm.swappiness=1
# make the kernel more aggressive in reclaiming RAM from the disk and swap caches
vm.vfs_cache_pressure = 200
# try to maintain 'free' memory thereby reducing the size of disk cache, hence reducing swapping.
vm.min_free_kbytes = 20480

View File

@ -206,10 +206,10 @@ patch() {
physmem=$(free|awk '/^Mem:/{print $2}')
case $physmem in
[1-4095999])
sysctl -w vm.vfs_cache_pressure=200
sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 200" /etc/sysctl.conf
;;
*)
sysctl -w vm.vfs_cache_pressure=100
sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 100" /etc/sysctl.conf
;;
esac