Memory Ballooning

I added -balloon virtio to the args: option, and its working fine... Could this be added by default by proxmox? Earlier versions of KVM had it enabled by default but it seems 0.12.x now needs this option.

Also, balloon only lets you decrease the available memory in a guest... Would it be possible to have 2 memory options on each image, a boot memory (ie what available when the system first boots) and a max memory so you can increase the available memory on an image if required?

Sorry I have disappeared after creating the thread, but I tested out meto's args addition to the config files and it worked great. Just like someone pointed out I can not add memory only remove it. Will this be added as default in the future along with the possibility for a maximum memory option just like bert64 pointed out?
 
I think there is a lot of confusion on this thread. Memory Ballooning is a manual process, its not really there just for saving memory. It gives you the flexibility to control how much memory your VM has and I always thought of it as a way to increase ram if you need it or decrease it without shutting down the server. For VM hosts that have limited memory this could be a way to increase the number of VMs on the server or a way to give a VM that is running short on memory the ability to continue on without having to power it down. KSM would be a completely different technology used only by the Host server to save memory.
The only way I could consider it to be automated would be if the VM host monitored the usage on the VMs and increased it when the usage was high. The server would have to be able to tell the difference between memory used for caching though.
 
With ballooning, upon quest start, you specify the maximum amount of memory available to the guest.

In other words, if you want your guest to have 1 GB of RAM, but you still want to be able to increase it to 4 GB when needed, you have to do:

- start the guest with balloon option and specify 4 GB
- connect to KVM monitor and decrease available RAM to 1 GB

This could be scripted, I guess...
 
- start the guest with balloon option and specify 4 GB
- connect to KVM monitor and decrease available RAM to 1 GB

This could be scripted, I guess...
Guys, is this proposal still topical now?
I'd like to have these settings with max and actually memory for every VM, like in Xen.
May be it will be too difficult to automate memory capping for guests, but it's really useful when you need to increase memory for the important task on the certain VM without rebooting.
 
I'd like to have these settings with max and actually memory for every VM, like in Xen.

Well, Alexandre is working on hotplug, but this is a feature we plan to implement after 2.0.

Can't we simply use a reasonable large value for max? Why do you want that configurable?
 
Can't we simply use a reasonable large value for max?

Why not? You are using now default values for VMs. Just add new value for max mem as same as current mem value.

Why do you want that configurable?

It's useful for several cases. For example, there are three people using the terminal services and one of them starts a heavy job, but other people will impact the performance by that job.
 

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!