On my Dell XPS 9310 w/ 16GB ram, i'm constantly running out of RAM. This question is to help figure out where RAM is being consumed.
Been having the issue with 20.04, and now 22.04. The only significant change noticed is in 22.04, [systemd-ooom][1] a process just dies (typically Chrome) with no warning.
On a fresh boot, its only using ~10-20% with just a terminal open. No startup processes.
After using it for a while, its sitting at 98% used. So if i go close/stop everything (chrome, containers, etc) and only have a terminal open, it sits at 50-52%.
I am using ZFS, but slabtop isn't showing significant ZFS usage per this other question. I've been struggling with entire system freezes w/ an automatic reboot in 20.04. Now with 22.04 it seems processes just die/disappear (primarily Chrome or the gnome session), but I can't find any relevant logs highlighting memory causes in /var/log/syslog or dmesg.
I've researched and followed the steps in these questions 1, 2, 3, 4, and many more.
Looking for suggestions to help find where the memory is going.
user@lappie:~$ ./checkmem.sh
+ cat /proc/meminfo
MemTotal: 16088084 kB
MemFree: 8078332 kB
MemAvailable: 8516480 kB
Buffers: 4000 kB
Cached: 1047224 kB
SwapCached: 0 kB
Active: 553748 kB
Inactive: 681076 kB
Active(anon): 2696 kB
Inactive(anon): 433496 kB
Active(file): 551052 kB
Inactive(file): 247580 kB
Unevictable: 239032 kB
Mlocked: 0 kB
SwapTotal: 2097148 kB
SwapFree: 2097148 kB
Dirty: 1176 kB
Writeback: 0 kB
AnonPages: 422780 kB
Mapped: 179252 kB
Shmem: 253704 kB
KReclaimable: 99124 kB
Slab: 1631672 kB
SReclaimable: 99124 kB
SUnreclaim: 1532548 kB
KernelStack: 11312 kB
PageTables: 14396 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 10141188 kB
Committed_AS: 4065764 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 504788 kB
VmallocChunk: 0 kB
Percpu: 10496 kB
HardwareCorrupted: 0 kB
AnonHugePages: 0 kB
ShmemHugePages: 0 kB
ShmemPmdMapped: 0 kB
FileHugePages: 0 kB
FilePmdMapped: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Hugetlb: 0 kB
DirectMap4k: 1836208 kB
DirectMap2M: 14641152 kB
DirectMap1G: 1048576 kB
+ sudo ps uax
+ awk '{ print $6 }'
+ sort -n
+ awk '{s+=$1} END {print s}'
1275332
+ sudo slabtop -s c -o
+ tail -n +8
+ awk '{s =s+$7} END {print s}'
517296
+ free -m
total used free shared buff/cache available
Mem: 15711 6698 7888 247 1123 8316
Swap: 2047 0 2047
top
as follows:top -o %MEM
. – mikewhatever May 20 '22 at 19:47Now since you marked my question as a duplicate because you couldn't manage to read the referenced questions, I now have to ask the question again and risk being flagged for it being a duplicate of this question.
– ruckc May 23 '22 at 18:49