Wednesday, June 5, 2013

Freeing up memory cache for Linux OS

The Linux OS has very good RAM management system.
It free up cached memory when it needs.
But if you need to free up memory by force, you
can apply following command

sync; echo 3 > /proc/sys/vm/drop_caches

If you want to do it automatically, run a cron job to do it automatically.

create a file "" with the following content

sync; echo 3 > /proc/sys/vm/drop_caches

Then create a cronjob like

0 * * * * /root/

It will now run every hour and clear memory cache.

No comments:

Post a Comment