How does one diagnose, and fight, a memory leak?
Computer had been running for somewhat less than two days, and started slowing down atrociously – I saw that the available memory had gone down to 200 Mb, give or take, closed or killed everything (LibreOffice, FireFox, Caja and Xed) – and here’s where I got:
iad@iad-X505BP:/$ free -m
total used free shared buff/cache available
Mem: 6966 5427 1141 4 398 1293
Swap: 11263 732 10531
iad@iad-X505BP:/$ inxi -It m20
Processes:
Memory top: 20
1: mem: 81.9 MiB (1.1%) command: mintreport-tray pid: 2281
2: mem: 26.6 MiB (0.3%) command: xorg pid: 1428
3: mem: 21.4 MiB (0.3%) command: systemd-journald pid: 405
4: mem: 21.4 MiB (0.3%) command: caja pid: 12282
5: mem: 20.5 MiB (0.2%) command: marco pid: 1971
6: mem: 16.4 MiB (0.2%) command: mate-screensaver pid: 1998
7: mem: 15.2 MiB (0.2%) command: mate-panel pid: 1972
8: mem: 14.3 MiB (0.2%) command: wnck-applet pid: 1991
9: mem: 12.3 MiB (0.1%) command: mintupdate pid: 2222
10: mem: 11.1 MiB (0.1%) command: mate-terminal pid: 2224
11: mem: 10.6 MiB (0.1%) command: nm-applet pid: 2027
12: mem: 10.3 MiB (0.1%) command: mate-xapp-status-applet pid: 1995
13: mem: 9.36 MiB (0.1%) command: mate-settings-daemon pid: 1948
14: mem: 8.11 MiB (0.1%) command: mate-power-manager pid: 2003
15: mem: 7.38 MiB (0.1%) command: redshift-gtk started by: python3 pid: 2002
16: mem: 6.57 MiB (0.0%) command: mate-volume-control-applet pid: 2055
17: mem: 6.34 MiB (0.0%) command: networkmanager pid: 1145
18: mem: 6.29 MiB (0.0%) command: clock-applet pid: 1993
19: mem: 6.19 MiB (0.0%) command: notification-area-applet pid: 1997
20: mem: 5.25 MiB (0.0%) command: pulseaudio pid: 1982
Info:
Processes: 203 Uptime: 1d 21h 13m Memory: 6.80 GiB used: 5.38 GiB (79.1%)
Shell: bash inxi: 3.0.32
The top 20 processes add up to 291.61 Mb, so how is the used memory 5427 Mb? What is wrong, and what is to be done about it?
System:
Host: iad-X505BP Kernel: 5.3.0-40-generic x86_64 bits: 64 compiler: gcc
v: 7.4.0 Desktop: MATE 1.22.2 Distro: Linux Mint 19.3 Tricia
base: Ubuntu 18.04 bionic
Info:
Processes: 215 Uptime: 1d 21h 36m Memory: 6.80 GiB used: 6.00 GiB (88.2%)
Init: systemd runlevel: 5 Compilers: gcc: 7.4.0 Shell: bash v: 4.4.20
inxi: 3.0.32