You are not logged in.

#1 2023-07-05 16:54:03

Eternex49
Member
Registered: 2022-07-08
Posts: 12

[SOLVED] Abnormally high memory usage at idle

As the title suggests, my memory usage at idle (only dwm + st) is unusually higher than what I think it should be. (2.6 Gb is, I think (and also, from various accounts) way higher).

Output of

free -m
               total        used        free      shared  buff/cache   av
Mem:            14Gi       2.6Gi       2.8Gi        33Mi       9.9Gi
Swap:           15Gi       1.2Mi        15Gi
cat /proc/meminfo
MemTotal:       15699252 kB
MemFree:         2894732 kB
MemAvailable:   12921060 kB
Buffers:         1182680 kB
Cached:          8170560 kB
SwapCached:           12 kB
Active:          1934840 kB
Inactive:        7639168 kB
Active(anon):     156884 kB
Inactive(anon):    98156 kB
Active(file):    1777956 kB
Inactive(file):  7541012 kB
Unevictable:          32 kB
Mlocked:              32 kB
SwapTotal:      16777212 kB
SwapFree:       16775932 kB
Zswap:               168 kB
Zswapped:            156 kB
Dirty:                48 kB
Writeback:             0 kB
AnonPages:        212692 kB
Mapped:           201868 kB
Shmem:             34272 kB
KReclaimable:    1041764 kB
Slab:            1224656 kB
SReclaimable:    1041764 kB
SUnreclaim:       182892 kB
KernelStack:        6496 kB
PageTables:         4644 kB
SecPageTables:         0 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    24626836 kB
Committed_AS:    1280196 kB
VmallocTotal:   34359738367 kB
VmallocUsed:       78160 kB
VmallocChunk:          0 kB
Percpu:            10048 kB
HardwareCorrupted:     0 kB
AnonHugePages:    102400 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
FileHugePages:     90112 kB
FilePmdMapped:     67584 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:     3136000 kB
DirectMap2M:    12953600 kB
DirectMap1G:     1048576 kB
smem -kt
  PID User     Command                         Swap      USS      PSS      RSS
956626 joes     xinit /home/joes/.xinitrc -        0   252.0K   375.0K     2.3M
956657 joes     dwmblocks                          0   244.0K   382.0K     2.4M
479831 joes     /usr/bin/gpg-agent --superv        0   360.0K   632.0K     3.2M
  674 joes     /usr/bin/dbus-daemon --conf        0   724.0K   986.0K     4.8M
 2110 joes     /usr/lib/dconf-service             0   900.0K     1.1M     5.5M
956611 joes     /bin/sh /usr/bin/startx            0   728.0K     1.3M     4.3M
986757 joes     /bin/bash                          0   832.0K     1.4M     4.5M
956605 joes     -bash                              0   848.0K     1.4M     4.4M
  586 joes     /usr/bin/dbus-daemon --sess        0     1.4M     1.6M     5.4M
956766 joes     /usr/lib/at-spi2-registryd         0     1.3M     1.9M     8.0M
952725 joes     /usr/lib/pulse/gsettings-he        0     1.2M     2.0M     8.0M
 1102 joes     /usr/lib/gvfsd-metadata            0     2.8M     3.1M     8.4M
  759 joes     /usr/lib/bluetooth/obexd           0     2.6M     3.1M     8.2M
18271 joes     /usr/bin/pipewire                  0     3.0M     3.2M     7.4M
  689 joes     /usr/lib/gvfsd-fuse /run/us        0     3.1M     3.4M     8.3M
  667 joes     /usr/lib/at-spi-bus-launche        0     3.3M     3.6M     9.6M
956641 joes     dwm                                0     1.9M     4.1M    10.2M
 1159 joes     /usr/lib/gvfsd-dnssd --spaw        0     3.6M     4.1M    12.2M
  556 joes     /usr/lib/systemd/systemd --        0     3.8M     4.8M    11.4M
  678 joes     /usr/lib/gvfsd                     0     5.3M     5.8M    12.9M
956661 joes     dunst                              0     5.1M     5.8M    12.6M
 1143 joes     /usr/lib/gvfsd-computer --s        0     5.7M     6.2M    13.7M
 1149 joes     /usr/lib/gvfsd-network --sp        0     5.7M     6.2M    14.0M
 1135 joes     /usr/lib/gvfsd-trash --spaw        0     5.9M     6.4M    14.2M
986756 joes     st                                 0     4.4M     6.5M    12.5M
 1112 joes     /usr/lib/gvfs-udisks2-volum        0     7.3M     8.8M    19.3M
1000873 joes     python /usr/bin/smem -kt           0    13.8M    13.9M    16.5M
952442 joes     /usr/bin/pulseaudio --daemo        0    14.6M    15.7M    21.7M
979406 joes     /usr/bin/dirmngr --supervis        0    21.0M    22.4M    26.9M
956627 joes     /usr/lib/Xorg -nolisten tcp        0   159.2M   160.8M   168.4M
-------------------------------------------------------------------------------
   30 1                                           0   280.6M   300.8M   461.1M

