You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pa...@apache.org on 2018/12/12 22:11:39 UTC

[cloudstack] 06/18: alternate way of wrting

This is an automated email from the ASF dual-hosted git repository.

paul_a pushed a commit to branch 41120-memory
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit aceb81ce21075765fd9579a44acfd101a4ec3503
Author: Paul Angus <pa...@shapeblue.com>
AuthorDate: Wed Nov 28 08:30:01 2018 +0000

    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 27ec749..e2428b3 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
 }