How to reduce buffers\cache

Since you don't seem to accept neither our opinions not the various pages we have linked to as 'official', perhaps the official Red Hat documentation will convince you:

In this example the total amount of available memory is 4040360 KB. 264224 KB are used by processes and 3776136 KB are free for other applications. Do not get confused by the first line which shows that 28160KB are free! If you look at the usage figures you can see that most of the memory use is for buffers and cache. Linux always tries to use RAM to speed up disk operations by using available memory for buffers (file system metadata) and cache (pages with actual contents of files or block devices). This helps the system to run faster because disk information is already in memory which saves I/O operations. If space is needed by programs or applications like Oracle, then Linux will free up the buffers and cache to yield memory for the applications. If your system runs for a while you will usually see a small number under the field "free" on the first line.


This is all fine and dandy, but what about the lag time between having to make the request for memory, mapping it out for what the disk cache has to release? Sure, you may say it's minimal, or not even noticeable, but maybe I care about the 0.0000001 seconds added because of this process. Who are you to decide how my RAM is used?

What if I don't want to experience this lag time? Maybe I don't mind my applications loading slower from the drive, but want it to occupy RAM immediately without the lag time to unmap memory from disk caching.

How can I limit how much RAM my disk cache is taking up? Don't tell me this was implemented without a way to do so.

UPDATE: Found a way to do it.

echo 3 | sudo tee /proc/sys/vm/drop_caches

Do a: free -m after running the above to confirm. It works.