What exactly is memory usage?

Hey, I have a few VMs running Ubuntu. When I log-in using SSH, then the VMs tell me this info:

Screenshot 2021-07-05 at 22.29.22.png

So the memory usage (from Ubuntu's perspective) is around 11%.
Now when I look at the VM overview of Proxmox, I see this:

Screenshot 2021-07-05 at 22.29.00.png

So Proxmox is telling me that the memory usage of the databases VM is around 76%. What exactly does this 76% mean? And why am I seeing a difference here? In the end I want to define an alert on this (using grafana), but I'm not sure what number to pick here...
 
Proxmox is (for Linux but not Windows) reporting how much of the physical RAM your VM is actually using.
Your Linux will eat every bit of RAM you throw at it for caching. But because it is just used for caching it can be freed very fast so your guest linux is lying to you and will report RAM used for caching as "free" even if it is used in reality.

Use free -h inside the VM to get a better idea. "free" RAM is really free and unused and can be used by the host or other VMs. "used" is what the VM is really using (so this much RAM is blocked for the host or other VMs). "buff/cache" is the part of the "used" RAM that is used for caching. And "available" is what you are probably referring to. It is calculated "free" + "buff/cache".
 
Last edited:
Proxmox is (for Linux but not Windows) reporting how much of the physical RAM your VM is actually using.
Your Linux will eat every bit of RAM you throw at it for caching. But because it is just used for caching it can be freed very fast so your guest linux is lying to you and will report RAM used for caching as "free" even if it is used in reality.

Use free -h inside the VM to get a better idea. "free" RAM is really free and unused and can be used by the host or other VMs. "used" is what the VM is really using (so this much RAM is blocked for the host or other VMs). "buff/cache" is the part of the "used" RAM that is used for caching. And "available" is what you are probably referring to. It is calculated "free" + "buff/cache".
Thanks! Very clear... for my personal needs things means that I'd better trust the node_exporter memory values, instead of what pve_exporter tells me.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!