This is bullshit. I wanted to play Terraria last night but I looked at my RAM usage and it was sitting uncomfortably high at 13 GB (of my 15). So, I close Terraria, and it drops about 2 GB. I close Firefox, Thunderbird, and Zed, and that drops about 2.5 GB. Then I close basically everything and it’s still super high! Each time this happens, I have to restart my computer in order to get the RAM usage lower.
Whenever I look this up it’s usually two camps:
- KDE is just bloated.
- Unused RAM is wasted RAM.
To address both of these:
I disabled a few things in KDE like file indexing (which was my home directory). Cool, so that saved like 100 MB. KDE is supposed to idle at around 3GB anyways, so what now?
The “unused RAM” belief is like a folktale at this point. It’s not true anymore, and buffered/cache memory is shown separately. Plus, I can drop those caches whenever I want… Which I did. File inode cache only really became a problem for me when I was doing Minecraft Datapack development and I was creating hundreds of files on a regular basis as part of hot reload. Then I’d have to drop the entire cache because it wasn’t being free’d…
However, the RAM I’m complaining about is actually not that, because it steps on my available RAM meter. Having a game freeze up because I was out of memory is a pain in the ass.
I even tried installing Zram, which only made matters worse since the active memory allocations seemed to be robbing the CPU of time it would be running game code, just so it could compress file pages. (My system has also just had major lag problems with swap, in general, during high memory pressure, which I should probably report as a bug). My swappiness was probably way too high, but regardless I didn’t see major improvements from that and it only seemed like a bandaid to the real problem. Also, why should I need to use swap when I have 16 GB of RAM and only a few programs open at a time?
This whole thing is pretty annoying. Whenever I have like 11 hours of uptime my memory is unusually high. I also can’t seem to track it down to any particular application…
System: OpenSUSE Tumbleweed
You should use zwap with swappiness 100 if you want zram + swap. You can also enable and configure systemd-oomd (out of memory demon) if you actually run out of memory at times - it goes about things smarter than the kernel (for example killing processes that wait on memory all the time).
Sounds like a memory leak. Is it really KDE? Maybe its the browser or some kind of service running in the background. If memory got leaked out of the app, that it doesn’t matter if you close the app or not, because those are ghost memory now. I had this issue with a local Ai program just yesterday. It doesn’t matter if I close everything, somehow the memory usage shows high amount; because a software leaked and it was not KDE, as this was reproducable.
My point is. you might not know where this leak come from without careful analyzing it. You can’t just conclude its KDEs fault because you don’t know why this happens. You should investigate which program does that.
Memory free ≠ memory available.
Memory free
Memory free? I’ll take a half dozen!
Yes…
What does the following commands show?
df -h -t tmpfs free -hbuffered/cached memory shows separately
Some of it does. Let’s try an experiment: does the reported amount of used memory drop if you run the following command?
sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'(obligatory don’t blindly trust commands from strangers, type them out instead of copy/pasting, yaddayadda)
I think my buffer/cache fell 8GB and my available rose 0.8gb
my debian KDE processes all together idle at around 2.5 gb, you must have a crapload of autostart background processes?
when I have youtube in firefox open, that takes up 4 gigs by itself
Like half the lines in that screenshot say Firefox, so I’m gonna guess it’s mostly that
Yeah I thought so too. I saved about 1 GB after I took this screenshot by closing Firefox.
If you have a trillion tabs open it’s a trillion applications, not one.
Try using ZFS. My RAM is often ~53 GB idle.
That’s just because ZFS’s disc cache shows up as application-used memory, instead of disc cache memory. (Disc cache memory is often reported in system monitor tools as ‘free’ memory, because it can be freed up as soon as you need it. ZFS’s disc cache works the same way, but it’s not reported separately to the OS, so that makes it look like ZFS is using a shitload of RAM.) If it bothers you, you can set a maximum amount of RAM for ZFS to use, and that will clear it up. It will mean that your performance is slightly worse, though, because ZFS won’t be able to use disc caching optimally.
Oh, it doesn’t bother me. Unused RAM is wasted RAM after all. LMAO.
I would kill all Firefox processes and see if it’s a memory leak, also
free -mhwill show you what’s in use. Most nix systems will have a load of memory in cachesdon’t use Zram use Zswap
I agree, it makes much more sense
It’s called ram spreading, it’s out of control
Firefox memory leak?









