Windows 10 VM Ballooning -> almost 100% Ram usage

So if we do gpu passthrough, memory ballooning become unusable or there are still a way around this?
 
Not generally, but for that particular VM it's not going to work, because the pages wont get released for that VM.
 
That makes sense, thanks for clarifying. Since I need GPU passthrough, I will just not use ballooning.
 
The problem still persists. I am using Windows Server 2019.
After a few minutes, Windows is using almost 90% of the allocated memory. Task manager and proxmox are reporting the same memory information. As soon as i uninstall the Ballooning device within the windows device manager, the used memory in the taskmanager instantly goes down (to around 1GB on fresh Windows Server 2019 installation), but the Ballooning service is logically not working anymore.

Is this maybe a bug (memory leak) within the virtio driver?

I am using virtio driver version 0.1.173
 
This thread is about ballooning and gpu passthrough, if you are using both please read the thread otherwise open a new thread, thanks.
 
TLDR; If you have a Windows VM with GPU passthrough, please turn ballooning off.

Just some heads-up. I'd like to confirm the behaviour observed in this thread. It is consistent.
  • In my case, when Windows VM is started (with GPU passthrough) it already takes around 20GB RAM, then it creeps to the maximum allowed by ballooning (32GB; min 4GB).
  • As mentioned before, no driver file (*.sys; or actually no file at all) is found using the tag returned by poolmon.
  • When ballooning is off - memory consumption works perfectly fine (ballooning driver and service is left installed).

Testing env:
  • VM: Windows 10 Pro (10.0.19041 Build 19041)
  • GeForce GTX 1050Ti
  • Proxmox 6.2-1
  • virtio-win-0.1.187
Some VM settings:

Code:
bios: ovmf
boot: cdn
bootdisk: scsi0
cores: 16
cpu: host
hostpci0: 0d:00,pcie=1,x-vga=on,romfile=My.Palit.GTX1050Ti.rom
hostpci1: 09:00,pcie=1
machine: q35
balloon: 4096
memory: 32768
name: win10
ostype: win10
sockets: 1
vga: none

It took me a while trying to figure out what's wrong and then I found this thread. Thank you @tim for the confirmation - kudos. I turned ballooning off.
The thing is, qemu needs to allocate the whole memory up front if you use gpu passthrough, because of the memory mapping required for this.
 
  • Like
Reactions: Jarvar
I was having the same issue. Memory was hovering around 90%, after uninstalling Virtio Balloon it dropped to around 20-30% which is inline with another server VM I have running. Main difference is the other server has more physical RAM allocated to the node with 64GB vs. 16GB. However, the 64GB is regular SODIMM and the 16 GB is ECC. Another difference is the 16GB is an install of Windows Server 2019 from scratch and the 64GB with no issues is actually a P2V. Albeit the P2V is OVMF with EFI boot, and the 2019 server with issues is using SEABIOS...
 
Still an issue. My ram usage continually increase 100mb every few seconds. Using proxmox 7.3
Passing both the gpu and nvme device to windows VM (windows 11).


canvas.png



Screenshot 2023-02-22 113638.png
 
Last edited:
With PCI passthough there is no ballooning possible. The VM will allocate 100% of the RAM all the time because of DMA, no matter if the VM is needing that RAM or not. When giving that VM 88GB RAM, it will always use the full 88GB (or even more because of KVM overhead and optinally caching like writeback).
Have a look at top or htop on the host. the KVM process that virtualizes that Win VM should always consume those 88+GB RAM.
 
Last edited:

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!