You are not logged in.

#1 2025-02-13 17:23:36

neocat
Member
Registered: 2022-09-16
Posts: 21

[SOLVED] What is hogging so much memory?

I've noticed that my system consumes a suspiciously high amount of memory (12Gi)

$ free -h
               total        used        free      shared  buff/cache   available
Mem:            31Gi        12Gi        10Gi        71Mi       8.6Gi        18Gi
Swap:             0B          0B          0B
Total:          31Gi        12Gi        10Gi

But when I check different monitoring utilities (ps, top, htop, btop, Resources) I don't see anything that consumes more than 1Gi

Here is an output of a command showing the memory consumption of all processes.

$ ps aux  | awk '{Total=Total+$6/1024} END{print "Total MB: " Total}'
Total MB: 3177.49

It doesn't even close to 12Gi

I've also checked all tmpfs directories and their combined memory consumption is about 10M.

Any ideas what else can consume so much RAM?

Last edited by neocat (2025-02-15 20:50:26)

Offline

#2 2025-02-13 18:14:11

cryptearth
Member
Registered: 2024-02-03
Posts: 1,836

Re: [SOLVED] What is hogging so much memory?

do you use ZFS?

Offline

#3 2025-02-13 19:23:29

loqs
Member
Registered: 2014-03-06
Posts: 18,692

Re: [SOLVED] What is hogging so much memory?

Please post the output of `cat /proc/meminfo`.

Offline

#4 2025-02-13 19:41:54

neocat
Member
Registered: 2022-09-16
Posts: 21

Re: [SOLVED] What is hogging so much memory?

cryptearth wrote:

do you use ZFS?

No, just ext4


loqs wrote:

Please post the output of `cat /proc/meminfo`.

$ cat /proc/meminfo
MemTotal:       32768756 kB
MemFree:        16307400 kB
MemAvailable:   19652292 kB
Buffers:          123996 kB
Cached:          4134320 kB
SwapCached:            0 kB
Active:          5169920 kB
Inactive:        1167180 kB
Active(anon):    2286620 kB
Inactive(anon):   504828 kB
Active(file):    2883300 kB
Inactive(file):   662352 kB
Unevictable:          32 kB
Mlocked:              32 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Zswap:                 0 kB
Zswapped:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:       2067276 kB
Mapped:          1217884 kB
Shmem:            712852 kB
KReclaimable:     263580 kB
Slab:             474076 kB
SReclaimable:     263580 kB
SUnreclaim:       210496 kB
KernelStack:       21760 kB
PageTables:        29836 kB
SecPageTables:      8060 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    16384376 kB
Committed_AS:   10478832 kB
VmallocTotal:   34359738367 kB
VmallocUsed:       75520 kB
VmallocChunk:          0 kB
Percpu:            30720 kB
HardwareCorrupted:     0 kB
AnonHugePages:    608256 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
FileHugePages:    438272 kB
FilePmdMapped:    288768 kB
CmaTotal:              0 kB
CmaFree:               0 kB
Unaccepted:            0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB
DirectMap4k:    21311320 kB
DirectMap2M:    12154880 kB
DirectMap1G:           0 kB

Offline

#5 2025-02-13 20:16:51

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 71,050

Re: [SOLVED] What is hogging so much memory?

AMD gpu affording itself a decent amount of GART/GTT?
There's only ~6GB accounted for and you're lacking another 6GB - can you reclaim it?
https://bbs.archlinux.org/viewtopic.php … 0#p2024800

Offline

#6 2025-02-15 20:50:05

neocat
Member
Registered: 2022-09-16
Posts: 21

Re: [SOLVED] What is hogging so much memory?

Yes, it is 100% amdgpu's GART/GTT. I've figured out that this high memory consumption appears when I launch a game and remains after I stop playing.

And I can reclaim it with

stress-ng --vm 1 --vm-bytes 31G

Offline

#7 2025-02-15 21:46:47

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

Re: [SOLVED] What is hogging so much memory?

Is there a direct way to measure this?

Offline

#8 2025-02-15 22:25:46

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 71,050

Re: [SOLVED] What is hogging so much memory?

radeontop/nvtop, maybe.
The amdgpu module also allows to limit those (whther that's a good idea is another question)

modinfo amdgpu | grep -iE 'g(art|tt)'

Offline

Board footer

Powered by FluxBB