You are not logged in.
Basically, used memory seems to grow for me by more than it should when system's under heavy use. This doesn't seem to be related to disk cache, as memory used by it and the processes doesn't nearly seem to add up to the total amount of memory used. This eventually causes oom-killer to start killing processes.
In the case below it doesn't add up to much more than 7.6 GB while a lot more is actually used.
> free -h
total used free shared buff/cache available
Mem: 13Gi 11Gi 471Mi 175Mi 1.5Gi 1.5Gi
Swap: 15Gi 7.1Gi 8.9Gi
# cat /proc/meminfo
MemTotal: 14163172 kB
MemFree: 611672 kB
MemAvailable: 1527876 kB
Buffers: 21096 kB
Cached: 1221320 kB
SwapCached: 778776 kB
Active: 6627196 kB
Inactive: 1096952 kB
Active(anon): 5795876 kB
Inactive(anon): 834544 kB
Active(file): 831320 kB
Inactive(file): 262408 kB
Unevictable: 3448 kB
Mlocked: 3448 kB
SwapTotal: 16777212 kB
SwapFree: 8539132 kB
Zswap: 2682140 kB
Zswapped: 8005360 kB
Dirty: 212 kB
Writeback: 0 kB
AnonPages: 6381548 kB
Mapped: 797308 kB
Shmem: 147108 kB
KReclaimable: 132928 kB
Slab: 575120 kB
SReclaimable: 132928 kB
SUnreclaim: 442192 kB
KernelStack: 63440 kB
PageTables: 192648 kB
SecPageTables: 0 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 23858796 kB
Committed_AS: 55246640 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 113492 kB
VmallocChunk: 0 kB
Percpu: 14336 kB
HardwareCorrupted: 0 kB
AnonHugePages: 362496 kB
ShmemHugePages: 0 kB
ShmemPmdMapped: 0 kB
FileHugePages: 34816 kB
FilePmdMapped: 32768 kB
CmaTotal: 0 kB
CmaFree: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Hugetlb: 0 kB
DirectMap4k: 3516868 kB
DirectMap2M: 11012096 kB
DirectMap1G: 0 kB
> smem -tk
PID User Command Swap USS PSS RSS
1247 daniil bwrap --args 44 easyeffects 172.0K 0 4.0K 1.4M
5326 daniil bwrap --args 42 telegram-de 172.0K 0 4.0K 1.4M
1402 daniil bwrap --args 44 easyeffects 232.0K 0 5.0K 1.1M
5338 daniil bwrap --args 42 telegram-de 224.0K 0 5.0K 956.0K
1357 daniil server --sh -n /run/user/10 348.0K 4.0K 6.0K 620.0K
1380 daniil bwrap --args 44 xdg-dbus-pr 128.0K 4.0K 7.0K 1.5M
5334 daniil bwrap --args 42 xdg-dbus-pr 132.0K 4.0K 7.0K 1.5M
6200 daniil /usr/lib/chromium/chrome_cr 344.0K 4.0K 12.0K 2.9M
6776 daniil /usr/lib/chromium/chrome_cr 348.0K 4.0K 12.0K 2.9M
7262 daniil /usr/lib/chromium/chrome_cr 348.0K 4.0K 13.0K 2.9M
2860 daniil /usr/lib/qt/libexec/QtWebEn 10.7M 0 15.0K 1.0M
1292 daniil /usr/lib/bluetooth/obexd 880.0K 4.0K 18.0K 5.1M
1426 daniil /usr/lib/gvfsd-fuse /run/us 2.9M 4.0K 25.0K 3.8M
1263 daniil /usr/lib/geoclue-2.0/demos/ 4.5M 4.0K 27.0K 5.0M
960 daniil /usr/lib/xdg-permission-sto 2.5M 4.0K 28.0K 4.4M
1391 daniil xdg-dbus-proxy --args=46 4.4M 4.0K 28.0K 4.4M
7767 daniil /usr/lib/electron19/electro 11.5M 0 29.0K 972.0K
1360 daniil /usr/lib/at-spi-bus-launche 992.0K 4.0K 33.0K 5.4M
6198 daniil /usr/lib/chromium/chrome_cr 408.0K 4.0K 36.0K 3.4M
6774 daniil /usr/lib/chromium/chrome_cr 408.0K 4.0K 36.0K 3.4M
1417 daniil /usr/lib/gvfsd 3.2M 4.0K 46.0K 4.8M
4586 daniil /usr/bin/keepassxc-proxy /h 3.6M 4.0K 47.0K 7.8M
6379 daniil /usr/bin/keepassxc-proxy ch 3.6M 4.0K 49.0K 7.9M
6711 daniil /usr/bin/autossh -M 0 -NL 2 68.0K 48.0K 52.0K 1.6M
6207 daniil /usr/lib/chromium/chromium 13.7M 0 58.0K 1.7M
911 daniil /usr/bin/startplasma-x11 5.1M 4.0K 65.0K 11.1M
5576 daniil /usr/lib/slack/slack --type 8.5M 4.0K 66.0K 8.7M
1783 daniil fish 1.9M 4.0K 76.0K 3.7M
1772 daniil fish 2.0M 4.0K 77.0K 4.0M
6204 daniil /usr/lib/chromium/chromium 14.3M 4.0K 82.0K 9.6M
6205 daniil /usr/lib/chromium/chromium 13.6M 0 82.0K 10.3M
2851 daniil /usr/lib/qt/libexec/QtWebEn 10.7M 0 87.0K 12.2M
2848 daniil /usr/lib/qt/libexec/QtWebEn 10.7M 4.0K 89.0K 12.2M
5579 daniil /usr/lib/slack/slack --type 8.3M 0 103.0K 760.0K
7270 daniil /usr/lib/chromium/chromium 13.3M 20.0K 105.0K 2.0M
7267 daniil /usr/lib/chromium/chromium 13.2M 0 108.0K 10.8M
1058 daniil /usr/lib/dconf-service 516.0K 92.0K 113.0K 3.9M
5577 daniil /usr/lib/slack/slack --type 8.2M 0 124.0K 8.9M
6781 daniil /usr/lib/chromium/chromium 11.7M 0 125.0K 12.0M
2607 daniil fish 1.9M 60.0K 152.0K 3.8M
6783 daniil /usr/lib/chromium/chromium 11.7M 92.0K 196.0K 3.7M
7260 daniil /usr/lib/chromium/chrome_cr 208.0K 200.0K 232.0K 3.6M
1667 daniil /usr/lib/at-spi2-registryd 780.0K 216.0K 243.0K 5.8M
7266 daniil /usr/lib/chromium/chromium 14.0M 4.0K 253.0K 10.1M
1331 daniil /usr/lib/flatpak-session-he 4.3M 284.0K 308.0K 4.7M
6780 daniil /usr/lib/chromium/chromium 13.8M 4.0K 355.0K 10.1M
1374 daniil /usr/bin/dbus-daemon --conf 400.0K 316.0K 359.0K 3.7M
956 daniil /usr/lib/xdg-document-porta 4.4M 348.0K 373.0K 5.6M
1093 daniil /usr/bin/gmenudbusmenuproxy 4.5M 316.0K 378.0K 10.7M
1213 daniil /usr/lib/kf5/kscreen_backen 2.3M 324.0K 388.0K 10.2M
1097 daniil /usr/bin/xembedsniproxy 2.4M 332.0K 389.0K 10.1M
5335 daniil xdg-dbus-proxy --args=44 2.3M 372.0K 407.0K 4.7M
19427 daniil /usr/bin/gpg-agent --superv 80.0K 416.0K 446.0K 2.7M
3320 daniil /usr/bin/kwrite -session 10 29.9M 432.0K 561.0K 15.2M
4343 daniil /usr/lib/firefox/firefox -c 8.3M 420.0K 577.0K 17.2M
1264 daniil /usr/bin/kaccess 18.8M 504.0K 604.0K 14.4M
5596 daniil /usr/lib/slack/chrome_crash 232.0K 632.0K 636.0K 2.5M
7765 daniil /usr/lib/electron19/electro 11.5M 0 664.0K 18.6M
5062 daniil /usr/lib/kf5/kio_http_cache 4.1M 532.0K 665.0K 10.9M
6670 daniil /usr/lib/chromium/chromium 22.7M 520.0K 674.0K 10.1M
7764 daniil /usr/lib/electron19/electro 11.5M 4.0K 740.0K 18.9M
6287 daniil /usr/lib/chromium/chromium 25.0M 600.0K 772.0K 11.0M
6343 daniil /usr/lib/chromium/chromium 25.9M 616.0K 788.0K 11.0M
1059 daniil /usr/lib/kactivitymanagerd 6.1M 760.0K 833.0K 12.5M
6316 daniil /usr/lib/chromium/chromium 29.3M 684.0K 856.0K 11.1M
8132 daniil /usr/lib/electron19/electro 20.6M 96.0K 912.0K 19.8M
5115 daniil /home/daniil/.local/share/s 12.2M 4.0K 968.0K 13.3M
1018 daniil /usr/bin/kglobalaccel5 3.5M 908.0K 1013.0K 11.4M
5116 daniil /home/daniil/.local/share/s 11.7M 4.0K 1.0M 13.8M
6235 daniil /usr/lib/chromium/chromium 16.7M 760.0K 1.1M 11.6M
1267 daniil /usr/lib/DiscoverNotifier 26.5M 888.0K 1.2M 17.0M
1927 daniil /usr/bin/akonadi_birthdays_ 18.0M 1.1M 1.2M 16.5M
1980 daniil /usr/bin/akonadi_ical_resou 20.0M 1.1M 1.2M 16.5M
2132 daniil /usr/bin/akonadi_migration_ 17.9M 1.1M 1.2M 16.6M
2100 daniil /usr/bin/akonadi_maildir_re 19.9M 1.1M 1.2M 16.5M
1903 daniil /usr/bin/akonadi_akonotes_r 17.8M 1.1M 1.2M 16.8M
6713 daniil /usr/bin/ssh -NL 22:localho 2.2M 1.3M 1.3M 4.2M
1921 daniil /usr/bin/akonadi_archivemai 30.1M 1.1M 1.3M 19.9M
2157 daniil /usr/bin/akonadi_unifiedmai 29.7M 1.2M 1.3M 18.0M
6259 daniil /usr/lib/chromium/chromium 26.9M 1004.0K 1.4M 18.2M
2138 daniil /usr/bin/akonadi_newmailnot 18.2M 1.2M 1.4M 18.8M
3083 daniil /usr/bin/kwrite -session 10 31.0M 548.0K 1.4M 23.3M
8382 daniil node /usr/local/bin/yarn de 12.5M 4.0K 1.4M 8.9M
1268 daniil /usr/bin/kalendarac 18.3M 1.2M 1.4M 18.3M
2124 daniil /usr/bin/akonadi_mailfilter 28.2M 1.2M 1.5M 20.4M
2117 daniil /usr/bin/akonadi_maildispat 18.1M 1.4M 1.5M 17.1M
951 daniil /usr/lib/xdg-desktop-portal 3.6M 1.4M 1.5M 9.0M
1961 daniil /usr/bin/akonadi_followupre 20.1M 1.3M 1.5M 19.0M
8339 daniil /usr/lib/chromium/chromium 20.5M 1.2M 1.6M 20.2M
2156 daniil /usr/bin/akonadi_sendlater_ 29.6M 1.4M 1.6M 18.2M
9272 daniil /usr/lib/chromium/chromium 21.7M 1.2M 1.6M 19.0M
1411 daniil /usr/bin/akonadi_control 18.3M 1.5M 1.6M 16.8M
6478 daniil /usr/lib/chromium/chromium 34.3M 1.3M 1.7M 18.4M
6484 daniil /usr/lib/chromium/chromium 38.2M 1.3M 1.7M 18.1M
6374 daniil /usr/bin/plasma-browser-int 18.7M 480.0K 1.8M 33.0M
7302 daniil /usr/lib/chromium/chromium 16.4M 1.1M 1.9M 18.8M
6980 daniil /usr/bin/plasma-browser-int 18.5M 688.0K 2.0M 33.2M
6811 daniil /usr/lib/chromium/chromium 17.1M 1.5M 2.1M 18.4M
923 daniil /usr/bin/dbus-daemon --sess 872.0K 2.1M 2.2M 5.6M
7473 daniil /usr/bin/plasma-browser-int 18.3M 900.0K 2.3M 33.6M
4585 daniil /usr/bin/plasma-browser-int 43.9M 1.0M 2.4M 33.5M
8404 daniil /usr/local/bin/node /home/d 37.2M 192.0K 2.4M 11.5M
8679 daniil /usr/lib/chromium/chromium 27.4M 1.9M 2.4M 21.6M
6967 daniil /usr/lib/chromium/chromium 24.0M 2.1M 2.5M 21.8M
898 daniil /usr/lib/systemd/systemd -- 2.6M 1.4M 2.5M 7.2M
5153 daniil /home/daniil/.local/share/s 14.5M 1.3M 2.6M 8.9M
3104 daniil fish 1.1M 2.1M 2.7M 7.3M
8050 daniil /usr/lib/chromium/chromium 25.7M 2.4M 2.8M 22.0M
2145 daniil /usr/bin/konsole -session 1 34.7M 560.0K 2.9M 24.0M
6447 daniil /usr/lib/chromium/chromium 14.9M 2.7M 2.9M 16.5M
1957 daniil /usr/bin/akonadi_contacts_r 17.8M 3.1M 3.3M 18.6M
1144 daniil /usr/bin/wireplumber 9.5M 3.0M 3.3M 11.6M
6890 daniil /usr/lib/chromium/chromium 24.7M 2.9M 3.3M 22.7M
1096 daniil /usr/lib/xdg-desktop-portal 20.3M 3.2M 3.3M 19.1M
7792 daniil /usr/lib/electron19/electro 48.9M 1.6M 3.4M 29.1M
2097 daniil /usr/bin/akonadi_indexing_a 20.6M 3.1M 3.4M 21.1M
4986 daniil /usr/lib/firefox/firefox -c 10.2M 2.3M 3.4M 29.7M
2065 daniil /usr/bin/akonadi_imap_resou 18.2M 3.3M 3.4M 18.9M
2086 daniil /usr/bin/akonadi_imap_resou 18.3M 3.3M 3.4M 18.8M
2081 daniil /usr/bin/akonadi_imap_resou 20.2M 3.3M 3.4M 19.0M
2129 daniil /usr/bin/akonadi_mailmerge_ 18.1M 3.4M 3.5M 19.2M
8065 daniil /usr/lib/electron19/electro 54.1M 2.7M 3.5M 23.5M
7817 daniil /usr/lib/electron19/electro 11.7M 2.7M 3.6M 23.4M
910 daniil /usr/bin/kwalletd5 --pam-lo 18.1M 3.8M 3.9M 18.3M
8036 daniil /usr/lib/electron19/electro 24.5M 3.2M 4.0M 23.6M
3301 daniil /usr/bin/ksystemstats 2.9M 4.0M 4.2M 15.5M
8003 daniil /usr/lib/electron19/electro 17.4M 3.5M 4.5M 24.2M
2880 daniil /usr/lib/qt/libexec/QtWebEn 21.1M 1.3M 4.6M 13.8M
9086 daniil /usr/lib/chromium/chromium 24.6M 3.8M 4.7M 30.8M
2062 daniil /usr/bin/akonadi_imap_resou 18.6M 4.2M 4.9M 25.4M
3257 daniil /usr/bin/dolphin -session 1 28.0M 3.8M 4.9M 27.7M
3057 daniil /usr/bin/dolphin -session 1 33.6M 3.9M 4.9M 27.8M
1143 daniil /usr/bin/pipewire 14.1M 4.4M 5.0M 12.3M
7171 daniil /usr/lib/chromium/chromium 44.2M 4.6M 5.0M 24.6M
8393 daniil /usr/local/bin/node --requi 39.1M 2.9M 5.1M 14.3M
1988 daniil /usr/bin/akonadi_imap_resou 18.6M 4.5M 5.1M 25.8M
1995 daniil /usr/bin/akonadi_imap_resou 21.0M 4.6M 5.2M 25.9M
2080 daniil /usr/bin/akonadi_imap_resou 18.5M 4.5M 5.2M 26.3M
2004 daniil /usr/bin/akonadi_imap_resou 20.2M 4.6M 5.4M 26.8M
1548 daniil /usr/bin/pipewire-pulse 30.4M 5.2M 5.6M 11.8M
7741 daniil /usr/lib/chromium/chromium 46.0M 5.4M 5.7M 25.4M
8213 daniil /usr/lib/chromium/chromium 21.1M 5.4M 5.8M 25.5M
7410 daniil /usr/lib/chromium/chromium 44.7M 5.4M 5.8M 25.5M
6260 daniil /usr/lib/chromium/chromium 40.3M 4.9M 5.9M 30.6M
7481 daniil /usr/lib/chromium/chromium 23.1M 5.5M 5.9M 24.4M
8151 daniil /usr/lib/electron19/electro 92.6M 5.1M 6.0M 25.8M
5449 daniil /usr/lib/firefox/firefox -c 21.2M 6.0M 6.6M 47.0M
7460 daniil /usr/lib/chromium/chromium 21.4M 4.8M 6.7M 44.3M
1418 daniil easyeffects --gapplication- 34.4M 7.0M 7.1M 7.2M
8067 daniil /usr/lib/electron19/electro 226.7M 6.5M 7.4M 27.1M
6231 daniil /usr/lib/chromium/chromium 20.0M 5.1M 7.6M 39.7M
4425 daniil /usr/lib/firefox/firefox -c 19.8M 7.4M 8.0M 50.9M
8698 daniil /usr/lib/chromium/chromium 59.9M 7.0M 8.2M 37.4M
5612 daniil /usr/lib/slack/slack --type 46.5M 6.5M 8.9M 33.2M
5613 daniil /usr/lib/slack/slack --type 10.5M 4.6M 8.9M 26.5M
982 daniil /usr/bin/ksmserver 16.3M 10.3M 10.4M 24.4M
7761 daniil /usr/lib/electron19/electro 46.0M 9.0M 10.7M 35.5M
9057 daniil /usr/lib/chromium/chromium 27.3M 10.4M 12.0M 47.3M
7294 daniil /usr/lib/chromium/chromium 15.2M 10.1M 13.2M 47.0M
6230 daniil /usr/lib/chromium/chromium 56.1M 9.8M 13.8M 52.1M
1457 daniil /usr/bin/akonadiserver 7.0M 14.2M 14.3M 26.2M
6992 daniil /usr/lib/chromium/chromium 37.8M 13.1M 14.5M 55.1M
7045 daniil /usr/lib/chromium/chromium 41.3M 13.7M 15.1M 48.6M
7559 daniil /usr/lib/chromium/chromium 36.7M 13.8M 15.2M 55.9M
5817 daniil /usr/lib/firefox/firefox -c 23.9M 14.5M 15.3M 63.2M
7930 daniil /usr/lib/electron19/electro 59.0M 15.2M 16.1M 36.4M
6807 daniil /usr/lib/chromium/chromium 28.2M 13.4M 16.3M 49.6M
4978 daniil /usr/lib/firefox/firefox -c 28.0M 16.0M 17.2M 44.6M
1508 daniil /usr/bin/mysqld --defaults- 177.8M 18.5M 18.5M 23.3M
23875 daniil /usr/lib/firefox/firefox -c 3.1M 17.6M 19.4M 95.8M
23624 daniil /usr/lib/firefox/firefox -c 3.1M 17.6M 19.4M 96.5M
23706 daniil /usr/lib/firefox/firefox -c 3.1M 17.6M 19.4M 96.6M
1495 daniil /usr/bin/konsole -session 1 21.0M 9.5M 19.6M 56.9M
10662 daniil /usr/lib/firefox/firefox -c 24.4M 18.2M 19.9M 99.4M
11406 daniil /usr/lib/firefox/firefox -c 20.9M 17.9M 20.4M 120.1M
5133 daniil /home/daniil/.local/share/s 61.3M 17.0M 20.4M 47.4M
984 daniil /usr/bin/kded5 23.2M 17.5M 20.6M 44.3M
7938 daniil /usr/lib/electron19/electro 18.8M 19.3M 22.1M 46.0M
3066 daniil /usr/bin/konsole -session 1 19.5M 11.5M 22.2M 64.4M
10737 daniil /usr/lib/firefox/firefox -c 19.3M 20.5M 22.3M 104.3M
5158 daniil /home/daniil/.local/share/s 94.5M 16.9M 22.6M 44.1M
7293 daniil /usr/lib/chromium/chromium 54.5M 18.7M 23.0M 65.7M
23457 daniil /usr/lib/firefox/firefox -c 3.1M 21.0M 23.1M 106.6M
7205 daniil /usr/lib/chromium/chromium 25.0M 22.9M 24.2M 64.2M
8228 daniil /usr/lib/chromium/chromium 22.8M 23.7M 25.1M 65.8M
4603 daniil /usr/lib/firefox/firefox -c 44.5M 25.3M 26.1M 75.1M
6866 daniil /usr/lib/chromium/chromium 20.9M 24.8M 27.0M 72.1M
8258 daniil /usr/lib/chromium/chromium 65.6M 27.3M 29.4M 76.5M
10811 daniil /usr/lib/firefox/firefox -c 17.4M 28.6M 30.4M 112.9M
1565 daniil /usr/bin/kmail -session 109 56.9M 25.9M 30.6M 62.5M
23896 daniil python /usr/bin/smem -tk 0 31.0M 31.0M 33.6M
7682 daniil /usr/lib/chromium/chromium 19.3M 30.1M 31.5M 72.3M
6806 daniil /usr/lib/chromium/chromium 123.0M 23.5M 31.8M 77.2M
4769 daniil /usr/lib/firefox/firefox -c 50.8M 31.0M 31.9M 84.3M
5572 daniil /usr/lib/slack/slack -s 44.0M 21.8M 32.0M 59.6M
8243 daniil /usr/lib/chromium/chromium 102.7M 30.6M 32.5M 78.4M
11650 daniil /usr/lib/firefox/firefox -c 31.5M 30.5M 33.2M 137.9M
10410 daniil /usr/lib/firefox/firefox -c 34.4M 31.2M 33.2M 121.4M
11168 daniil /usr/lib/firefox/firefox -c 35.2M 30.9M 33.5M 136.6M
11218 daniil /usr/lib/firefox/firefox -c 33.3M 30.9M 33.5M 136.6M
11445 daniil /usr/lib/firefox/firefox -c 32.2M 31.6M 34.3M 139.2M
7976 daniil /usr/lib/chromium/chromium 108.6M 33.7M 35.7M 82.6M
10712 daniil /usr/lib/firefox/firefox -c 20.8M 37.6M 39.4M 120.7M
4662 daniil /usr/lib/firefox/firefox -c 29.1M 39.1M 40.1M 93.8M
10840 daniil /usr/lib/firefox/firefox -c 32.6M 40.7M 42.9M 131.4M
985 daniil /usr/bin/kwin_x11 --replace 56.0M 39.7M 43.3M 83.0M
8605 daniil /usr/lib/chromium/chromium 30.4M 45.7M 47.1M 77.2M
13326 daniil /usr/lib/firefox/firefox -c 3.1M 44.9M 47.3M 145.6M
7069 daniil /usr/lib/chromium/chromium 29.9M 45.2M 47.6M 96.6M
18973 daniil /usr/lib/firefox/firefox -c 3.1M 49.0M 51.8M 156.2M
13417 daniil /usr/lib/firefox/firefox -c 3.1M 51.1M 53.9M 157.0M
4601 daniil /usr/lib/firefox/firefox -c 14.8M 52.7M 54.4M 128.7M
7053 daniil /usr/lib/chromium/chromium 27.6M 50.6M 54.6M 119.3M
5339 daniil telegram-desktop -- 427.5M 55.2M 55.6M 56.1M
5867 daniil /usr/lib/firefox/firefox -c 14.4M 55.5M 57.9M 140.5M
11094 daniil /usr/lib/firefox/firefox -c 33.5M 55.0M 58.1M 158.6M
7924 daniil /usr/lib/chromium/chromium 279.5M 52.2M 58.1M 107.3M
19109 daniil /usr/lib/firefox/firefox -c 3.1M 55.6M 58.7M 164.6M
21380 daniil /usr/lib/firefox/firefox -c 3.1M 57.0M 60.4M 168.3M
9116 daniil /usr/lib/chromium/chromium 40.9M 55.3M 61.0M 128.7M
10965 daniil /usr/lib/firefox/firefox -c 34.4M 60.5M 63.7M 169.8M
22394 daniil /usr/lib/firefox/firefox -c 3.1M 62.2M 65.4M 173.3M
21926 daniil /usr/lib/firefox/firefox -c 3.1M 62.3M 65.4M 173.4M
4361 daniil /usr/lib/firefox/firefox -c 18.6M 64.1M 66.2M 138.1M
11091 daniil /usr/lib/firefox/firefox -c 27.5M 64.8M 67.6M 171.7M
5871 daniil /usr/lib/firefox/firefox -c 14.3M 66.3M 69.0M 153.8M
10787 daniil /usr/lib/firefox/firefox -c 18.3M 67.1M 69.7M 161.4M
10791 daniil /usr/lib/firefox/firefox -c 14.8M 66.9M 70.1M 171.1M
10957 daniil /usr/lib/firefox/firefox -c 43.0M 71.0M 74.2M 174.6M
13244 daniil /usr/lib/firefox/firefox -c 3.1M 75.2M 82.4M 195.1M
5978 daniil /usr/lib/firefox/firefox -c 16.6M 82.5M 84.5M 158.1M
7989 daniil /usr/lib/chromium/chromium 28.8M 81.1M 87.0M 155.9M
4855 daniil /usr/lib/firefox/firefox -c 17.5M 84.9M 88.1M 179.9M
3139 daniil /usr/bin/plasma-systemmonit 51.0M 84.6M 89.0M 130.5M
7257 daniil /usr/lib/chromium/chromium 61.5M 79.0M 91.8M 156.9M
6276 daniil /usr/lib/chromium/chromium 49.9M 94.2M 101.0M 171.9M
7029 daniil /usr/lib/chromium/chromium 31.8M 98.1M 101.3M 159.5M
7061 daniil /usr/lib/chromium/chromium 38.4M 96.1M 101.8M 172.5M
5869 daniil /usr/lib/firefox/firefox -c 39.9M 104.2M 105.9M 180.1M
8415 daniil /usr/local/bin/node /home/d 499.3M 105.9M 108.1M 117.6M
4477 daniil /usr/lib/firefox/firefox -c 34.8M 107.1M 108.7M 177.9M
9140 daniil /usr/lib/chromium/chromium 20.3M 106.1M 112.5M 183.4M
7859 daniil /usr/lib/electron19/electro 65.5M 112.1M 115.1M 140.5M
6771 daniil /usr/lib/chromium/chromium 118.2M 106.2M 116.7M 177.4M
1047 daniil /usr/bin/plasmashell --no-r 120.6M 114.0M 120.6M 175.9M
6195 daniil /usr/lib/chromium/chromium 80.3M 111.2M 122.4M 183.9M
5667 daniil /usr/lib/slack/slack --type 39.2M 114.5M 124.3M 142.4M
4777 daniil /usr/lib/firefox/firefox -c 33.3M 124.9M 125.7M 177.7M
5093 daniil /home/daniil/.local/share/s 156.4M 125.6M 133.3M 161.0M
10478 daniil /usr/lib/firefox/firefox -c 30.0M 134.7M 137.3M 235.2M
4898 daniil /usr/lib/firefox/firefox -c 19.1M 137.5M 140.0M 224.3M
4546 daniil /usr/lib/firefox/firefox -c 13.0M 142.1M 145.9M 239.0M
10407 daniil /usr/lib/firefox/firefox -c 31.7M 144.0M 146.9M 246.1M
4901 daniil /usr/lib/firefox/firefox -c 155.8M 145.8M 148.4M 230.7M
5183 daniil /home/daniil/.local/share/s 54.4M 143.7M 150.8M 166.4M
7037 daniil /usr/lib/chromium/chromium 163.0M 150.9M 154.5M 214.7M
12556 daniil /usr/lib/firefox/firefox -c 11.4M 221.1M 228.3M 342.9M
7021 daniil /usr/lib/chromium/chromium 68.6M 239.3M 242.9M 303.1M
4253 daniil /usr/lib/firefox/firefox 181.9M 443.5M 455.5M 577.3M
-------------------------------------------------------------------------------
259 1 7.9G 6.4G 6.9G 15.2G
Offline
when system's under heavy use
Offline
No, that unfortunately didn't improve the situation
Also, it's worth noting that my issue isn't recent, it's existed for at least half a year at this point
Offline
my issue isn't recent, it's existed for at least half a year
So does the zswap situation.
If you kill most processes (eg. isolate the rescue.target) and drop all caches, does the memory get returned?
Also how do you define "heavy use"? Could the GPU be involved?
Offline
Yeah, sure. If I'm logged out of KDE the non-cache memory footprint is around 40 megs. When I log in, the big (100+ MB) processes and cache account for roughly 7.1 GB and used memory is 8.1 GB, if I launch more browser windows and a code editor this becomes 8.5/10.8 GB, which already looks kinda suspicious. When I do frontend development (Next + React) this can easily balloon to using 2 or 3 times more memory than it's supposed to. I guess I should take a look if this could be directly caused by the code building?
There's probably not much GPU usage here.
EDIT: I'm mostly saying "not recent" for context really.
Last edited by LaserMoai (2023-04-18 15:31:54)
Offline
I guess I should take a look if this could be directly caused by the code building?
If you kill most processes (eg. isolate the rescue.target) and drop all caches, does the memory get returned?
Offline
Ah, OK, sorry, I thought you were trying to get me to reboot into rescue.target. Well, it mostly does. There are a bunch of leftover electron processes left that cause 1.7 GB of memory to stay used.
Offline
So the RAM isn't leaked/lost and
DirectMap2M: 11012096 kB
is likely very relevant (it's 10.5 GB …)
You may want to check which process impacts that.
For the other thread and w/ no offense intended, but you're aware that https://bbs.archlinux.org/viewtopic.php … 2#p2063182 will probably not immediately free all memory and the calls will also not survive a reboot.
You'd want to run that first and then stress the system and see whether it still misbehaves.
Offline
For the other thread and w/ no offense intended, but you're aware that https://bbs.archlinux.org/viewtopic.php … 2#p2063182 will probably not immediately free all memory and the calls will also not survive a reboot.
You'd want to run that first and then stress the system and see whether it still misbehaves.
Yeah, it does. I've tried this fix again and the ratio of 8.8/17.1 GB is still easily achievable.
As for the first point, it looks like we are on the right path. If I isolate the rescue.target, DirectMap2M is still 12 gigs, even though the memory's already freed. If I reboot and don't log into KDE, it's already 6.9 GBs somehow, even though only 200 MB is used. Maybe it's a weird GPU related issue?
total used free shared buff/cache available
Mem: 13Gi 595Mi 12Gi 2.0Mi 370Mi 12Gi
Swap: 15Gi 0B 15Gi
MemTotal: 14163188 kB
MemFree: 13204064 kB
MemAvailable: 13290532 kB
Buffers: 39076 kB
Cached: 277312 kB
SwapCached: 0 kB
Active: 352692 kB
Inactive: 112328 kB
Active(anon): 130236 kB
Inactive(anon): 22224 kB
Active(file): 222456 kB
Inactive(file): 90104 kB
Unevictable: 1720 kB
Mlocked: 1720 kB
SwapTotal: 16777212 kB
SwapFree: 16777212 kB
Zswap: 0 kB
Zswapped: 0 kB
Dirty: 4 kB
Writeback: 0 kB
AnonPages: 146312 kB
Mapped: 149404 kB
Shmem: 2260 kB
KReclaimable: 35416 kB
Slab: 108368 kB
SReclaimable: 35416 kB
SUnreclaim: 72952 kB
KernelStack: 5552 kB
PageTables: 2812 kB
SecPageTables: 0 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 23858804 kB
Committed_AS: 622164 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 53236 kB
VmallocChunk: 0 kB
Percpu: 9920 kB
HardwareCorrupted: 0 kB
AnonHugePages: 38912 kB
ShmemHugePages: 0 kB
ShmemPmdMapped: 0 kB
FileHugePages: 4096 kB
FilePmdMapped: 0 kB
CmaTotal: 0 kB
CmaFree: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Hugetlb: 0 kB
DirectMap4k: 278980 kB
DirectMap2M: 6909952 kB
DirectMap1G: 7340032 kB
EDIT: I booted into rescue mode and it had 5 GBs in DirectMap2M. There goes that theory, I guess.
Last edited by LaserMoai (2023-04-19 14:54:51)
Offline
DirectMap2M is https://en.wikipedia.org/wiki/Translati … ide_buffer related, it won't "just" go down w/ freed memory (the idea was to check whether something drives that, but yeah - dead end)
If you kill every electron app (chromium, vscode, etc.) does the RAM distribution "normalize"?
Edit: and what's the output of "df -h" when you "lost" the RAM?
Last edited by seth (2023-04-19 18:52:45)
Offline
Yeah, I've already looked up DirectMap2M.
Not really, 6.3 GB is still used of which only 2 GB is disk cache. The big processes are like 800 megs total.
# df -h
Filesystem Size Used Avail Use% Mounted on
dev 6.8G 0 6.8G 0% /dev
run 6.8G 1.8M 6.8G 1% /run
/dev/mapper/RootVolGroup-root 242G 126G 104G 55% /
tmpfs 6.8G 504M 6.3G 8% /dev/shm
tmpfs 6.8G 117M 6.7G 2% /tmp
/dev/nvme0n1p4 230G 151G 79G 66% /mnt/windows
/dev/nvme0n1p1 300M 112M 188M 38% /boot
tmpfs 1.4G 312K 1.4G 1% /run/user/1000
# free -m
total used free shared buff/cache available
Mem: 13831 4282 7478 49 2070 9169
Swap: 16383 1746 14637
# smem -tk
PID User Command Swap USS PSS RSS
1397 daniil server --sh -n /run/user/10 348.0K 4.0K 8.0K 572.0K
1442 daniil bwrap --args 44 easyeffects 236.0K 0 10.0K 1.0M
1297 daniil bwrap --args 44 easyeffects 176.0K 0 13.0K 1.4M
1425 daniil bwrap --args 44 xdg-dbus-pr 132.0K 4.0K 13.0K 1.3M
1007 root fusermount3 -o rw,nosuid,no 112.0K 4.0K 17.0K 1.5M
6947 root sudo fish 1.1M 4.0K 23.0K 2.4M
1599 daniil fish 1.9M 4.0K 24.0K 2.5M
1594 daniil fish 2.0M 4.0K 25.0K 2.6M
1226 daniil /usr/lib/bluetooth/obexd 876.0K 4.0K 40.0K 3.3M
1457 daniil /usr/lib/gvfsd 3.2M 4.0K 49.0K 3.8M
1000 daniil /usr/lib/xdg-permission-sto 2.5M 4.0K 50.0K 3.6M
1428 daniil xdg-dbus-proxy --args=46 4.4M 4.0K 51.0K 3.7M
936 root /usr/lib/sddm/sddm-helper - 1.8M 4.0K 59.0K 5.3M
13640 daniil /usr/bin/autossh -M 0 -NL 2 72.0K 48.0K 61.0K 1.6M
825 root /usr/bin/sddm 3.8M 4.0K 66.0K 5.8M
951 daniil /usr/bin/startplasma-x11 7.1M 4.0K 70.0K 6.4M
939 daniil (sd-pam) 3.3M 4.0K 71.0K 1.2M
1312 daniil /usr/lib/geoclue-2.0/demos/ 2.6M 12.0K 77.0K 4.0M
1098 daniil /usr/lib/dconf-service 576.0K 36.0K 78.0K 3.2M
1346 root /usr/lib/accounts-daemon 12.2M 104.0K 151.0K 4.3M
1015 rtkit /usr/lib/rtkit-daemon 176.0K 160.0K 175.0K 2.2M
793 earlyoom /usr/bin/earlyoom -r 3600 - 0 204.0K 216.0K 1.7M
1378 daniil /usr/lib/flatpak-session-he 4.3M 260.0K 312.0K 3.9M
775 systemd-oom /usr/lib/systemd/systemd-oo 760.0K 188.0K 315.0K 3.0M
1409 daniil /usr/lib/at-spi-bus-launche 2.7M 304.0K 374.0K 4.2M
727 root /usr/bin/mount.ntfs /dev/nv 348.0K 368.0K 376.0K 1.4M
1133 daniil /usr/bin/gmenudbusmenuproxy 2.5M 328.0K 398.0K 6.8M
996 daniil /usr/lib/xdg-document-porta 2.4M 348.0K 406.0K 4.3M
1243 daniil /usr/lib/kf5/kscreen_backen 2.3M 336.0K 408.0K 6.6M
1907 daniil /usr/lib/at-spi2-registryd 776.0K 368.0K 415.0K 4.3M
1137 daniil /usr/bin/xembedsniproxy 2.4M 348.0K 417.0K 6.7M
1468 daniil /usr/lib/gvfsd-fuse /run/us 736.0K 400.0K 445.0K 3.7M
1417 daniil /usr/bin/dbus-daemon --conf 312.0K 428.0K 483.0K 3.0M
3663 daniil /usr/lib/kf5/kio_http_cache 4.2M 436.0K 546.0K 6.9M
3272 daniil /usr/bin/kwrite -session 10 27.9M 428.0K 628.0K 12.0M
13851 daniil /usr/bin/gpg-agent --superv 124.0K 616.0K 655.0K 2.7M
817 ntp /usr/bin/ntpd -g -u ntp:ntp 820.0K 552.0K 668.0K 3.1M
1134 daniil /usr/lib/polkit-kde-authent 21.3M 544.0K 717.0K 12.1M
794 root /usr/lib/systemd/systemd-lo 980.0K 504.0K 724.0K 3.8M
1313 daniil /usr/bin/kaccess 21.2M 596.0K 760.0K 11.6M
835 root /usr/bin/wpa_supplicant -u 1.1M 736.0K 873.0K 3.9M
1154 root /usr/lib/upowerd 3.0M 856.0K 957.0K 5.2M
1059 daniil /usr/bin/kglobalaccel5 3.4M 1016.0K 1.1M 7.8M
2512 daniil /usr/bin/akonadi_indexing_a 19.0M 1.1M 1.2M 12.6M
2390 daniil /usr/bin/akonadi_contacts_r 17.8M 1.1M 1.3M 12.6M
2532 daniil /usr/bin/akonadi_migration_ 19.8M 1.1M 1.3M 12.6M
2385 daniil /usr/bin/akonadi_birthdays_ 19.9M 1.2M 1.3M 12.8M
2383 daniil /usr/bin/akonadi_akonotes_r 19.8M 1.1M 1.3M 13.0M
2513 daniil /usr/bin/akonadi_maildir_re 19.8M 1.2M 1.4M 13.0M
1088 polkitd /usr/lib/polkit-1/polkitd - 2.0M 1.2M 1.4M 5.7M
13613 nobody openvpn --config /etc/openv 1.8M 828.0K 1.4M 5.0M
2537 daniil /usr/bin/akonadi_newmailnot 18.2M 1.2M 1.4M 13.0M
2514 daniil /usr/bin/akonadi_maildispat 18.1M 1.4M 1.5M 12.9M
646 root /usr/lib/systemd/systemd-ud 1.8M 1.2M 1.5M 4.8M
991 daniil /usr/lib/xdg-desktop-portal 5.5M 1.3M 1.6M 6.7M
2392 daniil /usr/bin/akonadi_followupre 20.0M 1.4M 1.6M 13.2M
13642 daniil /usr/bin/ssh -NL 22:localho 896.0K 1.6M 1.6M 3.8M
2384 daniil /usr/bin/akonadi_archivemai 27.8M 1.2M 1.8M 14.7M
1135 daniil /usr/lib/org_kde_powerdevil 5.0M 1.6M 1.8M 10.8M
2517 daniil /usr/bin/akonadi_mailfilter 27.9M 1.3M 1.8M 14.8M
2577 daniil fish 828.0K 1.2M 1.9M 5.6M
2546 daniil /usr/bin/akonadi_sendlater_ 29.6M 1.4M 1.9M 14.8M
2813 daniil fish 956.0K 1.2M 2.0M 6.0M
6950 root fish 1.2M 1.4M 2.2M 6.2M
1306 daniil /usr/bin/keepassxc 50.9M 2.1M 2.3M 11.6M
963 daniil /usr/bin/dbus-daemon --sess 436.0K 2.3M 2.3M 4.8M
950 daniil /usr/bin/kwalletd5 --pam-lo 19.9M 2.2M 2.5M 14.4M
938 daniil /usr/lib/systemd/systemd -- 2.3M 1.6M 2.6M 6.7M
792 dbus /usr/bin/dbus-daemon --syst 640.0K 2.8M 2.9M 5.4M
1315 daniil /usr/lib/DiscoverNotifier 27.2M 2.8M 3.1M 15.0M
2395 daniil /usr/bin/akonadi_ical_resou 18.0M 3.1M 3.3M 14.7M
1 root /sbin/init 1.2M 2.3M 3.4M 7.7M
2507 daniil /usr/bin/akonadi_imap_resou 18.3M 3.4M 3.5M 15.0M
2525 daniil /usr/bin/akonadi_mailmerge_ 18.2M 3.4M 3.5M 15.1M
2492 daniil /usr/bin/akonadi_imap_resou 18.1M 3.4M 3.6M 15.1M
2559 daniil /usr/bin/akonadi_unifiedmai 27.8M 3.1M 3.6M 16.5M
1188 daniil /usr/bin/wireplumber 8.9M 3.8M 4.1M 9.6M
2415 daniil /usr/bin/akonadi_imap_resou 18.0M 3.6M 4.1M 16.8M
2409 daniil /usr/bin/akonadi_imap_resou 17.9M 3.7M 4.2M 16.9M
1349 daniil /usr/bin/kalendarac -sessio 17.5M 4.3M 4.5M 13.4M
3367 daniil /usr/lib/ksysguard/ksgrd_ne 328.0K 4.5M 4.5M 6.9M
3282 daniil /usr/bin/ksystemstats 2.6M 4.4M 4.8M 13.4M
1187 root /usr/lib/udisks2/udisksd 1.4M 4.7M 5.0M 10.5M
2480 daniil /usr/bin/akonadi_imap_resou 18.8M 4.0M 5.2M 19.9M
2460 daniil /usr/bin/akonadi_imap_resou 18.6M 4.2M 5.2M 19.4M
1136 daniil /usr/lib/xdg-desktop-portal 26.5M 3.5M 5.4M 26.1M
1451 daniil /usr/bin/akonadi_control 14.9M 5.3M 5.4M 14.8M
2471 daniil /usr/bin/akonadi_imap_resou 20.2M 5.3M 5.5M 16.9M
2416 daniil /usr/bin/akonadi_imap_resou 18.5M 4.5M 5.5M 20.0M
1021 daniil /usr/bin/ksmserver 19.4M 5.6M 5.9M 18.1M
1093 daniil /usr/lib/kactivitymanagerd 7.4M 5.1M 6.1M 16.4M
807 root /usr/bin/NetworkManager --n 4.1M 6.0M 6.2M 11.4M
1185 daniil /usr/bin/pipewire 13.1M 7.4M 8.2M 13.3M
1534 daniil /usr/bin/akonadiserver 12.5M 8.4M 8.7M 16.5M
3316 daniil /usr/bin/dolphin -session 1 23.3M 5.9M 8.9M 30.9M
3263 daniil /usr/bin/dolphin -session 1 25.4M 6.0M 9.2M 31.6M
620 root /usr/lib/systemd/systemd-jo 904.0K 9.3M 9.5M 12.6M
43092 daniil /usr/bin/wineserver 0 10.5M 10.5M 11.9M
43127 daniil C:\windows\system32\svchost 0 10.4M 10.8M 14.0M
43178 daniil /usr/lib/kf5/kioslave5 /usr 0 7.4M 11.8M 28.7M
2178 daniil /usr/bin/konsole -session 1 23.0M 6.9M 12.7M 37.8M
1464 daniil easyeffects --gapplication- 37.7M 12.6M 12.7M 12.9M
2417 daniil /usr/bin/konsole -session 1 22.9M 7.1M 12.8M 38.0M
1446 daniil /usr/bin/konsole -session 1 28.0M 8.2M 13.7M 38.2M
8423 daniil /usr/bin/kwrite /home/danii 21.5M 9.1M 14.4M 49.2M
1023 daniil /usr/bin/kded5 19.1M 14.2M 15.0M 31.0M
1576 daniil /usr/bin/mysqld --defaults- 177.8M 16.2M 16.2M 19.1M
19170 daniil /usr/bin/spectacle 32.2M 10.3M 17.3M 57.1M
43118 daniil C:\windows\system32\plugpla 0 16.8M 18.4M 26.7M
43098 daniil C:\windows\system32\service 0 20.2M 20.8M 24.1M
43137 daniil C:\windows\system32\rpcss.e 0 20.4M 20.9M 24.3M
1538 daniil /usr/bin/pipewire-pulse 28.7M 21.0M 21.7M 26.8M
43258 root python /usr/bin/smem -tk 0 22.6M 22.7M 25.1M
43101 daniil C:\windows\system32\winedev 0 22.2M 24.3M 33.3M
43110 daniil C:\windows\system32\winedev 0 23.4M 25.5M 34.4M
43121 daniil C:\windows\system32\explore 0 31.2M 34.3M 44.1M
41643 daniil /usr/bin/dolphin 14.6M 39.4M 55.1M 114.5M
1024 daniil /usr/bin/kwin_x11 --replace 35.6M 49.3M 59.0M 105.8M
886 root /usr/lib/Xorg -nolisten tcp 48.4M 50.3M 73.6M 115.3M
43147 daniil C:\Program Files\foobar2000 0 84.1M 89.2M 101.4M
3254 daniil /usr/bin/plasma-systemmonit 36.4M 92.0M 101.9M 150.4M
1087 daniil /usr/bin/plasmashell --no-r 73.4M 156.6M 169.5M 226.8M
-------------------------------------------------------------------------------
122 9 1.5G 940.9M 1.1G 2.2G
Last edited by LaserMoai (2023-04-19 19:39:33)
Offline
The amount of swap indicated by smem seems rather high, I also noticed you are running earlyoom AND systemd-oomd . Maybe agressive swapping out things plays a role ?
Does the ram consumption improve if you disable one or both of the userland oom killers ?
Last edited by Lone_Wolf (2023-04-20 10:05:15)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
Yeah, I have actually been solving RAM-related issues for a long while now, and didn't notice that I'm using 2 OOM apps.
OOM killers don't have any direct connection to the swap though, right? I have previously used different vm.swappiness values and the like, but by now it's all already been reset to vanilla afaik. This is probably just because the memory has recently been heavily loaded.
I've disabled both killers and there hasn't been any noticeable improvement.
Offline
Can we get a new proc/meminfo w/ zswap disabled and the memory somehow "lost"?
Also
sudo journalctl -b | grep -iE '(gtt|gart)'
Offline
# cat /proc/meminfo
MemTotal: 14163184 kB
MemFree: 391612 kB
MemAvailable: 2386968 kB
Buffers: 78800 kB
Cached: 2124804 kB
SwapCached: 65060 kB
Active: 5701860 kB
Inactive: 4802132 kB
Active(anon): 4308552 kB
Inactive(anon): 4340488 kB
Active(file): 1393308 kB
Inactive(file): 461644 kB
Unevictable: 1860 kB
Mlocked: 1812 kB
SwapTotal: 16777212 kB
SwapFree: 15490300 kB
Zswap: 0 kB
Zswapped: 0 kB
Dirty: 34324 kB
Writeback: 0 kB
AnonPages: 8166084 kB
Mapped: 1426708 kB
Shmem: 348588 kB
KReclaimable: 300044 kB
Slab: 536712 kB
SReclaimable: 300044 kB
SUnreclaim: 236668 kB
KernelStack: 50016 kB
PageTables: 158368 kB
SecPageTables: 0 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 23858804 kB
Committed_AS: 46334948 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 99748 kB
VmallocChunk: 0 kB
Percpu: 13632 kB
HardwareCorrupted: 0 kB
AnonHugePages: 628736 kB
ShmemHugePages: 0 kB
ShmemPmdMapped: 0 kB
FileHugePages: 0 kB
FilePmdMapped: 0 kB
CmaTotal: 0 kB
CmaFree: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Hugetlb: 0 kB
DirectMap4k: 2798020 kB
DirectMap2M: 11730944 kB
DirectMap1G: 0 kB
# journalctl -b | grep -iE '(gtt|gart)'
апр 20 19:21:08 HomePC kernel: Linux agpgart interface v0.103
апр 20 19:21:10 HomePC kernel: amdgpu 0000:03:00.0: amdgpu: GART: 512M 0x0000000000000000 - 0x000000001FFFFFFF
апр 20 19:21:10 HomePC kernel: [drm] amdgpu: 6915M of GTT memory ready.
апр 20 19:21:10 HomePC kernel: [drm] GART: num cpu pages 131072, num gpu pages 131072
апр 20 19:21:10 HomePC kernel: [drm] PCIE GART of 512M enabled (table at 0x00000081FEB00000).
апр 20 19:21:14 HomePC kernel: kfd kfd: amdgpu: Allocated 3969056 bytes on gart
апр 20 19:21:14 HomePC kernel: amdgpu 0000:07:00.0: amdgpu: GART: 1024M 0x0000000000000000 - 0x000000003FFFFFFF
апр 20 19:21:14 HomePC kernel: [drm] amdgpu: 6915M of GTT memory ready.
апр 20 19:21:14 HomePC kernel: [drm] GART: num cpu pages 262144, num gpu pages 262144
апр 20 19:21:14 HomePC kernel: [drm] PCIE GART of 1024M enabled.
апр 20 19:21:15 HomePC kernel: kfd kfd: amdgpu: Allocated 3969056 bytes on gart
апр 20 19:21:25 HomePC kernel: [drm] PCIE GART of 512M enabled (table at 0x00000081FEB00000).
апр 20 19:24:25 HomePC kernel: [drm] PCIE GART of 512M enabled (table at 0x00000081FEB00000).
апр 20 19:24:35 HomePC kernel: [drm] PCIE GART of 512M enabled (table at 0x00000081FEB00000).
Offline
There's 6GB of GTT.
Now let's run a test and limit that drastically
amdgpu.gttsize=512
There's also 1 or 0.5GB or GART - likewise
amdgpu.gartsize=128
Then see whether and how much memory still get's "lost"
(If the restriction is too much, I guess plasma is probably pretty wasteful, things might crash - still an indicator where the memory might go)
Offline
Nothing much seems to have changed. Ratio is 10/13.9 GB. The settings definitely applied correctly.
# journalctl -b | grep -iE '(gtt|gart)'
апр 20 19:47:29 HomePC kernel: Command line: BOOT_IMAGE=/vmlinuz-linux root=/dev/mapper/RootVolGroup-root rw loglevel=3 quiet pcie_aspm=force cryptdevice=UUID=4c2567d9-306c-49e4-b8c6-4b6b675eb2c1:cryptlvm:allow-discards root=/dev/RootVolGroup/root amdgpu.gttsize=512 amdgpu.gartsize=128
апр 20 19:47:29 HomePC kernel: Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=/dev/mapper/RootVolGroup-root rw loglevel=3 quiet pcie_aspm=force cryptdevice=UUID=4c2567d9-306c-49e4-b8c6-4b6b675eb2c1:cryptlvm:allow-discards root=/dev/RootVolGroup/root amdgpu.gttsize=512 amdgpu.gartsize=128
апр 20 19:47:29 HomePC kernel: Linux agpgart interface v0.103
апр 20 19:47:31 HomePC kernel: amdgpu 0000:03:00.0: amdgpu: GART: 128M 0x0000000000000000 - 0x0000000007FFFFFF
апр 20 19:47:31 HomePC kernel: [drm] amdgpu: 512M of GTT memory ready.
апр 20 19:47:31 HomePC kernel: [drm] GART: num cpu pages 32768, num gpu pages 32768
апр 20 19:47:31 HomePC kernel: [drm] PCIE GART of 128M enabled (table at 0x00000081FEC40000).
апр 20 19:47:36 HomePC kernel: kfd kfd: amdgpu: Allocated 3969056 bytes on gart
апр 20 19:47:36 HomePC kernel: amdgpu 0000:07:00.0: amdgpu: GART: 128M 0x0000000000000000 - 0x0000000007FFFFFF
апр 20 19:47:36 HomePC kernel: [drm] amdgpu: 512M of GTT memory ready.
апр 20 19:47:36 HomePC kernel: [drm] GART: num cpu pages 32768, num gpu pages 32768
апр 20 19:47:36 HomePC kernel: [drm] PCIE GART of 128M enabled.
апр 20 19:47:37 HomePC kernel: kfd kfd: amdgpu: Allocated 3969056 bytes on gart
апр 20 19:47:46 HomePC kernel: [drm] PCIE GART of 128M enabled (table at 0x00000081FEC40000).
As you can probably see from the output, my storage is LUKS-encrypted.
EDIT: Now that I think about it, that's probably the reason for the DirectMap2M thing.
Last edited by LaserMoai (2023-04-20 17:39:01)
Offline
As you can probably see from the output, my storage is LUKS-encrypted.
Can you drive up the RAM usage by just reading a lot of files from the rescue or multi-user.target (eg. cat'ing them into /dev/null or so)?
Next victim of blame would probably be the ntfs mount (but this is just poking around to find the trigger)
Offline
No, I didn't manage to. I read a 9 GB dir in rescue.target, and only 130 MB were used, while the whole RAM capacity was filled with cache.
I unmounted the NTFS volume and haven't noticed any difference in behavior.
Offline
Does anyone please have any more suggestions? I've double-checked my previous post.
EDIT: In case someone suggests this is because of LUKS 2's default RAM requirements, only 2 encrypted volumes are at most mounted at any given time: an LVM-on-LUKS root volume and a 6 TB LUKS-on-LVM data volume. This should consume 2 GB of RAM at most afaik.
Last edited by LaserMoai (2023-04-22 12:44:36)
Offline
LUKS would affect the rescut.target and have been exposed by the read-many-files test.
Since the RAM is freed when you isolate the rescue.target (or multi-user.target?): is it also freed if you simply terminate the session and re-login?
If yes, it's something in the session, if no, it's -probably- the display server/kernel module.
Try to "export LIBGL_ALWAYS_SOFTWARE=1" somewhere in /etc/profile.d/* to see whether this is mesa/the amdgpu module.
Otherwise you'll have to slowly(?) incorporate your usual SW stack one by one until one process starts to cause this.
Also try the behavior of the LTS kernel.
Offline
The software mode didn't really change anything. I double checked that the variable applied properly. Same story with the LTS kernel.
I've made something of a revelation for myself. All along I've been thinking that, as linuxatemyram.com says, used memory in Linux tends to include disk cache, but nowadays it evidently doesn't. This explains, for example, why here I said that 200 megs were "used" when the output's clearly 500 MB. So I've actually been underreporting how big the gap between how much RAM is used vs. what the sum of processes would suggest is. By a couple of GBs in average.
I wanted to isolate what processes could be causing the weird behavior, so I've launched an empty KDE session. That one already weighs 2.3 GB of which around a single gig is explainable by running processes. The biggest app of these is "Calendar Reminders" which is a whopping 800 MB. That seems to be a relatively recent issue.
https://bugs.kde.org/show_bug.cgi?id=457930
The output during the fresh empty session:
> free -h
total used free shared buff/cache available
Mem: 13Gi 2.3Gi 10Gi 26Mi 1.1Gi 10Gi
Swap: 15Gi 0B 15Gi
> cat /proc/meminfo
MemTotal: 14163720 kB
MemFree: 10471328 kB
MemAvailable: 11373196 kB
Buffers: 164908 kB
Cached: 966408 kB
SwapCached: 0 kB
Active: 2391832 kB
Inactive: 424672 kB
Active(anon): 1684856 kB
Inactive(anon): 31032 kB
Active(file): 706976 kB
Inactive(file): 393640 kB
Unevictable: 360 kB
Mlocked: 360 kB
SwapTotal: 16777212 kB
SwapFree: 16777212 kB
Zswap: 0 kB
Zswapped: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 1647064 kB
Mapped: 376576 kB
Shmem: 30700 kB
KReclaimable: 90100 kB
Slab: 211600 kB
SReclaimable: 90100 kB
SUnreclaim: 121500 kB
KernelStack: 14976 kB
PageTables: 30836 kB
SecPageTables: 0 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 23859072 kB
Committed_AS: 8031772 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 60580 kB
VmallocChunk: 0 kB
Percpu: 11840 kB
HardwareCorrupted: 0 kB
AnonHugePages: 358400 kB
ShmemHugePages: 0 kB
ShmemPmdMapped: 0 kB
FileHugePages: 53248 kB
FilePmdMapped: 10240 kB
CmaTotal: 0 kB
CmaFree: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Hugetlb: 0 kB
DirectMap4k: 510404 kB
DirectMap2M: 6678528 kB
DirectMap1G: 7340032 kB
> smem -tk
PID User Command Swap USS PSS RSS
995 daniil /usr/bin/autossh -M 0 -NL 2 0 124.0K 139.0K 1.7M
1467 daniil bwrap --args 44 easyeffects 0 60.0K 155.0K 1.6M
1573 daniil bwrap --args 44 xdg-dbus-pr 0 136.0K 172.0K 1.7M
1580 daniil bwrap --args 44 easyeffects 0 116.0K 205.0K 1.4M
1560 daniil server --sh -n /run/user/10 0 372.0K 386.0K 1.2M
1571 daniil /usr/bin/dbus-daemon --conf 0 568.0K 695.0K 4.7M
1278 daniil /usr/lib/dconf-service 0 668.0K 775.0K 5.3M
1496 daniil /usr/lib/bluetooth/obexd 0 1.4M 1.5M 7.8M
1142 daniil /usr/bin/dbus-daemon --sess 0 1.9M 2.0M 5.9M
1576 daniil xdg-dbus-proxy --args=46 0 2.5M 2.6M 7.4M
1504 daniil /usr/bin/pipewire-pulse 0 2.2M 2.6M 9.1M
2180 daniil /usr/bin/ssh -NL 22:localho 0 2.3M 2.6M 8.1M
1180 daniil /usr/lib/xdg-permission-sto 0 2.6M 2.6M 7.6M
1176 daniil /usr/lib/xdg-document-porta 0 2.9M 3.1M 8.7M
1312 daniil /usr/bin/xembedsniproxy 0 2.8M 3.1M 22.9M
1421 daniil /usr/lib/kf5/kscreen_backen 0 2.7M 3.1M 22.1M
1562 daniil /usr/lib/at-spi-bus-launche 0 3.0M 3.2M 9.8M
1594 daniil /usr/lib/gvfsd-fuse /run/us 0 2.9M 3.2M 8.3M
1308 daniil /usr/bin/gmenudbusmenuproxy 0 3.0M 3.3M 24.5M
1629 daniil /usr/lib/kf5/kioslave5 /usr 0 3.2M 3.6M 25.3M
2219 daniil fish 0 4.2M 4.3M 7.8M
1585 daniil /usr/lib/gvfsd 0 4.1M 4.3M 10.9M
1480 daniil /usr/lib/geoclue-2.0/demos/ 0 4.6M 4.8M 10.5M
1539 daniil /usr/lib/flatpak-session-he 0 4.6M 4.8M 10.3M
1237 daniil /usr/bin/kglobalaccel5 0 4.4M 4.8M 26.7M
1117 daniil /usr/lib/systemd/systemd -- 0 3.6M 5.2M 12.8M
2105 daniil /usr/lib/kf5/kioslave5 /usr 0 4.7M 5.3M 26.5M
1424 daniil /usr/lib/kf5/kioslave5 /usr 0 4.9M 5.5M 26.9M
2374 daniil /usr/bin/ksystemstats 0 7.1M 8.3M 33.3M
1130 daniil /usr/bin/startplasma-x11 0 7.3M 8.4M 42.5M
1269 daniil /usr/lib/kactivitymanagerd 0 9.4M 10.3M 40.4M
1171 daniil /usr/lib/xdg-desktop-portal 0 9.4M 10.3M 20.5M
1358 daniil /usr/bin/wireplumber 0 14.2M 16.5M 30.6M
1355 daniil /usr/bin/pipewire 0 14.6M 16.7M 28.3M
1481 daniil /usr/bin/kaccess 0 19.3M 21.5M 106.9M
2433 daniil python /usr/bin/smem -tk 0 21.4M 21.5M 24.1M
1201 daniil /usr/bin/ksmserver 0 19.5M 21.6M 106.9M
1311 daniil /usr/lib/xdg-desktop-portal 0 19.7M 21.7M 105.7M
1801 daniil /usr/bin/akonadi_contacts_r 0 19.6M 21.8M 110.5M
1798 daniil /usr/bin/akonadi_akonotes_r 0 19.7M 21.8M 111.1M
1835 daniil /usr/bin/akonadi_migration_ 0 19.7M 21.9M 109.9M
1129 daniil /usr/bin/kwalletd5 --pam-lo 0 19.9M 21.9M 106.9M
1802 daniil /usr/bin/akonadi_followupre 0 20.1M 22.3M 112.5M
1840 daniil /usr/bin/akonadi_newmailnot 0 20.0M 22.5M 114.3M
1485 daniil /usr/bin/kalendarac 0 20.8M 23.6M 114.3M
1830 daniil /usr/bin/akonadi_indexing_a 0 21.3M 23.7M 114.0M
1831 daniil /usr/bin/akonadi_maildir_re 0 21.7M 23.8M 113.1M
1800 daniil /usr/bin/akonadi_birthdays_ 0 21.7M 23.9M 113.0M
1595 daniil /usr/bin/akonadi_control 0 21.9M 24.2M 110.9M
1832 daniil /usr/bin/akonadi_maildispat 0 22.1M 24.3M 114.2M
1824 daniil /usr/bin/akonadi_imap_resou 0 22.1M 24.5M 116.2M
1803 daniil /usr/bin/akonadi_ical_resou 0 22.1M 24.5M 114.5M
1828 daniil /usr/bin/akonadi_imap_resou 0 22.2M 24.5M 115.5M
1826 daniil /usr/bin/akonadi_imap_resou 0 22.2M 24.5M 116.0M
1834 daniil /usr/bin/akonadi_mailmerge_ 0 22.2M 24.7M 116.6M
1632 daniil /usr/bin/akonadiserver 0 24.3M 25.1M 54.6M
1804 daniil /usr/bin/akonadi_imap_resou 0 22.5M 25.2M 119.9M
1805 daniil /usr/bin/akonadi_imap_resou 0 22.5M 25.3M 120.8M
1825 daniil /usr/bin/akonadi_imap_resou 0 24.5M 27.2M 121.8M
1823 daniil /usr/bin/akonadi_imap_resou 0 24.5M 27.3M 122.8M
1806 daniil /usr/bin/akonadi_imap_resou 0 24.5M 27.3M 122.7M
2109 daniil /usr/lib/kf5/kioslave5 /usr 0 24.3M 28.5M 121.7M
1484 daniil /usr/lib/DiscoverNotifier 0 29.6M 33.5M 129.5M
1799 daniil /usr/bin/akonadi_archivemai 0 29.8M 38.8M 154.1M
1854 daniil /usr/bin/akonadi_unifiedmai 0 31.6M 40.5M 155.8M
1833 daniil /usr/bin/akonadi_mailfilter 0 32.3M 41.3M 156.6M
1848 daniil /usr/bin/akonadi_sendlater_ 0 33.7M 42.1M 156.1M
1203 daniil /usr/bin/kded5 0 37.3M 43.1M 142.6M
2189 daniil /usr/bin/konsole 0 41.6M 50.9M 155.5M
1204 daniil /usr/bin/kwin_x11 --replace 0 72.6M 86.3M 203.5M
1605 daniil easyeffects --gapplication- 0 103.7M 103.7M 103.8M
2357 daniil /usr/bin/plasma-systemmonit 0 100.1M 113.6M 231.2M
1639 daniil /usr/bin/mysqld --defaults- 0 200.5M 200.6M 206.2M
1265 daniil /usr/bin/plasmashell --no-r 0 194.2M 212.8M 343.4M
-------------------------------------------------------------------------------
74 1 0 1.6G 1.8G 5.6G
Last edited by LaserMoai (2023-04-22 20:31:06)
Offline
while true; do awk '/MemTotal:/{v=$2}/MemFree:|Active:|Inactive:|Slab:/{v-=$2} END {printf v/1024 " MB\r"}' /proc/meminfo; sleep 5; done
You don't want that number to spiral out of control.
Offline
Before KDE session that number is 350 MB, when I launch one it becomes 750 MB. The number keeps increasing with more apps launched up to 2.2 GB.
The biggest jump tends to be when I launch the second big browser session: more than 800 MB. It doesn't matter if that browser is Firefox or Chromium.
I've already seen the number rising up to 4 GB over time. It doesn't significantly decrease after I isolate the rescue.target.
If you think there's a good chance this would get resolved with reinstallation of OS, I can give that a try. I don't want to be too much of a hassle.
Last edited by LaserMoai (2023-04-23 08:49:48)
Offline
It doesn't significantly decrease after I isolate the rescue.target.
Well, it mostly does.
If you cannot return the memory from there either by dropping caches and/or reclaiming the GTT/GART, https://unix.stackexchange.com/question … ree-memory you're facing an actual kernel memory leak. Since the LTS kernel is affected, you might want to try https://aur.archlinux.org/packages/linux-lts-515-git and https://aur.archlinux.org/packages/linu … it-headers
Offline