Ballooning with Windows Server 2019 not working as exptected

Nov 24, 2020
20
12
8
Austria
Hello alltogether!

My problem is related to RAM Ballooning on Windows Server 2019 - where the RAM used on the proxmox host is more than my VMs are consuming. See the graphics!

- My setup is a Proxmox Node with 256 GB Ram running all the latest PVE and updates (as per 24.11.2020)
- On WinServ2k19 guests: latest virtio installed, Balloon Service is up and running, all Windows Updates applied
- All guest VMs are a freshly installed windows server version!
- I have a few test VMs with 32 GB RAM, numa and ballooning enabled - as well as - hotplugging. Basically all VMs have the same config:

YAML:
agent: 1,fstrim_cloned_disks=1
balloon: 2048
bios: ovmf
boot: order=scsi0
cores: 4
efidisk0: nas-ssd:114/vm-114-disk-0.qcow2,size=128K
hotplug: disk,network,usb,memory,cpu
memory: 32768
net0: virtio=76:4B:7A:XX:XX:XX,bridge=vmbr0,tag=10
numa: 1
onboot: 1
ostype: win10
protection: 1
scsi0: nas-ssd:114/vm-114-disk-1.qcow2,discard=on,size=128G,ssd=1
scsihw: virtio-scsi-pci
smbios1: uuid=56b36326-1c42-4a82-baf9-0476e4767335
sockets: 1
startup: order=10
vmgenid: 616df918-5de5-4f05-bb78-411a6142f4a6

Code:
root@node1:/# free -h
              total        used        free      shared  buff/cache   available
Mem:          251Gi       225Gi        14Gi       108Mi        11Gi        24Gi
Swap:         8.0Gi       1.8Gi       6.2Gi

Why is the proxmox node allocating all this RAM? The RAM usage shown in the "VM Summary" is correct.

The total used RAM by the proxmox host is 251 GB:Bildschirmfoto 2020-11-24 um 21.35.42.png

Whereas the sum of all VM ram usage is about 54 GB RAM:
Bildschirmfoto 2020-11-24 um 21.32.11.png

Also, after a few minutes, the VM is using more and more RAM, even if there is no work on the VM (all the VMs have nothing but windows installed) - it looks like that the VMs cannot release allocated RAM ?

1606255569986.png

Greetings from vienna!
 

Attachments

  • Bildschirmfoto 2020-11-24 um 21.40.24.png
    Bildschirmfoto 2020-11-24 um 21.40.24.png
    224.7 KB · Views: 17
  • Bildschirmfoto 2020-11-24 um 21.37.06.png
    Bildschirmfoto 2020-11-24 um 21.37.06.png
    239.5 KB · Views: 24
  • Bildschirmfoto 2020-11-24 um 21.42.21.png
    Bildschirmfoto 2020-11-24 um 21.42.21.png
    775.5 KB · Views: 24
Last edited:
Ballooning is controlled by the host, not the guest. If the host decides that 10% free RAM is enough (which, at 256 GB total, i.e. 25 GB free, that's a good call), it will simply leave its guests be.

If the host experiences pressure, i.e. it needs more free RAM, it will ask ballooning-enabled guests to release some back - the guest gets to decide which pages it wants to free and provide to the host, if any.

So since the host never requests ballooning space, the guests won't provide any, and simply use all the RAM they're given if they like. And Windows is happy to do so to satisfy it's own (file system/disk) caching needs.

Your calculation that only 54 GB of RAM used is correct (well, if you counted correctly that is, I trust your math here ;) ), in that the rest of the RAM is 'physically unused by any OS' - however, for the host it is still assigned to VMs, and thus marked as 'used' in the overview and 'free -h'. If necessary, all that RAM up to 54 GB will be reclaimed via the ballooning drivers, but at the moment the host has no need to, so it leaves it to the guests.

TL;DR: It looks to me like everything is working as it shoud :)
 

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!