So I recently built a new computer to replace my 7 year old one but I have noticed a strange problem with it.
When I boot up the computer and use it as normal it sits around 8-10 GiB of ram in use plus about another 9 GiB committed.
But when I suspend the computer then un-suspend it later the in use ram starts creeping up even if I have less running than I did when I originally booted the computer.
Last time this happened it went from 10 GiB all the way up to about 43 GiB in the space of a few hours.
If I reboot then things go back to normal behavior.
Anyone have any ideas about what I could look for to fix it?
Specs:
- Manjaro XFCE 25.0.0 Zetar
- 6.13.8-2 Kernel
- Gigabyte B860I AORUS PRO ICE ITX Motherboard
- Intel Core Ultra 5 245KF CPU
- 64GB DDR5 RAM
- 2TB M.2 NVMe
My guess it just doesn’t evict stuff from before the suspend, starts re-loading stuff after the resume, which makes the apparent amount “used” go up.
On a normal linux system, “free” RAM will over time drop down to zero, as the kernel puts the extra memory available to use. But it doesn’t mean there isn’t room to evict less-needed stuff if necessary.
AFAIK linux only starts actively evicting RAM once it fills up.
Like the other guy mentioned, drill down and see if you can find the actual program causing the problem.
Can you see with top or ps what program is eating up all the RAM? Probably some bug you may report.
Here is what I started with:
And what I have today after 3 suspends:
xfwm is XFCE’s window manager, and it’s eating almost 30% of the total system memory, so that’s the prime suspect (I’m not exactly sure how much it interacts with other apps, so it’s possible something else is forcing xfwm to use all that memory, but that is IMHO unlikely).
An ugly “fix” is to log out and log back in (yes, not much better than just rebooting), or you could try to somehow restart xfwm - running
xfvm --replace
in terminal might work.Edit: there’s an issue on the Manjaro forums that might be related: https://forum.manjaro.org/t/xfwm4-memory-leak-since-4-20/173910/7
Will check after work today.
What is the output of “free -h”?
Just made a reply to Björn Tantau.
What desktop environment are you using?
XFCE