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:35 UTC
[cloudstack] 02/18: fix blank tools.conf increase swap backpressure
periodically sync and clear cache disable vgauth
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 968a1e16d69c41fba9d17e5192f7872df123b596
Author: Paul Angus <pa...@shapeblue.com>
AuthorDate: Fri Nov 23 20:56:07 2018 +0000
fix blank tools.conf
increase swap backpressure
periodically sync and clear cache
disable vgauth
---
systemvm/debian/etc/cron.daily/clear_cache | 5 +++++
systemvm/debian/etc/cron.hourly/clear_cache | 8 ++++++++
systemvm/debian/etc/sysctl.conf | 2 +-
systemvm/debian/etc/vmware-tools/tools.conf | 17 +++++++++++++++++
.../scripts/configure_systemvm_services.sh | 5 +++--
5 files changed, 34 insertions(+), 3 deletions(-)
diff --git a/systemvm/debian/etc/cron.daily/clear_cache b/systemvm/debian/etc/cron.daily/clear_cache
new file mode 100644
index 0000000..e2662f9
--- /dev/null
+++ b/systemvm/debian/etc/cron.daily/clear_cache
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+# clear memory cache to ultimately reduce swapping
+
+sync && echo 1 > /proc/sys/vm/drop_caches
diff --git a/systemvm/debian/etc/cron.hourly/clear_cache b/systemvm/debian/etc/cron.hourly/clear_cache
new file mode 100644
index 0000000..5daa167
--- /dev/null
+++ b/systemvm/debian/etc/cron.hourly/clear_cache
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+# clear memory cache to ultimately reduce swapping
+
+phymem=$(free|awk '/^Mem:/{print $2}')
+if [ $phymem -lt 513000 ]; then
+ sync && echo 1 > /proc/sys/vm/drop_caches
+fi
diff --git a/systemvm/debian/etc/sysctl.conf b/systemvm/debian/etc/sysctl.conf
index e6c2a34..e07a345 100644
--- a/systemvm/debian/etc/sysctl.conf
+++ b/systemvm/debian/etc/sysctl.conf
@@ -65,4 +65,4 @@ net.ipv6.conf.all.autoconf = 0
vm.swappiness=1
# make the kernel more aggressive in reclaiming RAM from the disk and swap caches
-vm.vfs_cache_pressure = 50
+vm.vfs_cache_pressure = 200
diff --git a/systemvm/debian/etc/vmware-tools/tools.conf b/systemvm/debian/etc/vmware-tools/tools.conf
new file mode 100644
index 0000000..b2007e3
--- /dev/null
+++ b/systemvm/debian/etc/vmware-tools/tools.conf
@@ -0,0 +1,17 @@
+[logging]
+# Turns on logging globally. It can still be disabled for each domain.
+# log = true
+
+# Disables core dumps on fatal errors; they're enabled by default.
+# enableCoreDump = false
+
+# Defines the "vmsvc" domain, logging to file
+# vmsvc.level = message
+vmsvc.handler = file
+# Setup file rotation - keep 3 files
+vmsvc.maxOldLogFiles = 3
+# Max log file size kept: 1 MB
+vmsvc.maxLogSize = 1
+
+# Defines the "vmtoolsd" domain, and disable logging for it.
+# vmtoolsd.level = none
diff --git a/tools/appliance/systemvmtemplate/scripts/configure_systemvm_services.sh b/tools/appliance/systemvmtemplate/scripts/configure_systemvm_services.sh
index 4869501..c9a8d0f 100644
--- a/tools/appliance/systemvmtemplate/scripts/configure_systemvm_services.sh
+++ b/tools/appliance/systemvmtemplate/scripts/configure_systemvm_services.sh
@@ -19,7 +19,7 @@
set -e
set -x
-CLOUDSTACK_RELEASE=4.11.2
+CLOUDSTACK_RELEASE=4.11.2.1
function configure_apache2() {
# Enable ssl, rewrite and auth
@@ -46,7 +46,7 @@ function install_cloud_scripts() {
rsync -av ./cloud_scripts/ /
chmod +x /opt/cloud/bin/* /opt/cloud/bin/setup/* \
/root/{clearUsageRules.sh,reconfigLB.sh,monitorServices.py} \
- /etc/profile.d/cloud.sh
+ /etc/profile.d/cloud.sh /etc/cron.daily/* /etc/cron.hourly.*
chmod -x /etc/systemd/system/*
@@ -108,6 +108,7 @@ function configure_services() {
systemctl disable strongswan
systemctl disable x11-common
systemctl disable xl2tpd
+ systemctl disable vgauth
configure_apache2
configure_strongswan