0

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

ruckc
  • 99
  • 5
  • 2
    Are you getting any "running out of memory" warnings/errors or crashes? If so edit your question and add the text of the messages in your question and list the kind of crashes (system, apps (which ones)) etc. If there are no errors or crashes, then consider that Ubuntu would load as much of the system files and apps in RAM as possible and dynamically unload them if needed. – user68186 May 20 '22 at 19:39
  • You can use top as follows: top -o %MEM. – mikewhatever May 20 '22 at 19:47
  • 2
    Please tell me honestly: Do you experience any real performance hit? ZFS will normally use all the memory it can, but it will release it to other applications as necessary. The result: It will seem like all your memory is used all the time, but memory will at the same time be used by those apps that need it. – Artur Meinild May 20 '22 at 19:49
  • @user68186 - There is no messages or warnings. Processes just disappear from the process list or I am kicked out to the login screen. – ruckc May 23 '22 at 18:47
  • @ArturMeinild - I didn't say it was a ZFS impact. I said I evaluated that other question/answer and it doesn't apply as the ZFS cache is no where close to 50% when processes start dying. The performance hit is processes dying unexpectedly. Its like a car, when your car stops running on the interstate, its no longer functioning... which is a performance impact.

    Now 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
  • Are there any relevant log messages around the time these applications vanish? Anything about OOM? – muru May 24 '22 at 01:59

0 Answers0