I encounter low memory issues on proxmox 7 nodes I'm managing. When reading about similar problems I was directed to linuxatemyram.com, after reading this page I started monitoring "available" memory instead of "used" memory. But the problem persisted (available memory decreases with uptime).
I then found that I could force free linux caches by issuing the command echo 3 > /proc/sys/vm/drop_caches
. I was expecting to see "used" memory becoming free, but I didn't expect "available" memory to increase because as far as I understand, available memory is also concidered used because it is used by linux for caching.
But "available" memory increased after drop_caches, as you can see bellow :
root@proxmox13:~$ free -h
total used free shared buff/cache available
Mem: 31Gi 29Gi 1.1Gi 67Mi 258Mi 977Mi
Swap: 0B 0B 0B
root@proxmox13:~$ echo 2 > /proc/sys/vm/drop_caches
root@proxmox13:~$ free -h
total used free shared buff/cache available
Mem: 31Gi 26Gi 4.1Gi 67Mi 205Mi 3.9Gi
Swap: 0B 0B 0B
Why did it increase ? Why wasn't the freed memory concidered available before if it was used for caching ?
Thanks for your help.