Memory/ram used discrepancy between host and guest

proxwolfe

Active Member
Jun 20, 2020
439
34
33
49
So I have a virtual PBS running inside a PVE.

I have allocated 2GB RAM to the PBS VM. Qemu-guest-agent is installed and working (memory is not hotplugged).

PVE shows "Memory usage 1.86GiB of 2.00 GiB".

PBS shows "RAM usage 575MiB of 1.94 GiB".

Why do the numbers not agree?

Thanks!
 
Probably: the operating system inside the VM does not count filesystem cache as used memory because most of it is read-only and can be reused at any time. However, the Proxmox host does not know this and counts all used memory (which included the filesystem cache because it is used at the moment) as used. This is not incorrect because the Proxmox host cannot reused the memory from inside the VM (while it is in use). Maybe have a look at this thread as well?
 
So when should I act and allocate more RAM to the VM? I take it, the VM itself knows best.

Would it make a difference, if I enable hotplugging RAM?

Maybe have a look at this thread as well?
Ha, almost exactly my case! Sorry, didn't see that one.

I actually have passed through the whole SAS controller to the VM. What difference does that make in my case, I wonder? The result still seems to be the same.
 
If the VM is slow, add more memory and see if it helps? It depends, on a lot of things...
Proxmox Backup Server is typically limited by CPU (because of TLS/HTTPS) and disk latency/throughput (as storage is its main purpose) and network speed (to transfer all that storage), not memory.
 

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!