After having used x2go that cache seems to fill up quickly and stays there (and oh boy... Steam...).
When I check out the running processes in Atop they are not taking much but there is a cache of 1.2 G.
Linux mem will be maxed from time to time and that is mostly no problem, just Linux doing its job.
(If you have the memory - use it! It does make sense).
But when you use that program that goes beyond the limit your computer can freeze up a bit and applications can crash - typically games.
There is not much harm in (occasionally) removing it and frankly the output of Atop and Htop make more sense then.
So here we go:
Code: Select all
sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"
..and your memory cache is gone. Htop looks nice again and in some strange way it feels way better to look at the mem in one of those programs now
If you do not have programs that push the limits - you do not need to do this -leave it to Linux.
But then there are those times when one program has made all lamps blink red....
Or you want to benchmark the speed of your disks - you need to clear the cache for that. (yup that cache normally makes your computer faster - not slower)
Or as a security feature.
If you want to clear your swap you can just turn it off and on again:
Code: Select all
swapoff -a
Code: Select all
swapon -a