XFCE - Are there any known memory leaks? I seem to have one...

Hi there,

My system seems to have a memory leak, and I can't see any specific process causing it. I'm running a pretty fresh install of Manjaro xfce. Is this a known issue?

After 17h uptime my system is using over 3.2 GiB of RAM. After a fresh boot it uses about 1.2 GiB. If I add up the memory usage from glances, htop, Task Manager, or whatever, I only see about 1.1 GiB of usage. It looks pretty much the same between a fresh boot and a longer uptime (aside from a few extra 10's of MiB for Xorg and xfdesktop). Aside from that there is about 400MiB being used by pamac in /tmp for community.files, extra.files, etc.

What could be using the extra 2 GiB?

Running sudo sync and sudo sysctl vm.drop_caches=3 only gets me a few MiB back if that.

Screenshot of glances after fresh boot:

Summary

mem-usage-fresh-boot

...and after 17h uptime:

Summary

mem-usage-17h-uptime

$ inxi -Fxzc0:

Summary
System:    Host: COMPUTER0 Kernel: 5.5.2-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.2.0 Desktop: Xfce 4.14.2 
           Distro: Manjaro Linux 
Machine:   Type: Desktop Mobo: ASUSTeK model: PRIME X370-PRO v: Rev X.0x serial: <filter> UEFI: American Megatrends v: 5220 
           date: 09/12/2019 
CPU:       Topology: 8-Core model: AMD Ryzen 7 1700 bits: 64 type: MT MCP arch: Zen rev: 1 L2 cache: 4096 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 124619 
           Speed: 2451 MHz min/max: 1550/3900 MHz Core speeds (MHz): 1: 2451 2: 1441 3: 1497 4: 1436 5: 1728 6: 1951 7: 1471 
           8: 1525 9: 1429 10: 1462 11: 1464 12: 2701 13: 1510 14: 1547 15: 2442 16: 1365 
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Hawaii PRO [Radeon R9 290/390] vendor: Gigabyte driver: amdgpu v: kernel 
           bus ID: 0a:00.0 
           Device-2: NVIDIA GP104 [GeForce GTX 1070] vendor: ZOTAC driver: nouveau v: kernel bus ID: 0b:00.0 
           Display: x11 server: X.Org 1.20.7 driver: amdgpu,ati,nouveau unloaded: modesetting tty: N/A 
           OpenGL: renderer: AMD Radeon R9 200 Series (HAWAII DRM 3.36.0 5.5.2-1-MANJARO LLVM 9.0.1) v: 4.5 Mesa 19.3.4 
           direct render: Yes 
Audio:     Device-1: Advanced Micro Devices [AMD/ATI] Hawaii HDMI Audio [Radeon R9 290/290X / 390/390X] vendor: Gigabyte 
           driver: snd_hda_intel v: kernel bus ID: 0a:00.1 
           Device-2: NVIDIA GP104 High Definition Audio vendor: ZOTAC driver: snd_hda_intel v: kernel bus ID: 0b:00.1 
           Device-3: Advanced Micro Devices [AMD] Family 17h HD Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel 
           bus ID: 0d:00.3 
           Device-4: Kingston HyperX Virtual Surround Sound type: USB driver: hid-generic,snd-usb-audio,usbhid bus ID: 1-4:2 
           Sound Server: ALSA v: k5.5.2-1-MANJARO 
Network:   Device-1: Intel I211 Gigabit Network vendor: ASUSTeK driver: igb v: 5.6.0-k port: e000 bus ID: 08:00.0 
           IF: enp8s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
           IF-ID-1: tun0 state: unknown speed: 10 Mbps duplex: full mac: N/A 
Drives:    Local Storage: total: 3.54 TiB used: 14.41 GiB (0.4%) 
           ID-1: /dev/nvme0n1 vendor: Intel model: SSDPEKNW010T8 size: 953.87 GiB 
           ID-2: /dev/sda vendor: Samsung model: SSD 840 EVO 500GB size: 465.76 GiB 
           ID-3: /dev/sdb vendor: Seagate model: ST2000DM001-1ER164 size: 1.82 TiB 
           ID-4: /dev/sdc type: USB model: USB DISK size: 126.5 MiB 
           ID-5: /dev/sdd vendor: SanDisk model: SDSSDA240G size: 223.57 GiB 
           ID-6: /dev/sde vendor: A-Data model: SU800 size: 119.24 GiB 
Partition: ID-1: / size: 218.57 GiB used: 14.36 GiB (6.6%) fs: ext4 dev: /dev/dm-0 
Sensors:   System Temperatures: cpu: 34.5 C mobo: 30.0 C 
           Fan Speeds (RPM): cpu: 580 fan-2: 608 fan-3: 706 fan-5: 0 fan-6: 427 
           GPU: device: nouveau temp: 43 C fan: 0 device: amdgpu temp: 45 C 
           Voltages: 12v: N/A 5v: N/A 3.3v: 3.33 vbat: 3.27 
Info:      Processes: 388 Uptime: 1h 14m Memory: 15.63 GiB used: 2.06 GiB (13.2%) Init: systemd Compilers: gcc: 9.2.0 
           Shell: bash v: 5.0.11 inxi: 3.0.37

Can I recommend ps_mem - install and run with sudo priveleges.

2 Likes

It is perfectly normal for the amount of used memory to increase over time, and especially after you've fired up a few applications and closed them again.

This in itself is not a memory leak, but a result of the fact that the Linux kernel keeps data in cache for faster access, and may still keep some data in buffers for writing back to the drive at a later point ─ this is called asynchronous I/O.

The sudo sysctl vm.drop_caches=3 command does indeed not free up all available memory. The kernel must still keep certain things in its cache, and there will ─ as I said ─ also be data in buffers that still need to be written back to the drive, but which the kernel will take care of when the system is least busy.

One of the things that generally consume a lot of memory and don't release it all again upon closing them down is web browsers. So if you've opened up a web browser, then a lot of that RAM will remain in use even after the browser has been closed again.

No worries, though. The kernel is pretty good at memory management and will free up more RAM when needed. :wink:

4 Likes

https://www.linuxatemyram.com/

3 Likes

Ok good to know. I remember on a previous install though I would start with about 500 - 600M used, and after a long uptime and having the browser and apps open I would be using 2 - 4G or whatever, but if I closed everything and did the sudo sysctl vm.drop_caches=3 command I would be back down around 700 - 800M. So having another 2GB "used" after 17h seemed very odd.

I will try to do a more thorough check next time it creeps up there. Thanks @xircon that is much better. I'll run that and do a cat /proc/meminfo and compare that way.

1 Like

Ok back again after 30h of uptime. The system says I'm using 4.4 GiB. ps_mem only finds 1.1 GiB in use. If I add the amount in buffers/cache to the amount available I end up with 11.2GiB available, which is exactly what I expect if 4.4GiB is actually unavailable. I'm going to fire up mprime and make it use 13GiB and see what happens. Better post this first...

sudo ps_mem:

Summary
[user1@COMPUTER0 ~]$ sudo ps_mem
 Private  +   Shared  =  RAM used	Program

168.0 KiB + 170.0 KiB = 338.0 KiB	lvmetad
120.0 KiB + 286.0 KiB = 406.0 KiB	sleep
376.0 KiB + 430.0 KiB = 806.0 KiB	crond
444.0 KiB + 446.0 KiB = 890.0 KiB	dbus-launch
456.0 KiB + 458.0 KiB = 914.0 KiB	ssh-agent
432.0 KiB + 486.0 KiB = 918.0 KiB	xcape
372.0 KiB + 548.0 KiB = 920.0 KiB	rtkit-daemon
600.0 KiB + 602.0 KiB =   1.2 MiB	agent
476.0 KiB + 744.0 KiB =   1.2 MiB	sensors
628.0 KiB + 768.0 KiB =   1.4 MiB	gpg-agent
512.0 KiB +   1.0 MiB =   1.5 MiB	amdgpu-fancontr
688.0 KiB + 914.0 KiB =   1.6 MiB	gvfsd-metadata
832.0 KiB + 834.0 KiB =   1.6 MiB	obexd
644.0 KiB +   1.1 MiB =   1.7 MiB	avahi-daemon (2)
924.0 KiB + 968.0 KiB =   1.8 MiB	nm-openvpn-service
940.0 KiB +   1.0 MiB =   2.0 MiB	at-spi-bus-launcher
940.0 KiB +   1.0 MiB =   2.0 MiB	gvfs-mtp-volume-monitor
  1.0 MiB +   1.0 MiB =   2.0 MiB	gvfsd-fuse
  1.0 MiB +   1.1 MiB =   2.1 MiB	at-spi2-registryd
  1.1 MiB +   1.1 MiB =   2.1 MiB	gsettings-helper
  1.0 MiB +   1.3 MiB =   2.3 MiB	gvfsd
  1.1 MiB +   1.3 MiB =   2.3 MiB	accounts-daemon
  1.1 MiB +   1.2 MiB =   2.4 MiB	gvfs-gphoto2-volume-monitor
  1.1 MiB +   1.2 MiB =   2.4 MiB	gvfsd-dnssd
  1.2 MiB +   1.3 MiB =   2.5 MiB	gvfs-afc-volume-monitor
  1.2 MiB +   1.3 MiB =   2.5 MiB	mount.ntfs
  1.4 MiB +   1.5 MiB =   2.9 MiB	dconf-service (2)
  1.3 MiB +   1.7 MiB =   3.0 MiB	gvfsd-network
  1.2 MiB +   1.8 MiB =   3.0 MiB	systemd-logind
  1.5 MiB +   1.6 MiB =   3.1 MiB	gnome-keyring-daemon
  1.5 MiB +   2.0 MiB =   3.5 MiB	gvfsd-trash
  1.7 MiB +   1.8 MiB =   3.5 MiB	upowerd
  1.7 MiB +   1.9 MiB =   3.6 MiB	xfconfd (2)
  1.8 MiB +   1.9 MiB =   3.7 MiB	ModemManager
  1.6 MiB +   2.5 MiB =   4.1 MiB	(sd-pam)
  2.2 MiB +   2.6 MiB =   4.9 MiB	systemd-udevd
  1.4 MiB +   3.6 MiB =   5.0 MiB	bash (2)
  2.4 MiB +   2.7 MiB =   5.1 MiB	zeitgeist-daemon
  2.6 MiB +   3.0 MiB =   5.6 MiB	lightdm (2)
  2.5 MiB +   3.2 MiB =   5.7 MiB	gvfs-udisks2-volume-monitor
  2.9 MiB +   3.4 MiB =   6.3 MiB	zeitgeist-fts
  3.1 MiB +   3.7 MiB =   6.8 MiB	zeitgeist-datahub
  3.0 MiB +   4.2 MiB =   7.2 MiB	sudo
  4.0 MiB +   4.3 MiB =   8.3 MiB	openvpn
  3.8 MiB +   4.6 MiB =   8.4 MiB	dbus-daemon (4)
  4.5 MiB +   5.4 MiB =   9.9 MiB	udisksd
  5.3 MiB +   5.7 MiB =  11.0 MiB	xfce4-power-manager
  5.4 MiB +   5.9 MiB =  11.3 MiB	xfsettingsd
  5.4 MiB +   6.2 MiB =  11.6 MiB	panel-6-systray
  3.6 MiB +   8.1 MiB =  11.7 MiB	systemd (2)
  6.3 MiB +   6.6 MiB =  12.9 MiB	NetworkManager
  5.5 MiB +   8.2 MiB =  13.7 MiB	light-locker
  6.4 MiB +   7.4 MiB =  13.8 MiB	pulseaudio
  6.6 MiB +   7.3 MiB =  13.9 MiB	panel-2-actions
  6.8 MiB +   9.2 MiB =  16.0 MiB	xfce4-notifyd
  7.0 MiB +   9.7 MiB =  16.7 MiB	xfce4-clipman
  7.5 MiB +   9.6 MiB =  17.1 MiB	panel-9-pulseau
  8.4 MiB +   9.1 MiB =  17.5 MiB	nm-applet
  7.9 MiB +  11.5 MiB =  19.3 MiB	polkit-gnome-authentication-agent-1
  8.2 MiB +  11.5 MiB =  19.8 MiB	pamac-tray
 11.6 MiB +  11.8 MiB =  23.4 MiB	msm_notifier
 10.2 MiB +  14.0 MiB =  24.2 MiB	panel-8-whisker
 12.5 MiB +  13.0 MiB =  25.5 MiB	polkitd
 13.9 MiB +  14.4 MiB =  28.3 MiB	xfce4-session
 14.9 MiB +  15.5 MiB =  30.3 MiB	systemd-journald
 16.4 MiB +  16.6 MiB =  33.0 MiB	blueman-tray
 17.0 MiB +  18.2 MiB =  35.2 MiB	conky
 18.2 MiB +  18.5 MiB =  36.7 MiB	blueman-applet
 18.5 MiB +  21.4 MiB =  39.9 MiB	xfce4-panel
 16.7 MiB +  27.3 MiB =  44.0 MiB	xfce4-terminal
 18.3 MiB +  29.2 MiB =  47.5 MiB	Thunar
 30.5 MiB +  57.3 MiB =  87.7 MiB	xfwm4
 49.7 MiB +  95.7 MiB = 145.4 MiB	Xorg
 92.5 MiB + 114.2 MiB = 206.7 MiB	xfdesktop
---------------------------------
                          1.1 GiB
=================================

cat /proc/meminfo:

Summary
[user1@COMPUTER0 ~]$ cat /proc/meminfo 
MemTotal:       16391620 kB
MemFree:        11446500 kB
MemAvailable:   11425608 kB
Buffers:            5248 kB
Cached:           200764 kB
SwapCached:            0 kB
Active:           550876 kB
Inactive:         104248 kB
Active(anon):     449228 kB
Inactive(anon):    71504 kB
Active(file):     101648 kB
Inactive(file):    32744 kB
Unevictable:         112 kB
Mlocked:             112 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:               692 kB
Writeback:             0 kB
AnonPages:        449296 kB
Mapped:           141476 kB
Shmem:             71620 kB
KReclaimable:     161968 kB
Slab:             770292 kB
SReclaimable:     161968 kB
SUnreclaim:       608324 kB
KernelStack:       10624 kB
PageTables:         9664 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     8195808 kB
Committed_AS:    3143568 kB
VmallocTotal:   34359738367 kB
VmallocUsed:       38708 kB
VmallocChunk:          0 kB
Percpu:          3113344 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
FileHugePages:         0 kB
FilePmdMapped:         0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB
DirectMap4k:     1642564 kB
DirectMap2M:    14018560 kB
DirectMap1G:     1048576 kB

free (-m):

Summary
[user1@COMPUTER0 ~]$ free
              total        used        free      shared  buff/cache   available
Mem:          16007        4474       11185          69         347       11159
Swap:             0           0           0

EDIT: Okay so I fired it up, the system froze for a few seconds, and then mprime crashed with the simple message Killed. Shouldn't the kernel just stop using the ram for disk cache and let mprime use it?

mprime:

Summary
[user1@COMPUTER0 ~]$ mprime
	     Main Menu

	 1.  Test/Primenet
	 2.  Test/Worker threads
	 3.  Test/Status
	 4.  Test/Continue
	 5.  Test/Exit
	 6.  Advanced/Test
	 7.  Advanced/Time
	 8.  Advanced/P-1
	 9.  Advanced/ECM
	10.  Advanced/Manual Communication
	11.  Advanced/Unreserve Exponent
	12.  Advanced/Quit Gimps
	13.  Options/CPU
	14.  Options/Preferences
	15.  Options/Torture Test
	16.  Options/Benchmark
	17.  Help/About
	18.  Help/About PrimeNet Server
Your choice: 15

Number of torture test threads to run (16): 
Choose a type of torture test to run.
  1 = Smallest FFTs (tests L1/L2 caches, high power/heat/CPU stress).
  2 = Small FFTs (tests L1/L2/L3 caches, maximum power/heat/CPU stress).
  3 = Large FFTs (stresses memory controller and RAM).
  4 = Blend (tests all of the above).
Blend is the default.  NOTE: if you fail the blend test but pass the
smaller FFT tests then your problem is likely bad memory or bad memory
controller.
Type of torture test to run (4): 
Customize settings (N): Y
Min FFT size (in K) (4): 
Max FFT size (in K) (8192): 
Memory to use (in MB, 0 = in-place FFTs) (13007): 13312
Time to run each FFT size (in minutes) (6): 4
Run a weaker torture test (not recommended) (N): 

Accept the answers above? (Y): 
[Main thread Feb 29 05:38] Starting workers.
[Worker #2 Feb 29 05:38] Worker starting
[Worker #3 Feb 29 05:38] Worker starting
[Worker #2 Feb 29 05:38] Beginning a continuous self-test on your computer.
[Worker #12 Feb 29 05:38] Worker starting
[Worker #6 Feb 29 05:38] Worker starting
[Worker #15 Feb 29 05:38] Worker starting
[Worker #16 Feb 29 05:38] Worker starting
[Worker #5 Feb 29 05:38] Worker starting
[Worker #9 Feb 29 05:38] Worker starting
[Worker #10 Feb 29 05:38] Worker starting
[Worker #11 Feb 29 05:38] Worker starting
[Worker #2 Feb 29 05:38] Please read stress.txt.  Hit ^C to end this test.
[Worker #3 Feb 29 05:38] Beginning a continuous self-test on your computer.
[Worker #3 Feb 29 05:38] Please read stress.txt.  Hit ^C to end this test.
[Worker #13 Feb 29 05:38] Worker starting
[Worker #7 Feb 29 05:38] Worker starting
[Worker #7 Feb 29 05:38] Beginning a continuous self-test on your computer.
[Worker #7 Feb 29 05:38] Please read stress.txt.  Hit ^C to end this test.
[Worker #8 Feb 29 05:38] Worker starting
[Worker #15 Feb 29 05:38] Beginning a continuous self-test on your computer.
[Worker #15 Feb 29 05:38] Please read stress.txt.  Hit ^C to end this test.
[Worker #6 Feb 29 05:38] Beginning a continuous self-test on your computer.
[Worker #6 Feb 29 05:38] Please read stress.txt.  Hit ^C to end this test.
[Worker #12 Feb 29 05:38] Beginning a continuous self-test on your computer.
[Worker #12 Feb 29 05:38] Please read stress.txt.  Hit ^C to end this test.
[Worker #9 Feb 29 05:38] Beginning a continuous self-test on your computer.
[Worker #9 Feb 29 05:38] Please read stress.txt.  Hit ^C to end this test.
[Worker #4 Feb 29 05:38] Worker starting
[Worker #13 Feb 29 05:38] Beginning a continuous self-test on your computer.
[Worker #13 Feb 29 05:38] Please read stress.txt.  Hit ^C to end this test.
[Worker #1 Feb 29 05:38] Worker starting
[Worker #14 Feb 29 05:38] Worker starting
[Worker #16 Feb 29 05:38] Beginning a continuous self-test on your computer.
[Worker #16 Feb 29 05:38] Please read stress.txt.  Hit ^C to end this test.
[Worker #10 Feb 29 05:38] Beginning a continuous self-test on your computer.
[Worker #10 Feb 29 05:38] Please read stress.txt.  Hit ^C to end this test.
[Worker #8 Feb 29 05:38] Beginning a continuous self-test on your computer.
[Worker #8 Feb 29 05:38] Please read stress.txt.  Hit ^C to end this test.
[Worker #1 Feb 29 05:38] Beginning a continuous self-test on your computer.
[Worker #1 Feb 29 05:38] Please read stress.txt.  Hit ^C to end this test.
[Worker #5 Feb 29 05:38] Beginning a continuous self-test on your computer.
[Worker #5 Feb 29 05:38] Please read stress.txt.  Hit ^C to end this test.
[Worker #11 Feb 29 05:38] Beginning a continuous self-test on your computer.
[Worker #11 Feb 29 05:38] Please read stress.txt.  Hit ^C to end this test.
[Worker #4 Feb 29 05:38] Beginning a continuous self-test on your computer.
[Worker #4 Feb 29 05:38] Please read stress.txt.  Hit ^C to end this test.
[Worker #14 Feb 29 05:38] Beginning a continuous self-test on your computer.
[Worker #14 Feb 29 05:38] Please read stress.txt.  Hit ^C to end this test.
[Worker #1 Feb 29 05:38] Test 1, 88000 Lucas-Lehmer iterations of M3835553 using FMA3 FFT length 192K, Pass1=768, Pass2=256, clm=2.
[Worker #11 Feb 29 05:38] Test 1, 88000 Lucas-Lehmer iterations of M3835553 using FMA3 FFT length 192K, Pass1=768, Pass2=256, clm=2.
[Worker #13 Feb 29 05:38] Test 1, 88000 Lucas-Lehmer iterations of M3835553 using FMA3 FFT length 192K, Pass1=768, Pass2=256, clm=2.
[Worker #12 Feb 29 05:38] Test 1, 88000 Lucas-Lehmer iterations of M3835553 using FMA3 FFT length 192K, Pass1=768, Pass2=256, clm=2.
[Worker #8 Feb 29 05:38] Test 1, 88000 Lucas-Lehmer iterations of M3835553 using FMA3 FFT length 192K, Pass1=768, Pass2=256, clm=2.
[Worker #7 Feb 29 05:38] Test 1, 88000 Lucas-Lehmer iterations of M3835553 using FMA3 FFT length 192K, Pass1=768, Pass2=256, clm=2.
[Worker #14 Feb 29 05:38] Test 1, 88000 Lucas-Lehmer iterations of M3835553 using FMA3 FFT length 192K, Pass1=768, Pass2=256, clm=2.
[Worker #2 Feb 29 05:38] Test 1, 88000 Lucas-Lehmer iterations of M3835553 using FMA3 FFT length 192K, Pass1=768, Pass2=256, clm=2.
[Worker #9 Feb 29 05:38] Test 1, 88000 Lucas-Lehmer iterations of M3835553 using FMA3 FFT length 192K, Pass1=768, Pass2=256, clm=2.
[Worker #16 Feb 29 05:38] Test 1, 88000 Lucas-Lehmer iterations of M3835553 using FMA3 FFT length 192K, Pass1=768, Pass2=256, clm=2.
[Worker #15 Feb 29 05:38] Test 1, 88000 Lucas-Lehmer iterations of M3835553 using FMA3 FFT length 192K, Pass1=768, Pass2=256, clm=2.
[Worker #4 Feb 29 05:38] Test 1, 88000 Lucas-Lehmer iterations of M3835553 using FMA3 FFT length 192K, Pass1=768, Pass2=256, clm=2.
[Worker #10 Feb 29 05:38] Test 1, 88000 Lucas-Lehmer iterations of M3835553 using FMA3 FFT length 192K, Pass1=768, Pass2=256, clm=2.
[Worker #3 Feb 29 05:38] Test 1, 88000 Lucas-Lehmer iterations of M3835553 using FMA3 FFT length 192K, Pass1=768, Pass2=256, clm=2.
[Worker #5 Feb 29 05:38] Test 1, 88000 Lucas-Lehmer iterations of M3835553 using FMA3 FFT length 192K, Pass1=768, Pass2=256, clm=2.
[Worker #6 Feb 29 05:38] Test 1, 88000 Lucas-Lehmer iterations of M3835553 using FMA3 FFT length 192K, Pass1=768, Pass2=256, clm=2.
Killed
[user1@COMPUTER0 ~]$

How did you measure the 3.2gb of ram if every program reports 1.1gb?

I didn't measure it, free did, as does conky, neofetch, etc.

Linux will use all the memory available, there was a post on here about it. It will release it back as required to be used by programs - it is a feature.

If your machine is crashing/slow then you have a problem.

Let me try to find the article. BRB

https://www.linuxatemyram.com/

1 Like

It's not slow but it actually is eating my RAM and not letting my programs use it apparently.

See the article - it is releasing, other wise you would slowdown as it used swap.

1 Like

So take a deeep breath - everything is fine! (except for coronavirus, influenza and global warming)

:rofl:

1 Like

I don't have swap, and it's not slowing down since I have 11.2 GiB free. The problem is I should have over 14 GiB actually free. If it's releasing the other 3.3 GiB, then why did it kill mprime?

sudo dmesg:

[111131.550133] Hardware name: System manufacturer System Product Name/PRIME X370-PRO, BIOS 5220 09/12/2019
[111131.550135] Call Trace:
[111131.550150]  dump_stack+0x66/0x90
[111131.550156]  dump_header+0x4a/0x1df
[111131.550161]  oom_kill_process.cold+0xb/0x10
[111131.550165]  out_of_memory+0x197/0x460
[111131.550171]  __alloc_pages_slowpath+0xb33/0xdd0
[111131.550178]  __alloc_pages_nodemask+0x2c1/0x300
[111131.550183]  alloc_pages_vma+0x79/0x1f0
[111131.550188]  wp_page_copy+0xbf/0x650
[111131.550194]  do_wp_page+0x97/0x470
[111131.550198]  __handle_mm_fault+0xcad/0x1410
[111131.550204]  handle_mm_fault+0xc4/0x1f0
[111131.550208]  do_user_addr_fault+0x1c4/0x440
[111131.550213]  page_fault+0x34/0x40
[111131.550217] RIP: 0033:0x55f50e4e6ef3
[111131.550225] Code: Bad RIP value.
[111131.550228] RSP: 002b:00007ffd52a34110 EFLAGS: 00010206
[111131.550231] RAX: 000055f50f3c9300 RBX: 0000000000000000 RCX: 0000000000000004
[111131.550233] RDX: 000055f50f3d8160 RSI: 0000000000000000 RDI: 000055f50e500890
[111131.550234] RBP: 000055f50e500890 R08: 0000000000000000 R09: 0000000000000000
[111131.550236] R10: 00007ffd52a33570 R11: 0000000000000000 R12: 00000000ffffffff
[111131.550237] R13: 0000000000000000 R14: 0000000000000000 R15: 000055f50f3d9e30
[111131.550242] Mem-Info:
[111131.550252] active_anon:2972627 inactive_anon:17848 isolated_anon:0
                 active_file:320 inactive_file:288 isolated_file:1
                 unevictable:28 dirty:0 writeback:0 unstable:0
                 slab_reclaimable:33966 slab_unreclaimable:153290
                 mapped:6451 shmem:17914 pagetables:8055 bounce:0
                 free:33901 free_pcp:304 free_cma:0
[111131.550258] Node 0 active_anon:11890508kB inactive_anon:71392kB active_file:1280kB inactive_file:1152kB unevictable:112kB isolated(anon):0kB isolated(file):4kB mapped:25804kB dirty:0kB writeback:0kB shmem:71656kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 0kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no
[111131.550260] Node 0 DMA free:15872kB min:64kB low:80kB high:96kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15996kB managed:15892kB mlocked:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
[111131.550267] lowmem_reserve[]: 0 2906 15888 15888 15888
[111131.550272] Node 0 DMA32 free:64052kB min:12348kB low:15432kB high:18516kB reserved_highatomic:0KB active_anon:1868840kB inactive_anon:4400kB active_file:48kB inactive_file:0kB unevictable:0kB writepending:0kB present:3074628kB managed:3074620kB mlocked:0kB kernel_stack:1256kB pagetables:820kB bounce:0kB free_pcp:248kB local_pcp:0kB free_cma:0kB
[111131.550281] lowmem_reserve[]: 0 0 12981 12981 12981
[111131.550285] Node 0 Normal free:55680kB min:57212kB low:71000kB high:84788kB reserved_highatomic:2048KB active_anon:10021668kB inactive_anon:66992kB active_file:1580kB inactive_file:724kB unevictable:112kB writepending:0kB present:13618688kB managed:13301108kB mlocked:112kB kernel_stack:9608kB pagetables:31400kB bounce:0kB free_pcp:968kB local_pcp:0kB free_cma:0kB
[111131.550292] lowmem_reserve[]: 0 0 0 0 0
[111131.550296] Node 0 DMA: 0*4kB 2*8kB (U) 1*16kB (U) 1*32kB (U) 3*64kB (U) 0*128kB 1*256kB (U) 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15872kB
[111131.550311] Node 0 DMA32: 2866*4kB (UE) 1364*8kB (UME) 404*16kB (UME) 346*32kB (UME) 90*64kB (UME) 38*128kB (UME) 11*256kB (UME) 7*512kB (UE) 1*1024kB (E) 3*2048kB (UE) 0*4096kB = 64104kB
[111131.550326] Node 0 Normal: 746*4kB (UMEH) 637*8kB (UMEH) 279*16kB (UMEH) 1000*32kB (UME) 150*64kB (UME) 20*128kB (UME) 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 56704kB
[111131.550342] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB
[111131.550344] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
[111131.550345] 18635 total pagecache pages
[111131.550347] 0 pages in swap cache
[111131.550349] Swap cache stats: add 0, delete 0, find 0/0
[111131.550350] Free swap  = 0kB
[111131.550351] Total swap = 0kB
[111131.550352] 4177328 pages RAM
[111131.550353] 0 pages HighMem/MovableOnly
[111131.550354] 79423 pages reserved
[111131.550355] 0 pages hwpoisoned
[111131.550356] Tasks state (memory values in pages):
[111131.550357] [  pid  ]   uid  tgid total_vm      rss pgtables_bytes swapents oom_score_adj name
[111131.550379] [    512]     0   512    17863     1984   159744        0             0 systemd-journal
[111131.550383] [    523]     0   523    19518       35    57344        0             0 lvmetad
[111131.550387] [    526]     0   526     7433      507    86016        0         -1000 systemd-udevd
[111131.550391] [   1050]     0  1050     1646       92    53248        0             0 crond
[111131.550395] [   1051]   102  1051   483230     1784   233472        0             0 polkitd
[111131.550398] [   1052]    81  1052     1964      404    61440        0          -900 dbus-daemon
[111131.550402] [   1053]     0  1053   168447      907   172032        0             0 NetworkManager
[111131.550406] [   1054]     0  1054     3913      259    77824        0             0 systemd-logind
[111131.550409] [   1055]   976  1055     2172      109    53248        0             0 avahi-daemon
[111131.550412] [   1057]   976  1057     2125       86    53248        0             0 avahi-daemon
[111131.550415] [   1074]     0  1074    57736      329    90112        0             0 lightdm
[111131.550419] [   1080]     0  1080    78102      406   102400        0             0 ModemManager
[111131.550422] [   1088]     0  1088    58587      230    90112        0             0 accounts-daemon
[111131.550425] [   1099]     0  1099   501738    16053   663552        0             0 Xorg
[111131.550429] [   1356]     0  1356    40131      314    81920        0             0 lightdm
[111131.550433] [   1361]  1000  1361     4348      412    73728        0             0 systemd
[111131.550436] [   1362]  1000  1362     7161      652    81920        0             0 (sd-pam)
[111131.550439] [   1376]  1000  1376   510085     3494   581632        0             0 xfce4-session
[111131.550442] [   1384]  1000  1384     1788      307    57344        0             0 dbus-daemon
[111131.550445] [   1418]  1000  1418    58964      249    86016        0             0 gvfsd
[111131.550449] [   1423]  1000  1423    94719      158    94208        0             0 gvfsd-fuse
[111131.550452] [   1431]  1000  1431    76017      198    90112        0             0 at-spi-bus-laun
[111131.550456] [   1438]  1000  1438     1651      155    49152        0             0 dbus-daemon
[111131.550459] [   1440]  1000  1440    57271      245    77824        0             0 xfconfd
[111131.550463] [   1446]  1000  1446    39888      233    73728        0             0 at-spi2-registr
[111131.550466] [   1451]  1000  1451     1455      114    49152        0             0 ssh-agent
[111131.550469] [   1454]  1000  1454    38676       72    65536        0             0 gpg-agent
[111131.550472] [   1456]  1000  1456   599926     6846   655360        0             0 xfwm4
[111131.550476] [   1484]  1000  1484   228273     1119   143360        0             0 pulseaudio
[111131.550479] [   1486]  1000  1486    81315     4869   233472        0             0 xfce4-panel
[111131.550482] [   1492]     0  1492     1838      128    49152        0             0 amdgpu-fancontr
[111131.550486] [   1493]   133  1493    38171       61    65536        0             0 rtkit-daemon
[111131.550489] [   1504]  1000  1504   375788     4960   393216        0             0 Thunar
[111131.550492] [   1512]  1000  1512   135995    27499   425984        0             0 xfdesktop
[111131.550496] [   1514]  1000  1514    78433     2569   208896        0             0 panel-8-whisker
[111131.550499] [   1519]  1000  1519    48342     1357   143360        0             0 panel-6-systray
[111131.550502] [   1520]  1000  1520   126249     1858   208896        0             0 panel-9-pulseau
[111131.550505] [   1521]  1000  1521    58892     1684   180224        0             0 panel-2-actions
[111131.550509] [   1530]  1000  1530    76162     1690   184320        0             0 xfce4-notifyd
[111131.550512] [   1535]  1000  1535    59486     1760   200704        0             0 xfce4-clipman
[111131.550515] [   1543]  1000  1543     3127       99    53248        0             0 xcape
[111131.550518] [   1545]  1000  1545    97619     2016   217088        0             0 nm-applet
[111131.550521] [   1549]  1000  1549    61684     1915   208896        0             0 pamac-tray
[111131.550525] [   1551]  1000  1551   108808     4655   208896        0             0 blueman-applet
[111131.550528] [   1553]  1000  1553    66978     1297   155648        0             0 light-locker
[111131.550531] [   1557]  1000  1557    58264      106    81920        0             0 agent
[111131.550534] [   1566]  1000  1566    38782      189    73728        0             0 dconf-service
[111131.550538] [   1568]  1000  1568   360557      719   278528        0             0 zeitgeist-datah
[111131.550541] [   1571]  1000  1571    60878     1777   196608        0             0 msm_notifier
[111131.550544] [   1577]  1000  1577   348346     1991   335872        0             0 polkit-gnome-au
[111131.550547] [   1581]  1000  1581    95796      365   102400        0             0 zeitgeist-daemo
[111131.550550] [   1582]  1000  1582    48350     1332   143360        0             0 xfce4-power-man
[111131.550553] [   1609]  1000  1609    59502      472    90112        0             0 zeitgeist-fts
[111131.550556] [   1635]     0  1635    62187      391   102400        0             0 upowerd
[111131.550560] [   1642]  1000  1642   123684      549   143360        0             0 gvfs-udisks2-vo
[111131.550563] [   1645]     0  1645    98492      905   126976        0             0 udisksd
[111131.550567] [   1684]  1000  1684    78245      252   102400        0             0 gvfs-afc-volume
[111131.550570] [   1695]  1000  1695    59099      235    94208        0             0 gvfs-gphoto2-vo
[111131.550574] [   1703]  1000  1703    57996      205    81920        0             0 gvfs-mtp-volume
[111131.550577] [   1711]  1000  1711    77595      328   102400        0             0 gvfsd-trash
[111131.550581] [   1718]  1000  1718    39611      175    69632        0             0 gvfsd-metadata
[111131.550584] [   1726]  1000  1726    80784     4155   217088        0             0 blueman-tray
[111131.550587] [   1728]  1000  1728    59805      212   102400        0             0 gsettings-helpe
[111131.550591] [   1738]  1000  1738    10922      158    77824        0             0 obexd
[111131.550593] [   4270]  1000  4270    95944      313   106496        0             0 gvfsd-network
[111131.550596] [   4453]  1000  4453    57308     1369   159744        0             0 xfsettingsd
[111131.550598] [   4464]  1000  4464    77754      263   106496        0             0 gvfsd-dnssd
[111131.550601] [  19744]     0 19744    40349      199    81920        0             0 nm-openvpn-serv
[111131.550604] [  19754]  1000 19754    95937      315   106496        0             0 gnome-keyring-d
[111131.550606] [  20642]   968 20642     4749      403    69632        0             0 openvpn
[111131.550609] [   8732]  1000  8732   408572     4020   352256        0             0 conky
[111131.550612] [  19717]     0 19717     1704      111    53248        0             0 dbus-launch
[111131.550615] [  19718]     0 19718     1585      100    49152        0             0 dbus-daemon
[111131.550618] [  19721]     0 19721    57177      132    73728        0             0 xfconfd
[111131.550620] [  19748]     0 19748    38752      144    69632        0             0 dconf-service
[111131.550622] [  28856]     0 28856     2523      195    57344        0             0 mount.ntfs
[111131.550633] [   8945]  1000  8945   373313     3460   364544        0             0 xfce4-terminal
[111131.550636] [   8968]  1000  8968     1871      164    53248        0             0 bash
[111131.550638] [   9161]  1000  9161  3724680  2859943 23265280        0             0 mprime
[111131.550641] [  11577]     0 11577     1838      128    45056        0             0 amdgpu-fancontr
[111131.550643] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/session-1.scope,task=mprime,pid=9161,uid=1000
[111131.550677] Out of memory: Killed process 9161 (mprime) total-vm:14898720kB, anon-rss:11439560kB, file-rss:212kB, shmem-rss:0kB, UID:1000 pgtables:22720kB oom_score_adj:0

mprime - don't know much about it. Let me test and get back to you. But I imagine the OOM killer kicked in.

Proper test - open a browser, keep opening different tabs, rinse and repeat.

mprime: error while loading shared libraries: libhwloc.so.5: cannot open shared object file: No such file or directory

Hmmmm

It's the linux version of Prime95. Seems way easier to just run that than open a bunch of tabs.

Except opening tabs is a real world test.

I am trying to compile mprime from aur BRB

Yes:

[Main thread Feb 29 10:16] Stopping all worker threads.
[1]    229953 killed     mprime

Does the same, so either the program is faulty or the OOM kicks in.

I think I had that error when I first installed it too. I think I had to make a symlink from /usr/lib/libhwloc.so -> /usr/lib/libhwloc.so.15.1.0

5 community/stress 1.0.4-5
     A tool that stress tests your system (CPU, memory, I/O, disks)

Looks promising (time for coffee.......).

Forum kindly sponsored by