Delete clean cache to free up memory on your slow Linux.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA.
I've asked the question before a while back but never received an answer to my question on cleaning cache in Linux Redhat distributions. How can I clean cache or dentries inodes from memory? I need to clean cache for a java related program before execution.
Improving Linux performance by preserving Buffer Cache State The file system cache (buffer cache) helps programs to get to their data blocks faster by keeping recently used file blocks in memory. If you copy a large file tree, this has a devestating effect on the cache since all the copied data will also end up in the cache, force other data blocks out of the cache.
However, if you want to force the Linux OS to do clearing memory cache on a particular interval, just add the command to cron job. Here, I show you how. Here, I show you how. Open up your terminal and enter the following command to create a file called cacheclear.sh.
You can drop cache as explained above without rebooting the System i.e., no downtime required. Linux is designed in such a way that it looks into disk cache before looking onto the disk. If it finds the resource in the cache, then the request doesn’t reach the disk.
Experiments and fun with the Linux disk cache. Hopefully you are now convinced that Linux didn't just eat your ram. Here are some interesting things you can do to learn how the disk cache works. Note: The examples shown are for and from 2009 era hardware without SSDs. You may have to multiply several of the example numbers here by 10 to see an appreciable effect. Effects of disk cache on.
So, running sync can help the ensuing drop operations to free more memory. Page cache is memory held after reading files. Linux kernel prefers to keep unused page cache assuming files being read once will most likely to be read again in the near future, hence avoiding the performance impact on disk IO.