You are not logged in.
Hi everyone. Today I noticed that my Linux system on my laptop is using 3.5 out of 4 gigabytes of ram.
I read www.linuxatemyram.com and tried dropping the caches but that barely did anything.
Various methods of querying application ram did not show anything taking up a lot (top/ps).
Here's what
free -m
shows:
free -m
total used free shared buff/cache available
Mem: 3819 3358 242 8 217 231
Swap: 8191 3226 4965
Hand here's the process ram usage (processes under 1MB omitted)
ps aux | awk '{print $6/1024 " MB\t\t" $11}' | sort -n
1.02344 MB /usr/lib/accounts-daemon
1.09766 MB /usr/lib/gvfsd-trash
1.10156 MB /usr/lib/udisks2/udisksd
1.13281 MB /usr/lib/gvfs-udisks2-volume-monitor
1.19531 MB /usr/bin/gdm
1.24609 MB /usr/share/vscodium-bin/codium
1.25 MB /usr/lib/colord
1.26172 MB /usr/lib/polkit-1/polkitd
1.58203 MB sort
1.79297 MB /usr/lib/upowerd
2.01172 MB /usr/bin/wpa_supplicant
2.02344 MB nemo
2.03125 MB /usr/share/vscodium-bin/codium
2.05078 MB /usr/bin/dbus-daemon
2.30469 MB /opt/joplin-desktop-bin/@joplinapp-desktop
2.33984 MB /opt/joplin-desktop-bin/@joplinapp-desktop
2.47266 MB /bin/python
2.84766 MB /usr/lib/systemd/systemd-journald
3.10938 MB /usr/share/vscodium-bin/codium
3.15625 MB ps
3.23438 MB /usr/share/vscodium-bin/codium
3.33984 MB awk
3.51172 MB Xwayland
3.66406 MB /usr/bin/zsh
4.14844 MB /opt/joplin-desktop-bin/@joplinapp-desktop
6.04297 MB /usr/bin/NetworkManager
6.44531 MB /usr/share/vscodium-bin/codium
7.38672 MB /usr/share/vscodium-bin/codium
8.41406 MB alacritty
9.00391 MB /usr/lib/firefox/firefox
9.58594 MB sway
11.6133 MB waybar
15.0312 MB /usr/share/vscodium-bin/codium
15.4414 MB /usr/lib/firefox/firefox
16.2773 MB /usr/lib/firefox/firefox
16.668 MB /usr/lib/firefox/firefox
20.8633 MB /usr/lib/firefox/firefox
21.707 MB /usr/lib/firefox/firefox
29.625 MB /usr/lib/firefox/firefox
31.6953 MB /usr/lib/firefox/firefox
53.3906 MB /usr/lib/firefox/firefox
54.457 MB /usr/lib/firefox/firefox
56.7383 MB /usr/lib/firefox/firefox
63.4219 MB /usr/lib/firefox/firefox
102.488 MB /usr/lib/firefox/firefox
121.676 MB /usr/lib/firefox/firefox
179.285 MB /usr/lib/firefox/firefox
This has happened multiple times now and I don't know where to go from here. How can I find out what is using all this RAM?
Edit: I have previously set system.swappiness to 150 to mitigate this issue but the RAM is still filling up.
Last edited by Chad Rosswick (2021-12-16 12:47:53)
Offline
Possible a kernel module/kernel leak:
dmesg
cat /proc/meminfo
what's your GPU? Is it an integrated card? How much memory does it reserve for itself?
Offline
Possible a kernel module/kernel leak
/proc/meminfo: http://ix.io/3IzL
dmesg: http://ix.io/3IzM
I'm using a ThinkPad C13 Chromebook. CPU is AMD Athlon Gold 3150C with Radeon Graphics. Graphics card is only taking up 256 MB of memory.
Last edited by Chad Rosswick (2021-12-16 13:07:49)
Offline
The ringbuffer overflew - please post the system journal ("sudo journalctl -b")
Stop messing around w/ swap control, there ~6.4 GB unaccounted for. I don't think this will be GTT (but let's see) but is more likely a memory leak in a kernel module (what implies to test this against a different kernel) - how long does/did it take to build up this lack?
Online
System journal: http://sprunge.us/AFgZJq
This occurred after I compiled a big rust project which took a lot of ram. Only that the ram was never cleared after.
Offline
The ringbuffer overflew
Also sorry for the delay. There's an outage in my city's public transport and I'm currently trying to get home.
Offline
THe journalis incomplete (and doesn't reveal the running kernel) but right off the bat: you're using varioufs network managing services at the same time.
I'm less than sure t hat this is the cause but nevertheless you should fix that.
This occurred after I compiled a big rust project which took a lot of ram. Only that the ram was never cleared after.
Isolated event or can you actually reproduce this?
Online
THe journalis incomplete
Sorry about that. This should be the full journal: http://sprunge.us/JMznhE
I will try to reproduce after a reboot.
Offline
Wowowowow… are you still in the RAM deficit right now? Don't reboot unless you absolutely have to.
Edit:
#1
Dez 15 13:07:06 archlinux kernel: [drm] amdgpu: 2864M of GTT memory ready.
So the GPU is very GTT positive. This matches about the unaccounted physical RAM.
Is the swap in an (encrypted) lvm?
Last edited by seth (2021-12-16 15:13:51)
Online
Is the swap in an (encrypted) lvm?
Too late I already rebooted. The swap is it's own partition.
Offline
If you can re-establish the situation, try to deactivate the swap and reclaim the RAM, https://bbs.archlinux.org/viewtopic.php … 9#p2004169 (thread w/ similar situation and link illustrating the abuse of heads and tails)
Online
If you can re-establish the situation, try to deactivate the swap and reclaim the RAM
So disable swap and stress the ram to reclaim it whenever that happens again. Got it. Thanks for the help.
Offline
If you can re-establish the situation
So. I think I figured it out. It happens whenever Rust-Analyzer (Language server for rust) does something. So I think that program is at fault.
Offline
Seems known to be a memhog, https://github.com/rust-analyzer/rust-a … ssues/9470
Could you reclaim the memory afterwards w/ the head/tail abuse?
Online