How To Clear Cache Memory, Buffer Cache In Linux
how to clear cache, It’s a good idea to clear the memory on the server because it can slow down the server performance. There will be no problem of flushing the cache on the server.
Check Out : Rpmdb Open Failed
As this is a non-destructive operation and dirty objects are not free able, You should run ‘sync’ first.
1. Free Pagecache
sync; echo 1 > /proc/sys/vm/drop_caches
2. Free Dentries and inodes
sync; echo 2 > /proc/sys/vm/drop_caches
3. Free Pagecache, Dentries and inodes
sync; echo 3 > /proc/sys/vm/drop_caches
You can also create a script and run this using crontab
10 * * * * sync; “echo 3 > /proc/sys/vm/drop_caches”