You are not logged in.

#1 2023-07-02 11:02:38

knnk
Member
Registered: 2023-07-02
Posts: 3

Memory usage skyrockets up to 90-95% after mininal GPU use.

So I recently got a new laptop for my school work and, as usually, went ahead with an arch installation.

My issue is that something (the kernel I suppose) is preventing memory from being freed, since total memory usage of all processes is way less than the total.

This seems to only happen when I use an application which makes use of the GPU (video playback, workspace switching with picom fade animations).

Bashtop reports 13.8 GiB of RAM being used in total, while only a few 2.8 GiB is actually in use by userspace.

474b97e6.png

uname -a output:

Linux semina 6.3.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 21 Jun 2023 20:46:20 +0000 x86_64 GNU/Linux

It is not the disk cache, since memory usage by both the cache and processes does not amount to over 24000 MiB in use.

free -m output:

               total        used        free      shared  buff/cache   available
Mem:           15332       14783         270        2435        3014         548
Swap:          16383       10281        6102

/proc/meminfo:

MemTotal:       15700820 kB
MemFree:          270920 kB
MemAvailable:     436928 kB
Buffers:            6576 kB
Cached:          2993648 kB
SwapCached:        12500 kB
Active:          1973800 kB
Inactive:        1637112 kB
Active(anon):    1703056 kB
Inactive(anon):  1545708 kB
Active(file):     270744 kB
Inactive(file):    91404 kB
Unevictable:         188 kB
Mlocked:             188 kB
SwapTotal:      16777212 kB
SwapFree:        7606268 kB
Zswap:           3135624 kB
Zswapped:        6880868 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:        593900 kB
Mapped:           305176 kB
Shmem:           2637556 kB
KReclaimable:     109500 kB
Slab:             509252 kB
SReclaimable:     109500 kB
SUnreclaim:       399752 kB
KernelStack:       11876 kB
PageTables:        15400 kB
SecPageTables:         0 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    24627620 kB
Committed_AS:   15277652 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      152020 kB
VmallocChunk:          0 kB
Percpu:            11840 kB
HardwareCorrupted:     0 kB
AnonHugePages:    192512 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
FileHugePages:     32768 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:     8685800 kB
DirectMap2M:     7405568 kB
DirectMap1G:     1048576 kB
slabinfo - version: 2.1
# name            <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab> : tunables <limit> <batchcount> <sharedfactor> : slabdata <active_slabs> <num_slabs> <sharedavail>
kvm_async_pf           0      0    136   30    1 : tunables    0    0    0 : slabdata      0      0      0
kvm_vcpu               0      0   7392    4    8 : tunables    0    0    0 : slabdata      0      0      0
kvm_mmu_page_header      0      0    184   22    1 : tunables    0    0    0 : slabdata      0      0      0
x86_emulator           0      0   2656   12    8 : tunables    0    0    0 : slabdata      0      0      0
fuse_request          78     78    152   26    1 : tunables    0    0    0 : slabdata      3      3      0
fuse_inode            78     78    832   39    8 : tunables    0    0    0 : slabdata      2      2      0
ext4_groupinfo_4k   7502   7502    184   22    1 : tunables    0    0    0 : slabdata    341    341      0
ext4_fc_dentry_update      0      0     96   42    1 : tunables    0    0    0 : slabdata      0      0      0
ext4_inode_cache   15902  28890   1200   27    8 : tunables    0    0    0 : slabdata   1070   1070      0
ext4_io_end         2560   2816     64   64    1 : tunables    0    0    0 : slabdata     44     44      0
bio_post_read_ctx    170    170     48   85    1 : tunables    0    0    0 : slabdata      2      2      0
extent_status       2762   5202     40  102    1 : tunables    0    0    0 : slabdata     51     51      0
jbd2_journal_handle   2847   3139     56   73    1 : tunables    0    0    0 : slabdata     43     43      0
jbd2_journal_head   1700   1836    120   34    1 : tunables    0    0    0 : slabdata     54     54      0
jbd2_revoke_table_s    512    512     16  256    1 : tunables    0    0    0 : slabdata      2      2      0
jbd2_revoke_record_s   1920   1920     32  128    1 : tunables    0    0    0 : slabdata     15     15      0
bio-176              273    273    192   21    1 : tunables    0    0    0 : slabdata     13     13      0
bio-256             1175   1175    320   25    2 : tunables    0    0    0 : slabdata     47     47      0
bio-992               32     32   1024   32    8 : tunables    0    0    0 : slabdata      1      1      0
bio-107              870    930   1088   30    8 : tunables    0    0    0 : slabdata     31     31      0
kcopyd_job             0      0   3240   10    8 : tunables    0    0    0 : slabdata      0      0      0
dm_uevent              0      0   2888   11    8 : tunables    0    0    0 : slabdata      0      0      0
bio-136              987    987    192   21    1 : tunables    0    0    0 : slabdata     47     47      0
uvm_tools_event_tracker_t      0      0   1128   29    8 : tunables    0    0    0 : slabdata      0      0      0
migrate_vma_state_t      0      0  18952    1    8 : tunables    0    0    0 : slabdata      0      0      0
uvm_va_block_context_t      0      0   1472   22    8 : tunables    0    0    0 : slabdata      0      0      0
uvm_va_block_gpu_state_t      0      0    424   38    4 : tunables    0    0    0 : slabdata      0      0      0
uvm_va_block_t         0      0    848   38    8 : tunables    0    0    0 : slabdata      0      0      0
uvm_va_range_t         0      0   1896   17    8 : tunables    0    0    0 : slabdata      0      0      0
uvm_pmm_sysmem_page_reverse_map_t      0      0     16  256    1 : tunables    0    0    0 : slabdata      0      0      0
nvidia_stack_cache     82     82  12288    2    8 : tunables    0    0    0 : slabdata     41     41      0
fat_inode_cache      140    140    800   20    4 : tunables    0    0    0 : slabdata      7      7      0
fat_cache            408    408     40  102    1 : tunables    0    0    0 : slabdata      4      4      0
fsverity_info          0      0    272   30    2 : tunables    0    0    0 : slabdata      0      0      0
fscrypt_info         360    360    136   30    1 : tunables    0    0    0 : slabdata     12     12      0
MPTCPv6                0      0   2112   15    8 : tunables    0    0    0 : slabdata      0      0      0
ip6-frags              0      0    184   22    1 : tunables    0    0    0 : slabdata      0      0      0
PINGv6                 0      0   1216   26    8 : tunables    0    0    0 : slabdata      0      0      0
RAWv6                312    312   1216   26    8 : tunables    0    0    0 : slabdata     12     12      0
UDPv6                288    288   1344   24    8 : tunables    0    0    0 : slabdata     12     12      0
tw_sock_TCPv6         30     30    272   30    2 : tunables    0    0    0 : slabdata      1      1      0
request_sock_TCPv6      0      0    312   26    2 : tunables    0    0    0 : slabdata      0      0      0
TCPv6                156    156   2432   13    8 : tunables    0    0    0 : slabdata     12     12      0
scsi_sense_cache      64     64    128   32    1 : tunables    0    0    0 : slabdata      2      2      0
bfq_io_cq              0      0   1360   24    8 : tunables    0    0    0 : slabdata      0      0      0
mqueue_inode_cache    320    320   1024   32    8 : tunables    0    0    0 : slabdata     10     10      0
kioctx                84     84    576   28    4 : tunables    0    0    0 : slabdata      3      3      0
userfaultfd_ctx_cache      0      0    192   21    1 : tunables    0    0    0 : slabdata      0      0      0
fanotify_perm_event      0      0     96   42    1 : tunables    0    0    0 : slabdata      0      0      0
dnotify_struct         0      0     32  128    1 : tunables    0    0    0 : slabdata      0      0      0
pid_namespace         28     28    144   28    1 : tunables    0    0    0 : slabdata      1      1      0
UNIX                 750    750   1088   30    8 : tunables    0    0    0 : slabdata     25     25      0
ip4-frags              0      0    200   20    1 : tunables    0    0    0 : slabdata      0      0      0
MPTCP                  0      0   1920   17    8 : tunables    0    0    0 : slabdata      0      0      0
request_sock_subflow_v6      0      0    384   21    2 : tunables    0    0    0 : slabdata      0      0      0
request_sock_subflow_v4      0      0    384   21    2 : tunables    0    0    0 : slabdata      0      0      0
xfrm_dst_cache         0      0    320   25    2 : tunables    0    0    0 : slabdata      0      0      0
xfrm_state             0      0    768   21    4 : tunables    0    0    0 : slabdata      0      0      0
ip_fib_trie          340    340     48   85    1 : tunables    0    0    0 : slabdata      4      4      0
ip_fib_alias         292    292     56   73    1 : tunables    0    0    0 : slabdata      4      4      0
PING                   0      0   1024   32    8 : tunables    0    0    0 : slabdata      0      0      0
RAW                   32     32   1024   32    8 : tunables    0    0    0 : slabdata      1      1      0
tw_sock_TCP           30     30    272   30    2 : tunables    0    0    0 : slabdata      1      1      0
request_sock_TCP      26     26    312   26    2 : tunables    0    0    0 : slabdata      1      1      0
TCP                  168    168   2304   14    8 : tunables    0    0    0 : slabdata     12     12      0
hugetlbfs_inode_cache     48     48    672   24    4 : tunables    0    0    0 : slabdata      2      2      0
dquot                384    384    256   32    2 : tunables    0    0    0 : slabdata     12     12      0
bio-264              100    100    320   25    2 : tunables    0    0    0 : slabdata      4      4      0
ep_head             3072   3072     16  256    1 : tunables    0    0    0 : slabdata     12     12      0
dax_cache            117    117    832   39    8 : tunables    0    0    0 : slabdata      3      3      0
bio_crypt_ctx        816    816     40  102    1 : tunables    0    0    0 : slabdata      8      8      0
request_queue        105    105    928   35    8 : tunables    0    0    0 : slabdata      3      3      0
bio-200             1056   1184    256   32    2 : tunables    0    0    0 : slabdata     37     37      0
biovec-max           328    368   4096    8    8 : tunables    0    0    0 : slabdata     46     46      0
biovec-128           192    192   2048   16    8 : tunables    0    0    0 : slabdata     12     12      0
biovec-64            384    384   1024   32    8 : tunables    0    0    0 : slabdata     12     12      0
khugepaged_mm_slot    432    432    112   36    1 : tunables    0    0    0 : slabdata     12     12      0
user_namespace       260    260    624   26    4 : tunables    0    0    0 : slabdata     10     10      0
dmaengine-unmap-256     15     15   2112   15    8 : tunables    0    0    0 : slabdata      1      1      0
dmaengine-unmap-128     30     30   1088   30    8 : tunables    0    0    0 : slabdata      1      1      0
dmaengine-unmap-2 1745613 1753344     64   64    1 : tunables    0    0    0 : slabdata  27396  27396      0
audit_buffer         510    510     24  170    1 : tunables    0    0    0 : slabdata      3      3      0
sock_inode_cache    1307   1482    832   39    8 : tunables    0    0    0 : slabdata     38     38      0
skbuff_ext_cache    8375   8379    192   21    1 : tunables    0    0    0 : slabdata    399    399      0
skbuff_small_head   1100   1100    640   25    4 : tunables    0    0    0 : slabdata     44     44      0
skbuff_fclone_cache    384    384    512   32    4 : tunables    0    0    0 : slabdata     12     12      0
skbuff_head_cache   1679   1792    256   32    2 : tunables    0    0    0 : slabdata     56     56      0
file_lock_cache      444    444    216   37    2 : tunables    0    0    0 : slabdata     12     12      0
buffer_head         4857  10257    104   39    1 : tunables    0    0    0 : slabdata    263    263      0
taskstats            468    468    416   39    4 : tunables    0    0    0 : slabdata     12     12      0
proc_dir_entry      2641   2709    192   21    1 : tunables    0    0    0 : slabdata    129    129      0
pde_opener           918    918     40  102    1 : tunables    0    0    0 : slabdata      9      9      0
proc_inode_cache    1590   2178    720   22    4 : tunables    0    0    0 : slabdata     99     99      0
seq_file             408    408    120   34    1 : tunables    0    0    0 : slabdata     12     12      0
sigqueue             765    765     80   51    1 : tunables    0    0    0 : slabdata     15     15      0
bdev_cache            60     60   1600   20    8 : tunables    0    0    0 : slabdata      3      3      0
shmem_inode_cache   3948   3960    784   20    4 : tunables    0    0    0 : slabdata    198    198      0
kernfs_node_cache  41821  41952    128   32    1 : tunables    0    0    0 : slabdata   1311   1311      0
mnt_cache            775    775    320   25    2 : tunables    0    0    0 : slabdata     31     31      0
filp                6770   7968    256   32    2 : tunables    0    0    0 : slabdata    249    249      0
inode_cache        19276  22025    648   25    4 : tunables    0    0    0 : slabdata    881    881      0
dentry             28957  43113    192   21    1 : tunables    0    0    0 : slabdata   2053   2053      0
names_cache           96     96   4096    8    8 : tunables    0    0    0 : slabdata     12     12      0
net_namespace         70     70   4608    7    8 : tunables    0    0    0 : slabdata     10     10      0
iint_cache             0      0    120   34    1 : tunables    0    0    0 : slabdata      0      0      0
lsm_file_cache    1653043 1666560      8  512    1 : tunables    0    0    0 : slabdata   3255   3255      0
uts_namespace        111    111    432   37    4 : tunables    0    0    0 : slabdata      3      3      0
nsproxy              672    672     72   56    1 : tunables    0    0    0 : slabdata     12     12      0
vm_area_struct     22204  27600    160   25    1 : tunables    0    0    0 : slabdata   1104   1104      0
files_cache          368    368    704   23    4 : tunables    0    0    0 : slabdata     16     16      0
signal_cache         860    952   1152   28    8 : tunables    0    0    0 : slabdata     34     34      0
sighand_cache        585    615   2112   15    8 : tunables    0    0    0 : slabdata     41     41      0
task_struct          804    912   8384    3    8 : tunables    0    0    0 : slabdata    304    304      0
cred_jar            1533   1533    192   21    1 : tunables    0    0    0 : slabdata     73     73      0
anon_vma_chain     11017  17664     64   64    1 : tunables    0    0    0 : slabdata    276    276      0
anon_vma            6792   9945    104   39    1 : tunables    0    0    0 : slabdata    255    255      0
pid                 2278   2528    128   32    1 : tunables    0    0    0 : slabdata     79     79      0
irq_remap_cache       36     36   8192    4    8 : tunables    0    0    0 : slabdata      9      9      0
Acpi-ParseExt        468    468    104   39    1 : tunables    0    0    0 : slabdata     12     12      0
Acpi-State        233999 234294     80   51    1 : tunables    0    0    0 : slabdata   4594   4594      0
shared_policy_node   3995   3995     48   85    1 : tunables    0    0    0 : slabdata     47     47      0
numa_policy        42604  67584     32  128    1 : tunables    0    0    0 : slabdata    528    528      0
perf_event           312    312   1248   26    8 : tunables    0    0    0 : slabdata     12     12      0
trace_event_file    2530   2530     88   46    1 : tunables    0    0    0 : slabdata     55     55      0
ftrace_event_field   7300   7300     56   73    1 : tunables    0    0    0 : slabdata    100    100      0
maple_node          3718   5728    256   32    2 : tunables    0    0    0 : slabdata    179    179      0
radix_tree_node    80836  80836    584   28    4 : tunables    0    0    0 : slabdata   2887   2887      0
task_group           300    300    640   25    4 : tunables    0    0    0 : slabdata     12     12      0
mm_struct            375    375   1280   25    8 : tunables    0    0    0 : slabdata     15     15      0
vmap_area          17608  19488     72   56    1 : tunables    0    0    0 : slabdata    348    348      0
kmalloc-cg-8k         48     48   8192    4    8 : tunables    0    0    0 : slabdata     12     12      0
kmalloc-cg-4k        304    336   4096    8    8 : tunables    0    0    0 : slabdata     42     42      0
kmalloc-cg-2k        678    720   2048   16    8 : tunables    0    0    0 : slabdata     45     45      0
kmalloc-cg-1k        768    768   1024   32    8 : tunables    0    0    0 : slabdata     24     24      0
kmalloc-cg-512       768    768    512   32    4 : tunables    0    0    0 : slabdata     24     24      0
kmalloc-cg-256       512    512    256   32    2 : tunables    0    0    0 : slabdata     16     16      0
kmalloc-cg-192       777    777    192   21    1 : tunables    0    0    0 : slabdata     37     37      0
kmalloc-cg-128       576    576    128   32    1 : tunables    0    0    0 : slabdata     18     18      0
kmalloc-cg-96       1134   1134     96   42    1 : tunables    0    0    0 : slabdata     27     27      0
kmalloc-cg-64       1024   1280     64   64    1 : tunables    0    0    0 : slabdata     20     20      0
kmalloc-cg-32       1536   1536     32  128    1 : tunables    0    0    0 : slabdata     12     12      0
kmalloc-cg-16       3072   3072     16  256    1 : tunables    0    0    0 : slabdata     12     12      0
kmalloc-cg-8        6144   6144      8  512    1 : tunables    0    0    0 : slabdata     12     12      0
dma-kmalloc-8k         0      0   8192    4    8 : tunables    0    0    0 : slabdata      0      0      0
dma-kmalloc-4k         0      0   4096    8    8 : tunables    0    0    0 : slabdata      0      0      0
dma-kmalloc-2k         0      0   2048   16    8 : tunables    0    0    0 : slabdata      0      0      0
dma-kmalloc-1k         0      0   1024   32    8 : tunables    0    0    0 : slabdata      0      0      0
dma-kmalloc-512        0      0    512   32    4 : tunables    0    0    0 : slabdata      0      0      0
dma-kmalloc-256        0      0    256   32    2 : tunables    0    0    0 : slabdata      0      0      0
dma-kmalloc-192        0      0    192   21    1 : tunables    0    0    0 : slabdata      0      0      0
dma-kmalloc-128        0      0    128   32    1 : tunables    0    0    0 : slabdata      0      0      0
dma-kmalloc-96         0      0     96   42    1 : tunables    0    0    0 : slabdata      0      0      0
dma-kmalloc-64         0      0     64   64    1 : tunables    0    0    0 : slabdata      0      0      0
dma-kmalloc-32         0      0     32  128    1 : tunables    0    0    0 : slabdata      0      0      0
dma-kmalloc-16         0      0     16  256    1 : tunables    0    0    0 : slabdata      0      0      0
dma-kmalloc-8          0      0      8  512    1 : tunables    0    0    0 : slabdata      0      0      0
kmalloc-rcl-8k         0      0   8192    4    8 : tunables    0    0    0 : slabdata      0      0      0
kmalloc-rcl-4k         0      0   4096    8    8 : tunables    0    0    0 : slabdata      0      0      0
kmalloc-rcl-2k         0      0   2048   16    8 : tunables    0    0    0 : slabdata      0      0      0
kmalloc-rcl-1k         0      0   1024   32    8 : tunables    0    0    0 : slabdata      0      0      0
kmalloc-rcl-512        0      0    512   32    4 : tunables    0    0    0 : slabdata      0      0      0
kmalloc-rcl-256        0      0    256   32    2 : tunables    0    0    0 : slabdata      0      0      0
kmalloc-rcl-192        0      0    192   21    1 : tunables    0    0    0 : slabdata      0      0      0
kmalloc-rcl-128      448    448    128   32    1 : tunables    0    0    0 : slabdata     14     14      0
kmalloc-rcl-96      1134   1134     96   42    1 : tunables    0    0    0 : slabdata     27     27      0
kmalloc-rcl-64      2450   3200     64   64    1 : tunables    0    0    0 : slabdata     50     50      0
kmalloc-rcl-32         0      0     32  128    1 : tunables    0    0    0 : slabdata      0      0      0
kmalloc-rcl-16         0      0     16  256    1 : tunables    0    0    0 : slabdata      0      0      0
kmalloc-rcl-8          0      0      8  512    1 : tunables    0    0    0 : slabdata      0      0      0
kmalloc-8k           324    336   8192    4    8 : tunables    0    0    0 : slabdata     84     84      0
kmalloc-4k           830    880   4096    8    8 : tunables    0    0    0 : slabdata    110    110      0
kmalloc-2k          1481   1584   2048   16    8 : tunables    0    0    0 : slabdata     99     99      0
kmalloc-1k         11249  11296   1024   32    8 : tunables    0    0    0 : slabdata    353    353      0
kmalloc-512        12902  16896    512   32    4 : tunables    0    0    0 : slabdata    528    528      0
kmalloc-256         8615   9184    256   32    2 : tunables    0    0    0 : slabdata    287    287      0
kmalloc-192         4441   5943    192   21    1 : tunables    0    0    0 : slabdata    283    283      0
kmalloc-128         5124   5152    128   32    1 : tunables    0    0    0 : slabdata    161    161      0
kmalloc-96         14111  14322     96   42    1 : tunables    0    0    0 : slabdata    341    341      0
kmalloc-64         17936  18368     64   64    1 : tunables    0    0    0 : slabdata    287    287      0
kmalloc-32         16206  16384     32  128    1 : tunables    0    0    0 : slabdata    128    128      0
kmalloc-16         14215  14336     16  256    1 : tunables    0    0    0 : slabdata     56     56      0
kmalloc-8          11264  11264      8  512    1 : tunables    0    0    0 : slabdata     22     22      0
kmem_cache_node      512    512     64   64    1 : tunables    0    0    0 : slabdata      8      8      0
kmem_cache           352    352    256   32    2 : tunables    0    0    0 : slabdata     11     11      0

