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 7aa12dbc62e2a4557dddfc5a99a75e70d8c84d03
Author: Paul Angus <paul.an...@shapeblue.com>
AuthorDate: Mon Nov 26 09:36:12 2018 +0000

    adjust cache back pressure dynamically on startup - reduce to default on 
'normal' memory size (4GB+)
---
 systemvm/debian/opt/cloud/bin/setup/cloud-early-config | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/systemvm/debian/opt/cloud/bin/setup/cloud-early-config 
b/systemvm/debian/opt/cloud/bin/setup/cloud-early-config
index 8ba7701..a73300b 100755
--- a/systemvm/debian/opt/cloud/bin/setup/cloud-early-config
+++ b/systemvm/debian/opt/cloud/bin/setup/cloud-early-config
@@ -202,6 +202,17 @@ patch() {
     cat /mnt/cmdline > $CMDLINE
   fi
 
+  # set cache back pressure based on amount of physical memory 100 is default
+  physmem=$(free|awk '/^Mem:/{print $2}')
+  case $physmem in
+    [1-4095999])
+      sysctl -w vm.vfs_cache_pressure=200
+      ;;
+    *)
+      sysctl -w vm.vfs_cache_pressure=100
+      ;;
+  esac
+
   return 0
 }
 

Reply via email to