You are not logged in.

#26 2025-06-03 18:17:49

develux
Member
Registered: 2024-05-26
Posts: 37

Re: Abnormal memory usage

topcat01 wrote:

Can you revert this temporarily, reboot, and then post meminfo with no graphics running?

Right after reboot with only plasma running: http://0x0.st/8YYv.txt

After doing

systemctl isolate multi-user.target

http://0x0.st/8YYw.txt

Last edited by develux (2025-06-03 18:23:11)

Offline

#27 2025-06-03 19:22:04

seth
Member
Registered: 2012-09-03
Posts: 64,477

Re: Abnormal memory usage

Drops from ~690 to ~660 MB unaccounted for.
Test @topcat01's suggestion, though nb. that "Total - Available" is the active memory (+kernel slabs, but they're usually not much)

Offline

#28 2025-06-03 19:52:21

topcat01
Member
Registered: 2019-09-17
Posts: 189

Re: Abnormal memory usage

I have found that activating the zram related sysctls bumps the kernel memory usage (see, for example, https://unix.stackexchange.com/question … onsumption). I think it also increases the kernels internal memory thresholds, which might not be properly reflected in procinfo.

Offline

#29 2025-06-04 02:17:05

develux
Member
Registered: 2024-05-26
Posts: 37

Re: Abnormal memory usage

seth wrote:

Test @topcat01's suggestion

Already disabled those sysctls in previous post, will continue monitoring today

Offline

#30 2025-06-04 04:23:46

develux
Member
Registered: 2024-05-26
Posts: 37

Re: Abnormal memory usage

With zram rules disabled and plasma not running: http://0x0.st/8YIQ.txt
Still using +-2.5gb without anything running in tty

Offline

#31 2025-06-04 05:21:41

seth
Member
Registered: 2012-09-03
Posts: 64,477

Re: Abnormal memory usage

More like 3.7 GB but

Active:          1406972 kB
Inactive:        1138252 kB
Slab:            1398472 kB

they're accounted for and

Active(file):    1161956 kB
Inactive(file):  1138252 kB
SReclaimable:    1193352 kB

most of that is in reclaimable kernel memory and file caches

Active(anon):     245016 kB
Inactive(anon):        0 kB

Only around 240MB are actually actively used by something.

Stop looking at data aggregators or at least look at "free -h" which lists file caches separately.

Wrt #27 it will also be perfectly normal that the GPU allocates *some* memory, the question is whether the amount of unaccounted memory (significantly) increases over time and then also cannot be (largely) reclaimed by temporarily allocating a lot of RAM while there's no VRAM demands.

Offline

#32 2025-06-06 07:52:24

develux
Member
Registered: 2024-05-26
Posts: 37

Re: Abnormal memory usage

Seems this problem randomly disappeared when I switched to 6.15.0-1-mainline. I had 1.8gb used after entering plasma session
And it is using 2gb ram when everything is closed (except koi, yakuake, easyeffects, openfreebuds and kde connect)

Last edited by develux (2025-06-06 07:54:04)

Offline

#33 2025-06-06 12:10:55

seth
Member
Registered: 2012-09-03
Posts: 64,477

Re: Abnormal memory usage

when everything is closed (except koi, yakuake, easyeffects, openfreebuds and kde connect)

You do understand that all of that +the GUI +the GPU /will/ require some RAM?
Plasma is morbidly obese desktop environment. It /will/ take some of your resources.
The thing you're looking for is, as pointed out, whether some memory isn't accounted for.

Offline

#34 2025-06-06 13:18:59

develux
Member
Registered: 2024-05-26
Posts: 37

Re: Abnormal memory usage

seth wrote:

You do understand that all of that +the GUI +the GPU /will/ require some RAM?

Yes. I meant that it is good compared to 3gb usage after entering plasma session on 6.14.9 kernel. Seems this memory issue is fixed with 6.15.0-1-mainline

Offline

#35 2025-06-06 20:15:54

topcat01
Member
Registered: 2019-09-17
Posts: 189

Re: Abnormal memory usage

As a test, I tried many (silly) things with a couple of my machines, but everything is behaving normally.

Offline

#36 2025-06-07 17:31:32

develux
Member
Registered: 2024-05-26
Posts: 37

Re: Abnormal memory usage

Nah it wasn't fixed. Got this after few hours of usage  http://0x0.st/8g4u.txt
Maybe I need to reinstall Arch

Offline

#37 2025-06-07 19:36:43

seth
Member
Registered: 2012-09-03
Posts: 64,477

Re: Abnormal memory usage

MemTotal:       32235876 kB
MemFree:        10267832 kB
Active:          3306700 kB
Inactive:       14721832 kB
Slab:             546036 kB

Around 3GB are unaccounted for, most RAM is in

Inactive(file): 14386952 kB

inactive file caches (likely the indexer baloo)
If you cannot reclaim the lost RAM from the rescue target (ie. it's not GART/GTT) you're looking at some leak

Maybe I need to reinstall Arch

If the kernel is leaking memory, it will do so despite any re-installations.

lsmod

Have you tried eg. the LTS kernel?

Offline

#38 2025-06-08 02:58:09

develux
Member
Registered: 2024-05-26
Posts: 37

Re: Abnormal memory usage

seth wrote:

Have you tried eg. the LTS kernel?

Not yet, will try today

Offline

#39 2025-06-08 03:38:28

develux
Member
Registered: 2024-05-26
Posts: 37

Re: Abnormal memory usage

Got the same issue, no apps are opened at all, lts kernel. http://0x0.st/8gxn.txt

Offline

#40 2025-06-08 06:21:36

develux
Member
Registered: 2024-05-26
Posts: 37

Re: Abnormal memory usage

seth wrote:
lsmod

http://0x0.st/8g3m.txt

Offline

#41 2025-06-08 06:34:29

seth
Member
Registered: 2012-09-03
Posts: 64,477

Re: Abnormal memory usage

"no apps" is not a thing, again: plasma itself is morbidly obese.
There're ~1.7GB unaccounted for.
Do you use an overlay filesystem?? Why? for what? Of what size?

lsblk -f
df -h

Offline

#42 2025-06-08 09:58:27

develux
Member
Registered: 2024-05-26
Posts: 37

Re: Abnormal memory usage

seth wrote:

Do you use an overlay filesystem?? Why? for what? Of what size?

lsblk -f
df -h

https://0x0.st/8ggi.txt https://0x0.st/8ggs.txt
Yes, I am using overlayfs for psd https://wiki.archlinux.org/title/Profile-sync-daemon

Offline

#43 2025-06-08 10:05:27

seth
Member
Registered: 2012-09-03
Posts: 64,477

Re: Abnormal memory usage

And do you think that maybe this is were your RAM gets "lost"…?
(In case: that's a rethorical question, check the behavior w/ psd but I'm already betting your right arm on it…)

Offline

#44 2025-06-08 11:33:54

develux
Member
Registered: 2024-05-26
Posts: 37

Re: Abnormal memory usage

seth wrote:

And do you think that maybe this is were your RAM gets "lost"…?
(In case: that's a rethorical question, check the behavior w/ psd but I'm already betting your right arm on it…)

I disabled psd service and got same ~4GB memory usage even in tty (http:0x0.st/8ggE.txt)

Offline

#45 2025-06-08 12:07:46

seth
Member
Registered: 2012-09-03
Posts: 64,477

Re: Abnormal memory usage

3.3GB memory gap… for clarification, the "overlay" module wasn't loaded at the time?
Next to that and zram, xfs is really the only major outlier in that list… and then try

amdgpu.gttsize=512 amdgpu.gartsize=512

, as mentioned, you might run into GUI issues w/ plasma, but amdgpu should™ no longer be able to snatch more than 1GB
So if that constrains the leak, we can at least tell where it's likely going.

Offline

#46 2025-06-08 16:33:14

develux
Member
Registered: 2024-05-26
Posts: 37

Re: Abnormal memory usage

seth wrote:

"overlay" module wasn't loaded at the time?

Don`t know really, but I disabled psd and then rebooted. Will try those parameters

Offline

#47 2025-06-08 19:58:13

seth
Member
Registered: 2012-09-03
Posts: 64,477

Re: Abnormal memory usage

Also make sure that the overlay module isn't loaded - the memory simply taken by the overlayfs would be the most obvious explanation.
If it's not that nor amdgpu, nor zram, we'll have to consider a leak in xfs (because it's less commonly used this might rather go undetected)

Offline

#48 2025-06-08 20:19:24

topcat01
Member
Registered: 2019-09-17
Posts: 189

Re: Abnormal memory usage

I have been using xfs on Amazon Linux 2023 instances (so, relatively recent kernel) and even after heavy cpu, ram, and fs usage haven't noticed any leaks. These instances are up for weeks. Haven't tried it on Arch though.

Offline

#49 2025-06-09 12:05:32

develux
Member
Registered: 2024-05-26
Posts: 37

Re: Abnormal memory usage

After adding limits parameters to cmdline: http://0x0.st/8g5m.txt
System was up for ~1 hour so not sure that i have enough memory usage here

Offline

#50 2025-06-09 12:17:35

seth
Member
Registered: 2012-09-03
Posts: 64,477

Re: Abnormal memory usage

Seems ~1.4GB unaccounted for…  keep an eye on it but it starts to look like it's just GART/GTT after all?

Offline

Board footer

Powered by FluxBB