At first I tought it was amdgpu just reserving too much VRAM for my IGPU: (sudo dmesg | grep -i "amdgpu")

[    2.125333] [drm] amdgpu kernel modesetting enabled.
[    2.125347] amdgpu: vga_switcheroo: detected switching method \_SB_.PCI0.GP17.VGA_.ATPX handle
[    2.127020] amdgpu: Virtual CRAT table created for CPU
[    2.127027] amdgpu: Topology: Add CPU node
[    2.127097] amdgpu 0000:05:00.0: enabling device (0006 -> 0007)
[    2.242853] amdgpu 0000:05:00.0: amdgpu: Fetched VBIOS from VFCT
[    2.242855] amdgpu: ATOM BIOS: 113-CEZANNE-021
[    2.272491] amdgpu 0000:05:00.0: vgaarb: deactivate vga console
[    2.272493] amdgpu 0000:05:00.0: amdgpu: Trusted Memory Zone (TMZ) feature enabled
[    2.272503] amdgpu 0000:05:00.0: amdgpu: MODE2 reset
[    2.272567] amdgpu 0000:05:00.0: amdgpu: VRAM: 512M 0x000000F400000000 - 0x000000F41FFFFFFF (512M used)
[    2.272569] amdgpu 0000:05:00.0: amdgpu: GART: 128M 0x0000000000000000 - 0x0000000007FFFFFF
[    2.272570] amdgpu 0000:05:00.0: amdgpu: AGP: 267419648M 0x000000F800000000 - 0x0000FFFFFFFFFFFF
[    2.272821] [drm] amdgpu: 512M of VRAM memory ready
[    2.272824] [drm] amdgpu: 512M of GTT memory ready.
[    2.273816] amdgpu 0000:05:00.0: amdgpu: Will use PSP to load VCN firmware
[    3.075923] amdgpu 0000:05:00.0: amdgpu: RAS: optional ras ta ucode is not available
[    3.086744] amdgpu 0000:05:00.0: amdgpu: RAP: optional rap ta ucode is not available
[    3.086745] amdgpu 0000:05:00.0: amdgpu: SECUREDISPLAY: securedisplay ta ucode is not available
[    3.086922] amdgpu 0000:05:00.0: amdgpu: SMU is initialized successfully!
[    3.300707] kfd kfd: amdgpu: Allocated 3969056 bytes on gart
[    3.300752] amdgpu: sdma_bitmap: 3
[    3.331760] amdgpu: HMM registered 512MB device memory
[    3.331799] amdgpu: SRAT table not found
[    3.331800] amdgpu: Virtual CRAT table created for GPU
[    3.332216] amdgpu: Topology: Add dGPU node [0x1638:0x1002]
[    3.332218] kfd kfd: amdgpu: added device 1002:1638
[    3.332232] amdgpu 0000:05:00.0: amdgpu: SE 1, SH per SE 1, CU per SH 8, active_cu_number 7
[    3.332310] amdgpu 0000:05:00.0: amdgpu: ring gfx uses VM inv eng 0 on hub 0
[    3.332312] amdgpu 0000:05:00.0: amdgpu: ring gfx_low uses VM inv eng 1 on hub 0
[    3.332313] amdgpu 0000:05:00.0: amdgpu: ring gfx_high uses VM inv eng 4 on hub 0
[    3.332314] amdgpu 0000:05:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 5 on hub 0
[    3.332314] amdgpu 0000:05:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 6 on hub 0
[    3.332315] amdgpu 0000:05:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 7 on hub 0
[    3.332316] amdgpu 0000:05:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 8 on hub 0
[    3.332317] amdgpu 0000:05:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 9 on hub 0
[    3.332317] amdgpu 0000:05:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 10 on hub 0
[    3.332318] amdgpu 0000:05:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 11 on hub 0
[    3.332319] amdgpu 0000:05:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 12 on hub 0
[    3.332319] amdgpu 0000:05:00.0: amdgpu: ring kiq_2.1.0 uses VM inv eng 13 on hub 0
[    3.332320] amdgpu 0000:05:00.0: amdgpu: ring sdma0 uses VM inv eng 0 on hub 1
[    3.332321] amdgpu 0000:05:00.0: amdgpu: ring vcn_dec uses VM inv eng 1 on hub 1
[    3.332321] amdgpu 0000:05:00.0: amdgpu: ring vcn_enc0 uses VM inv eng 4 on hub 1
[    3.332322] amdgpu 0000:05:00.0: amdgpu: ring vcn_enc1 uses VM inv eng 5 on hub 1
[    3.332323] amdgpu 0000:05:00.0: amdgpu: ring jpeg_dec uses VM inv eng 6 on hub 1
[    3.333602] [drm] Initialized amdgpu 3.52.0 20150101 for 0000:05:00.0 on minor 0
[    3.338138] fbcon: amdgpudrmfb (fb0) is primary device
[    3.338141] amdgpu 0000:05:00.0: [drm] fb0: amdgpudrmfb frame buffer device

