You are not logged in.

#1 2021-12-16 12:46:12

Chad Rosswick
Member
Registered: 2021-06-27
Posts: 36

Ram is neither used by cache nor by applications but is still full

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

#2 2021-12-16 12:54:48

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,410

Re: Ram is neither used by cache nor by applications but is still full

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?

Online

#3 2021-12-16 13:05:06

Chad Rosswick
Member
Registered: 2021-06-27
Posts: 36

Re: Ram is neither used by cache nor by applications but is still full

V1del wrote:

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

#4 2021-12-16 13:34:40

seth
Member
Registered: 2012-09-03
Posts: 49,948

Re: Ram is neither used by cache nor by applications but is still full

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

#5 2021-12-16 14:31:00

Chad Rosswick
Member
Registered: 2021-06-27
Posts: 36

Re: Ram is neither used by cache nor by applications but is still full

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

#6 2021-12-16 14:32:00

Chad Rosswick
Member
Registered: 2021-06-27
Posts: 36

Re: Ram is neither used by cache nor by applications but is still full

seth wrote:

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

#7 2021-12-16 14:37:47

seth
Member
Registered: 2012-09-03
Posts: 49,948

Re: Ram is neither used by cache nor by applications but is still full

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

#8 2021-12-16 15:02:46

Chad Rosswick
Member
Registered: 2021-06-27
Posts: 36

Re: Ram is neither used by cache nor by applications but is still full

seth wrote:

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

#9 2021-12-16 15:04:16

seth
Member
Registered: 2012-09-03
Posts: 49,948

Re: Ram is neither used by cache nor by applications but is still full

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

#10 2021-12-16 16:52:32

Chad Rosswick
Member
Registered: 2021-06-27
Posts: 36

Re: Ram is neither used by cache nor by applications but is still full

seth wrote:

Is the swap in an (encrypted) lvm?

Too late I already rebooted. The swap is it's own partition.

Offline

#11 2021-12-16 16:58:02

seth
Member
Registered: 2012-09-03
Posts: 49,948

Re: Ram is neither used by cache nor by applications but is still full

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

#12 2021-12-16 17:08:10

Chad Rosswick
Member
Registered: 2021-06-27
Posts: 36

Re: Ram is neither used by cache nor by applications but is still full

seth wrote:

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

#13 2021-12-17 07:12:02

Chad Rosswick
Member
Registered: 2021-06-27
Posts: 36

Re: Ram is neither used by cache nor by applications but is still full

seth wrote:

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

#14 2021-12-17 07:39:00

seth
Member
Registered: 2012-09-03
Posts: 49,948

Re: Ram is neither used by cache nor by applications but is still full

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

Board footer

Powered by FluxBB