Any way to adjust Proxmox Dynamic Memory? (virtio_balloon)

iviso

New Member
Dec 16, 2024
2
0
1
I have virtio ballooning enabled in a few Windows Hosts that have allocated significant amounts of memory (64-128GB), however, most of that memory is not needed 99% of the running time, only for one off weekly tasks.

I would like to reclaim that memory, but it seems that the way that Proxmox configures the virtio_balloon driver through qemu is very aggressive, trying to keep memory usage below 80%. Which is fine for relatively small servers, but it's a lot of memory on larger ones.

Is there a way to configure said limit at something less aggressive like 95% or a flat value, like 64GiB?
 
Is there a way to configure said limit at something less aggressive like 95% or a flat value, like 64GiB?
Currently, there is not. You could submit a feature request at https://bugzilla.proxmox.com/ for this, as I'm sure it might be useful for other people as well.
a few Windows Hosts that have allocated significant amounts of memory (64-128GB), however, most of that memory is not needed 99% of the running time, only for one off weekly tasks.
Maybe, as a work-around, use a separate VM (with lots of memory) for the weekly task (and run it only once a week)?

EDIT: I got no replied some years ago: https://forum.proxmox.com/threads/configure-ballooning-threshhold-answer-not-possible.95984/
 
Last edited:
You could have a script to shutdown the VM before the weekly high-RAM task, add the higher RAM to the VM config, restart the VM & complete the required task, shutdown the VM, reset the RAM in the VM config & restart the VM.

Or: how about trying to Hotplug add the memory before the weekly task needs to be run within the VM & then Hot unplug it afterwards.

I've never done anything like it - but maybe give it a try?

Edit: I see from the docs that Hot unplug does not currently work for Windows? So maybe you'll need to restart the VM afterwards.
 
I have virtio ballooning enabled in a few Windows Hosts that have allocated significant amounts of memory (64-128GB), however, most of that memory is not needed 99% of the running time, only for one off weekly tasks.
The OP needs a mechanism to hand back the RAM from the VM to the host when it is not needed IN THE GUEST VM.

The balooning feature as stipulated in the docs will allocate up to the maximum RAM configured in the VM if the memory consumption of the HOST (not the VM!) is below 80%. So:
Is there a way to configure said limit at something less aggressive like 95%
This will have the adverse effect of giving the VM up to it's maximum configured RAM even with the HOST server using (up to) 95% - & the VM possibly not needing that RAM.

Even if we were to change that ceiling to 40%, this would just cause the likelihood of the VM having less RAM more of the time - but again not based on the VM's own requirements.

The above-posted bug/feature requests are not what the OP needs.
 

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!