But after adding

vis_vramlimit=1024 vramlimit=1024 gartsize=512 gttsize=512

to the parameters for amdgpu the issue was not fixed.

Thank you for your assistance.

Offline

#2 2023-07-02 17:21:07

seth
Member
Registered: 2012-09-03
Posts: 66,258

Re: Memory usage skyrockets up to 90-95% after mininal GPU use.

https://bbs.archlinux.org/viewtopic.php?id=285160 (no resolution, but seems the same problem)
https://bbs.archlinux.org/viewtopic.php … 3#p2096273
Stopping the graphical.target and dropping all caches seems to free the RAM for that user, same?

Offline

#3 2023-07-03 08:06:26

knnk
Member
Registered: 2023-07-02
Posts: 3

Re: Memory usage skyrockets up to 90-95% after mininal GPU use.

seth wrote:

https://bbs.archlinux.org/viewtopic.php?id=285160 (no resolution, but seems the same problem)
https://bbs.archlinux.org/viewtopic.php … 3#p2096273
Stopping the graphical.target and dropping all caches seems to free the RAM for that user, same?

Stopping graphical.target didn't do anything (ly + shell initialization), so I simply switched to rescure.target.

Dropping the caches did free the memory for me.

https://0x0.st/H1qd.txt

Still, some memory (arround ~500 MiB) are still in use by the kernel, which I'm OK with.

