wido commented on a change in pull request #3127: Improve System VM startup and 
memory usage [4.11]
URL: https://github.com/apache/cloudstack/pull/3127#discussion_r250552812
 
 

 ##########
 File path: 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
 
 Review comment:
   Same applies here. The kernel is the one who clears the page cache if it 
needs the memory for something else

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to