I created a clear_disk_cache.sh script and had the following in it
Then manually put it in the root's cron job at /var/spool/cron/root to run every 10 minutes, I experimented with a few other values and found the 10 minute cron job was a good time.Code:sync; echo 3 > /proc/sys/vm/drop_caches
Now my system runs with 150-256mb physical ram free at any given moment giving enough memory to scripts and other memory intensive services that need it more than cache. Before I did this, I would often have 12-25 MB of free physical ram which caused a whole bunch of issues.
Let me know if any body else has results from this as well.
Original credits to Linux: How To Clear The Cache From Memory



LinkBack URL
About LinkBacks
Reply With Quote







