One thing I fight with on Linux is RAM and SWAP that is being used in 10ths of GBs, yet tools like htop don't show any processes using that much memory (even when run as super user). I know that disk reads are cached, this is not the problem here though. What is eating up my RAM? Why I cannot identify processes that allocated this memory? How can I reclaim it without rebooting my system?
#Linux #FOSS #htop #Manjaro #sysadmin
@unfa I have the same problem, I have browser and couple of terminal emulators opened and the RAM usage is about 11 GB out of my 16 GB's. I've used a C program to allocate memory and it went to 5 GB allocated before it was killed, after that still 10.5 GB used so it's not a disk cache problem? I'm using Manjaro KDE. (I also noticed that after I wake up my PC from sleep the ram usage grows by ~3 GB and it doesn't get freed no matter what I do) The htop also doesn't show anything suspicious.
I always think that linux never unallocate ram as long as it's not needed.
So i end up monitoring swapin/swapoff (the amount of memory going to/from swap) to monitor memory issues.
The command free can show you what is in the cache, memory used as cache (data) can be reused for anything once you stop working on it.
Let's say you open a doc, it goes on ram and will stay in cache data even when you close it. It will be delete if needed
Example (I have 16GB of ram):
I have 10GB ram used (htop) and 7.1GB is in buff/cache (free -h).
Then I run a VM in Virtualbox. The system get's very unresponsive (about 99.5% ram usage). When I kill the VM, buff/cache is still ~7GB. Can you explain that?
I noticed that this issue (at least partially) occurs when I wake up my PC from sleep. https://forum.manjaro.org/t/accumulating-lots-of-not-easily-reclaimable-shared-and-buff-cache-after-waking-up-from-sleep/64150
Server run by the main developers of the project It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!