Proxmox host using more memory than sum of vm without using ZFS

sterua32

Member
Nov 18, 2022
6
0
6
Hello everyone!
I post here because i have a problem: in proxmox gui, on my host, i see the RAM usage is bigger than the total of ram by my vms. and, i install balloon device and service for my vms...

I see a lot of topic here saying that there is a problem with ZFS, but i dont use ZFS, all my vmdisk are with no cache, and no pci passthrough.

The ram usage display in the host is like all vm use 100% of their ram, but, when i go to the vm summary, it's display the right memory use by windows (corresponding perfectly with what's is given in windows task manager). I dont understand why.

I have one host, on proxmox 8.0.4, with windows 10 and windows 11 guest, and one ubuntu guest (for ubuntu, it's the same, vm summary shown the correct ram use, but when i start it, ram usage of the host is counting like vm use all memory allocated).

I had not this problem when i was in proxmox 7.4, but i make upgrade because i buy a 10gb nic with intel and i had some issue that are patch with kernel 6...

My disk use lvm and ext4 on raid 5 of three SSD 2,5"

Can someone help me or give me some tip ?

Thanks a lot in advance.

Have a nice day
 
The ram usage display in the host is like all vm use 100% of their ram, but, when i go to the vm summary, it's display the right memory use by windows (corresponding perfectly with what's is given in windows task manager). I dont understand why.
Windows reports wrong memory so with the guest agent installed PVE will report wrong RAM usage for those Win VMs too. From the PVE hosts point of view all RAM that is anyhow in use is used RAM. From the Windows point of view RAM that is used for caching is free RAM (while actually being used).

Whats important is the actual amount of physical RAM that is in use. Lets say a Win VM got a max of 10GB RAM. 4GB is used by system and userspace processes + 4 GB used for caching + 2 GB that is actually free/unused. Win will report it is only using 4GB while actually 8 GB of physical RAM will be used by the VM. And it actually might even be higher as the KVM process virtualizing your VM also needs some RAM. So might be more like 8.5GB RAM in use.

Rule of thumb is to not overprovision your RAM if you care about stability and performance. If you allocate 16GB vRAM to a VM, handle it as these 16GB will always be 100% in use. And if the hosts RAM exceeds 80% KSM and ballooning will kick in reducing the performance. So its a good idea to keep the sum of all guests allocated RAM below 80% of your hosts RAM.

If you want to know how much RAM your VMs are actually using, run top or better htop (needs to be instaled first via apt) on the PVE host and have a look at the "RES" column of your "kvm" processes. This is whats actually being used and this might een be higher than what the max RAM is you allocated to these VMs.
 
Last edited:
Windows reports wrong memory so with the guest agent installed PVE will report wrong RAM usage for those Win VMs too.
I can not confirm.
The Windows Server VMs have Ballooning Device enabled and the Guest Agent installed. It should be noted that VirtIO has an installer for everything and only the installer for the agent itself, but then the drivers are not installed.

In any case, it works perfectly for me and roughly corresponds to the consumption as displayed in the task manager.
 
I can not confirm.
The Windows Server VMs have Ballooning Device enabled and the Guest Agent installed. It should be noted that VirtIO has an installer for everything and only the installer for the agent itself, but then the drivers are not installed.

In any case, it works perfectly for me and roughly corresponds to the consumption as displayed in the task manager.
Yes, with the guest agent installed what PVE will show in the VMs summary will match whats windows task manager is reporting. Still both doesn't represent how much RAM running that VM is actually consuming. Have a look at the RES values of the kvm processes in htop and you will see that this won't match whats the task manager is reporting as soon as the Win VM is caching.

WebUI and task manager will only how what Windows thinks it is using but not what is actually used on the host.

1700318672030.png
 
Last edited:
In addition to all of that, each VM uses more RAM than you actually configured due to virtualized video card with video memory, virtual drivers and so on. In general, a VM that runs for a couple of weeks / months will - depending on the amount of configured ram - use 110% - 130% of what is configured in actual rss ram as seen by (|h)top. This is normal and expected.

Ballooning does also not work as most people think: It'll give back memory if asked and if free and does not take less and balloon up to what is needed. If no one asks for memory, the VM won't give it up itself.

And all that has been discussed in the forum before.
 

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!