Wrong Memory Stats on VM from Proxmox 6

JOduMonT

Renowned Member
Jan 20, 2016
73
7
73
Bangkok
jdumont.consulting
Hi; I saw few post on this in the past but no answer make really sense.
Here Proxmox tell me my OpenMediaVault use more than 90% of the allocated memory (independently how much I give to this VM) but in reality OMV only use 5%.
There is a way to fix that ?

screenshot.png
 
It probably uses the remaining memory too, but not for memory allocations of programs but the kernel in the VM for page caching, i.e., as this is a NAS and thus has probably some read/write ops going on the page cache is surely a good use to buffer that.
So, as this can be made available for programs inside the VM it does not shows it as "used", but the PVE host sees only that the memory is in use.

You could execute the following command free -h in a shell in the VM, it should output something like:
Code:
              total        used        free      shared  buff/cache   available
Mem:           62Gi        41Gi       6.2Gi       1.0Gi        14Gi        19Gi
Swap:          30Gi       0.0Ki        30Gi

I.e., used by programs is 41Gi, the kernel uses 14 Gi for cache (unused memory is wasted memory), but that counts into the available of 19 G, because if a program requires more memory the kernel can simply drop caches to get it available (IO performance can then get worse, naturally)