Memory usage on Proxmox is different than vm

DooRFraim

New Member
May 16, 2022
3
0
1
prox usage.pngvm usage.png

I have been running this Windows 11 vm normally with 8gb of RAM without issue for the better part of a month. A couple of days ago, it started running very slowly and I noticed that the usage on proxmox was very high as shown above. I added an additional 4gb of RAM, but the utilization on proxmox rose to meet it. On task manager, the vm shows that it has over 10gb of memory available. I created another vm on the same node and it immediately had the same issue on startup. I made a third on a different node and it also had poor performance and incredibly high RAM usage despite being a blank slate.

I'm pretty new to proxmox, and I'm not really sure how to go about fixing this. The only common thread I can think is that they all use the same bulk storage, but I'm not confident it would be related. Any guidance?
 
Did you install the virtio balooning driver and the QEMU guest agent as seen here?: https://pve.proxmox.com/wiki/Windows_2022_guest_best_practices

Also keep in mind that "available" RAM isn't the same as "free" RAM. Usually Win will use up all RAM you throw at it. If programs or services won't need it it will be used for caching. If you don't intalled the guest agent with ballooning drivers PVE will show you the "free" RAM as free RAM and not the "available" RAM as free RAM.
 
I don't think so, at the very least I did not specifically do any manual installation. I do remember mounting the virtio iso when I created the vm, however. Nevertheless, I did install and reinstall the Ballooning driver earlier today. I just installed guest agent and confirmed that it was present in services, but nothing has changed after restarting the vm.

Ahh I understand. I can't honestly say that I ever looked at the utilization that was being reported prior to this issue, it may be that its always shown this high of a number
 
After installing the guest agent also make sure your go to your VMs options tab and enable QEMU guest agent there too (and maybe go to your VMs hardware tab and enable ballooning for RAM) and then reboot the VM webUI so PVE actually makes use of it.

Usually PVE will show RAM like this:

Lets say your VM got 10GB of RAM and programs/services are using 4GB and cache uses 5.5GB.
The guest OS will report 6GB are available but actually only 500MB are really free. So for Linux (with and without guest agent) or Win without guest agent PVE will report that 9.5GB are used and 500MB are free, so 95% RAM utilization. Thats not wrong because 95% of your physical RAM are used by the VM. But the guest OS will tell you that 6GB are availalbe (even if only 500MB are actually free) because the guest OS can quickly drop 5.5 GB of cached data if a programm/service would need some RAM.

When using the guest agent with ballooning drivers PVE will ask Win how much RAM is free and Win will report that 6GB are free, so PVE will show that only 4GB or 40% are used...even if actually 9.5GB or 95% of the physical RAM is used by that VM.
 
Last edited:
In addition to @Dunuin's answer: If you also use caching on the PVE/QEMU side of things, you will - in addition to the caching inside of the VM - have caching outside of the VM probably wasting even more RAM. This is one point often overlooked while talking about caching and stuff. If you have enough RAM, you will get a blazing fast system, but if you don't, you can can into a lot of problems (e.g. caching some blocks twice and other not at all).
 
So I have confirmed that guest agent is enabled, but performance is still a slog. @LnxBil I checked the VM level caching and I have both of the drives set to Default (no cache). This should avoid the extra waste, right?
 

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!