VM consumes little RAM - but PVE indicates large VM RAM usage

ejimenez

New Member
Apr 4, 2023
9
0
1
Hello everyone!



I have a virtual machine that consumes very little RAM, at most it consumes 3GB of the available 8GB or at least that is what the dashboard and the "top" command in the VM show, but proxmox shows that that virtual machine consumes 90% of the 8GB. I increased the RAM to 16GB and the virtual machine on the dashboard shows that it continues to consume 3GB but in proxmox the consumption increased to 15GB, 90% of the available one.



It is normal?; Since what could be due to the difference in consumption?



Thank you.
 
Hello!

The screenshots belong to a pfsense and proxmox VM respectively, both taken at the same time.

In proxmox it indicates that the VM is consuming 7.3GB, 90% of the total RAM, while in pfsense it says that the consumption is 1.6GB, 20% of the total RAM.
 

Attachments

  • Captura de pantalla de 2023-11-30 07-35-54.png
    Captura de pantalla de 2023-11-30 07-35-54.png
    4.2 KB · Views: 40
  • Captura de pantalla de 2023-11-30 07-35-07.png
    Captura de pantalla de 2023-11-30 07-35-07.png
    6.4 KB · Views: 40
Title is misleading and inaccurate. I would change it to:
Code:
VM consumes little RAM - but PVE indicates large VM RAM usage
I have also experienced this with certain VM's, (HAOS for example), and I think I found that this boils down to swap & balooning. I also found that on these VM's that PVE reports higher mem usage, it tends to happen over time; meaning that the longer the VM runs, the bigger the discrepancy between the two mem reports.
 
The screenshots belong to a pfsense and proxmox VM respectively, both taken at the same time.

In proxmox it indicates that the VM is consuming 7.3GB, 90% of the total RAM, while in pfsense it says that the consumption is 1.6GB, 20% of the total RAM.
That discrepancy normally occurs due to filesystem caching (aka. page cache) in VMs. Proxmox VE can only see what the VM uses in total, not what is actually uses for data. What pfSense reports is exactly the latter, as page cache is normally not considered "used RAM" (due to it's volatility/ability to simply discard).

It is normal?; Since what could be due to the difference in consumption?
So yes, that is totally normal.

You can try installing qemu-guest-agent (IIRC it's available on FreeBSD), but I don't know if the qemu-guest-agent on FreeBSD actually (can) report the actual used memory vs. total memory used.
 
El título es engañoso e inexacto. Lo cambiaría a:[CÓDIGO]La VM consume poca RAM, pero PVE indica un gran uso de RAM de la VM[/CÓDIGO]
También he experimentado esto con ciertas máquinas virtuales (HAOS, por ejemplo), y creo que descubrí que esto se reduce a intercambio y globo. También descubrí que en estas máquinas virtuales PVE informa un mayor uso de memoria, esto tiende a suceder con el tiempo; lo que significa que cuanto más tiempo se ejecute la VM, mayor será la discrepancia entre los dos informes de memoria.
Sorry, I didn't know how to define the title correctly, thanks for the suggestion.
 
That discrepancy normally occurs due to filesystem caching (aka. page cache) in VMs. Proxmox VE can only see what the VM uses in total, not what is actually uses for data. What pfSense reports is exactly the latter, as page cache is normally not considered "used RAM" (due to it's volatility/ability to simply discard).


So yes, that is totally normal.

You can try installing qemu-guest-agent (IIRC it's available on FreeBSD), but I don't know if the qemu-guest-agent on FreeBSD actually (can) report the actual used memory vs. total memory used.
Ok, I will do it, thank you very much.
 
You need to install qemu-agent on your VM so it reports the used memory properly to QEMU and Proxmox shows the right value.
Sorry, but no. It shows the value you think is right but actually is wrong. The value PVE shows is the correct one and we talked about this endlessly on the forums. Not even there, this question is asked so many times for so many years, that there was a webpage created that describes the underlying cause of this:

https://www.linuxatemyram.com/

So, the amount PVE shows is the actual memory that has been used on your computer and is the limiting factor for everything virtualization related, despite what your guest says or thinks.
 

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!