diff --git a/systemvm/debian/etc/cron.daily/clear_cache b/systemvm/debian/etc/cron.daily/clear_cache new file mode 100644 index 00000000000..e2662f9380f --- /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 00000000000..5daa16744d0 --- /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 e6c2a34ca52..e07a345481f 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 00000000000..b2007e3090e --- /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 48695014bd9..c9a8d0f8e09 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