On my system, I have a log file that is being rotated and uploaded every hour. This file is heavy on writes and only needs to be read when rotated and uploaded.
The cached
memory on my system is raising until it allocates the entire RAM and then the OS clears some of it. I want to improve that process and I suspect that the cache is rising b/c of this log file I keep writing to all the time.
I need to find a way to clear the cache of that file after I upload it so I can tell the OS this is no longer needed and let it free up memory.
As far as I know, echo 3 > /proc/sys/vm/drop_caches
clears all cached memory. Is that correct?
Is there any way to clear up cached memory for just one file?