alternate way of wrting

This commit is contained in:
Paul Angus 2018-11-28 08:30:01 +00:00
parent 7a5b167f90
commit aceb81ce21
1 changed files with 3 additions and 6 deletions

View File

@ -204,14 +204,11 @@ patch() {
# set cache back pressure based on amount of physical memory 100 is default
physmem=$(free|awk '/^Mem:/{print $2}')
case $physmem in
[1-4095999])
if [ $((physmem)) -lt 409600 ]; then
sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 200" /etc/sysctl.conf
;;
*)
else
sed -i "/^vm.vfs_cache_pressure/ c\vm.vfs_cache_pressure = 100" /etc/sysctl.conf
;;
esac
fi
return 0
}