Last edited by knnk (2023-07-03 08:07:08)

Offline

#4 2023-07-03 10:35:34

yella
Member
Registered: 2023-06-29
Posts: 2

Re: Memory usage skyrockets up to 90-95% after mininal GPU use.

Last week I started having similar issues on my work machine (running Intel Tiger Lake integrated graphics and X11) making it practically unusable. For example HW accelerated video playback in Firefox leads to rapidly increasing shared memory usage (increasing by almost 1GB/second) until OOM. Closing FF doesn't release the memory but going to systemctl rescue does.

Initially I thought downgrading mesa to 23.1.1 helped, but the problem reappeared on the next boot. I found this mesa ticket which may be related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9220

Edit: in my case this was caused by picom, killing the process frees up the memory again. picom-git seems to have fixed this issue. What fooled me is that this started happening all of the sudden without any updates or config changes to picom.

Last edited by yella (2023-07-03 13:25:26)

Offline

#5 2023-07-05 16:33:04

knnk
Member
Registered: 2023-07-02
Posts: 3

Re: Memory usage skyrockets up to 90-95% after mininal GPU use.

I've moved to wayland, and this is not longer an issue, so it is Xorg-specific.

I advise everyone who suffers from this problem to switch to wayland until it is solved (hopefully?).

Offline

#6 2023-07-05 19:03:50

seth
Member
Registered: 2012-09-03
Posts: 66,258

Re: Memory usage skyrockets up to 90-95% after mininal GPU use.

"wayland" isn't a thing, what compositor.
Also please post your Xorg log, https://wiki.archlinux.org/title/Xorg#General - the most interesting question is whether you're using xf86-video-amdgpu

Offline

Board footer

Powered by FluxBB