Last edited by Eternex49 (2023-07-08 14:40:46)

Offline

#2 2023-07-05 19:31:13

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,132

Re: [SOLVED] Abnormally high memory usage at idle

AMD gpu?

Online

#3 2023-07-05 23:45:31

Eternex49
Member
Registered: 2022-07-08
Posts: 12

Re: [SOLVED] Abnormally high memory usage at idle

Yes, I do use Amdgpu. After a search, though, I haven't seen similar issues concerning it.

Offline

#4 2023-07-06 05:10:11

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,132

Online

#5 2023-07-06 13:58:53

Eternex49
Member
Registered: 2022-07-08
Posts: 12

Re: [SOLVED] Abnormally high memory usage at idle

No, that's not my problem. As you can see from the outputs I've posted, my memory usage at idle is about 2 G, nowhere near that amount.
Also, I think that Chrome is responsible. After closing it, the general memory usage reported by htop is about 600 M, whilst normally is about 400 M after closing everything.
I've even taken it further and shut down the X server: by launching htop in the bare framebuffer it still reports 600M of ram, which makes me believe that Chrome is somehow leaking memory, since the usage doesn't diminish even in the framebuffer. By tests I've made, without having launched Chrome, it should be about 130 M.

Last edited by Eternex49 (2023-07-06 14:13:22)

Offline

#6 2023-07-06 14:34:28

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,132

Re: [SOLVED] Abnormally high memory usage at idle

If chrome leaks RAM it'll be freed after chrome terminated.
If chrome would induce RAM leaks in X11, it would be freed after terminating X11.

Ther RAM is _possibly_ lost in the kernel space, either the caches or GTT/GART - the latter being re-claimable by using a lot of RAM
https://bbs.archlinux.org/viewtopic.php?id=285160 (linked in the previously linked thread)
https://bbs.archlinux.org/viewtopic.php … 9#p2004169 (links a SE post illustrating GTT/GART reclamation)

Online

#7 2023-07-07 23:58:26

Eternex49
Member
Registered: 2022-07-08
Posts: 12

Re: [SOLVED] Abnormally high memory usage at idle

Sorry for letting you wait. Today, and with multiple tests in the past days, I've tried launching

tail /dev/zero

(after having run Chrome for several hours). The memory usage, with the already mentioned minimal amount of open applications, went from 1.06G to about 440M. Unfortunately, I don't understand a lot of the threads you posted but this definitely seems to be a type of problem mentioned there.

Last edited by Eternex49 (2023-07-07 23:59:00)

Offline

#8 2023-07-08 05:56:51

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,132

Re: [SOLVED] Abnormally high memory usage at idle

That's not a problem at all, that's simply https://en.wikipedia.org/wiki/Graphics_ … ping_table and perfectly expectable and reasonable behavior.
The RAM is used by your GPU and when required it'll be reclaimed by the system.

Online

#9 2023-07-08 10:08:39

Eternex49
Member
Registered: 2022-07-08
Posts: 12

Re: [SOLVED] Abnormally high memory usage at idle

Ok... I have a couple of questions.
1. Forgive my ignorance but, then, why is this memory being reported as "used" by htop, instead of "buffers", "shared", "cache"? (Doesn't used referer only to userspace memory)?
2. Why does this happen only with Chrome?
3. Why hasn't anyone else reported having this "problem" with Chrome? (It seems something which would produce a lot of discussion among people like me who, seeing 2G of memory being used on htop, would get quite alarmed and annoyed.)

Offline

#10 2023-07-08 12:13:47

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,132

Re: [SOLVED] Abnormally high memory usage at idle

1. All those aggregations use pretty random functions to come to the final number, free very recently changed its metric, https://gitlab.com/procps-ng/procps/-/c … 5e56707e4d (well, recent-ish)
2. It'll probably happen w/ everything that allocates (a lot of) textures, you could try to run chrome w/ HW acceleration disabled or LIBGL_ALWAYS_SOFTWARE, https://docs.mesa3d.org/envvars.html
3. I've linked https://bbs.archlinux.org/viewtopic.php?id=271247 where exactly this is discussed - just because you assert that nobody has reported this doesn't mean it didn't happen - also you're (ideally) not running into problems because of it, so unless you're actively looking for it, it'll just pass by.

Online

#11 2023-07-08 14:10:22

Eternex49
Member
Registered: 2022-07-08
Posts: 12

Re: [SOLVED] Abnormally high memory usage at idle

1. Could you suggest any utility which would give less "misleading" results?
3. My argument was about Chrome in particular.

Offline

#12 2023-07-08 14:11:46

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,132

Re: [SOLVED] Abnormally high memory usage at idle

cat /proc/meminfo and limiting the criteria to a proprietary software that's not packaged in many distros will hardly increase the search hits?

Online

Board footer

Powered by FluxBB