From aceb81ce21075765fd9579a44acfd101a4ec3503 Mon Sep 17 00:00:00 2001 From: Paul Angus Date: Wed, 28 Nov 2018 08:30:01 +0000 Subject: [PATCH] alternate way of wrting --- systemvm/debian/opt/cloud/bin/setup/cloud-early-config | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/systemvm/debian/opt/cloud/bin/setup/cloud-early-config b/systemvm/debian/opt/cloud/bin/setup/cloud-early-config index 27ec7499d58..e2428b3fbbc 100755 --- a/systemvm/debian/opt/cloud/bin/setup/cloud-early-config +++ b/systemvm/debian/opt/cloud/bin/setup/cloud-early-config @@ -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 }