mirror of https://github.com/apache/cloudstack.git
further tweaks - add vm.min_free_kbytes=20480
This commit is contained in:
parent
7aa12dbc62
commit
7a5b167f90
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue