mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
In order to reduce memory footprint and improve boot speed/predictability. The following changes have been made: - add vm.min_free_kbytes to sysctl - periodically clear disk cache (depending on memory size) - only start guest services specific to hypervisor - use systemvm code to determine hypervisor type (not systemd) - start cloud service at end of post init rather than through systemd - reduce initial threads started for httpd - fix vmtools config file Fixes #3039 Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
9 lines
183 B
Bash
Executable File
9 lines
183 B
Bash
Executable File
#!/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
|