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.

@Ernest1337 @unfa
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

@oldsysops @unfa
But the problem is, it doesn't get unallocated even if it's 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?


@Ernest1337 @unfa how many ram did you configure on the vm ?

@oldsysops @unfa VM has 4GB assigned to it. Either way my PC should handle the workflow I was running then, this is: Brave browser + couple of terminal emulators (konsole) + file manager and the VM. The RAM usage shouldn't be as high as 10GB in the first place.

@oldsysops @unfa That surely isn't a normal behaviour. I closed every app except terminal, disabled the swap, dropped the caches (/proc/sys/vm/drop_caches), ran the memory allocation program which was killed at 5800MB and took this screenshot. Memory usage at 10GB and no way of reclaming it. HELP

@Ernest1337 @oldsysops Stuff like this happens to me a lot. But not always. It has to be a bug, maybe in the Kernel?

@unfa @oldsysops If that's a bug in the kernel, wouldn't it be a huge deal in the data centers? I wonder if that's something specific to Manjaro KDE or some application we are running.

@Ernest1337 @oldsysops I've been seeing stuff like this happening in the past decade. Maybe it's a bug in I should try Wayland.

@unfa @oldsysops Yeah, makes sense, but why is it not known? Maybe it's hardware (driver) specific?

@Ernest1337 @unfa the htop screen you show put plasmashell in top clndumer of memory.
Use this command :
ps aux |sort -nk4| tail -20
To find the 20 process which use most of the memory.
I don't know well but it's seems odd that ot use so much memory.

@oldsysops @unfa But it doesn't use that much memory. 3% of my 16GB is only 480MB. Correct me if i'm wrong. Maybe I don't understand something.

@oldsysops @unfa Now when I see the screenshot I sent earlier, I had very high shared memory usage. Now on a different session I have only 500MB in shared memory. Interesting...

Sign in to participate in the conversation
La Quadrature du Net - Mastodon - Media Fédéré est une serveur Mastodon francophone, géré par La Quadrature du Net.