Ram does not add up in the summary of the node

1eo

New Member
Jun 3, 2022
10
1
3
when i was looking at the total ram usage it wasnt adding up, i have a linux vm which is using 3gb i have a unriad vm which is using 57gb oand i have a windows vm which is using 15gb of ram, when i was looking at the summary of the node the total ram usage says its 44gb

if there is anyways to fix this or if someone can explain to me why it is that way thank you

1654260448759.png1654260456249.png1654260462036.png
1654260474981.png
 
Its also the question what you define as "free" and "used" and how you handle "available" memory.

Example:

A VM that got 10 GB RAM assigned where inside the guest 2GB are used for system/user processes, 7GB are used for caching and 1GB is free. There is also virtualization overhead of 1GB. Lets say that VM is using PCI passthrough where then always the full RAM will be allocated, because PCI devices could use DMA and that requires that the device could directly access all of the memory at all times.

So in reality that VM actually consumes 11GB of physical RAM that can't be used by the host itself or any other guest. This is what you for example will see when running htop and look at the kvm process. and this is what PVE will show you in the webUI if you don't enabled the qemu guest agent for yur hosts.

Then you got the point of view of the guest OS. The guest OS can't know of the virtualization overhead so this additional 1GB is missing. And then there is the point of how you visualize "available" RAM. With this example a guest Linux will tell you that 9GB are "used", 1GB is "free" and 8GB are "available". Many programs will show this "available" RAM as something like free RAM even if that RAM in reality isn't free, because when needed the guest OS could quickly drop the caches to free up additional 7GB. So cached data is basically handled as free.
From the hosts perspective "available" RAM is just "used" RAM as the host can't drop caches of a guest.
With modern OSs they probably use up all RAM you throw at them and are always at over 90% RAM usage even if they don't show it that way. Because at baremetal hosts unused RAM is wasted RAM, so even if no program actually needs it, the guest will use all of it for caching.

And when using the QEMU guest agent you will see different RAM usages depending on the guest OS you are using.

Unix: FreeBSDs guest agent implementation for example won't report any RAM usages so PVE will just use the RAM usage of the KVM process as a fallback. So all "available" RAM will be shown as "used" RAM + overhead.

Linux: the Linux implementation of the guest agent will show "available" RAM as "used" RAM

Windows: the Windows implementation will show "available" RAM as "free" RAM

So what you see in the PVE webUI also depends on the guest OS that VM is running.

For a better understanding of "available" RAM you might want to read this: LinuxAteMyRAM.com
 
Last edited:
But this all doesn't explain, why the node-summary (44,17 GiB) in PVE shows way less used memory, as the addition of the three VMs in their VM-summary (3,03 + 56,90 + 14,92 = 74,85 GiB) in PVE or what do I miss?
 
But this all doesn't explain, why the node-summary (44,17 GiB) in PVE shows way less used memory, as the addition of the three VMs in their VM-summary (3,03 + 56,90 + 14,92 = 74,85 GiB) in PVE or what do I miss?

As I said, start by enabling Guest Agent on your Windows VM, install it and check the difference in the reported memory to the host. Then do the same for your other VMs.
 

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!