Ballooning is smart or dumb?


Recommended Posts

Yes, it does.

Works alot better on linux guests rather than windows though as its built into the linux kernel. Advice at the moment seems to be to disable balooning (set min\max memory as the sane value) on Windows. if its something that interests you, id advise to keep an eye on the virtio windows drivers changelog to see if any improvements are implemented: https://fedorapeople.org/groups/virt/virtio-win/CHANGELOG

Link to comment

Ballooning isn't a magic bullet. It can only reap memory the guest OS has allocated but isn't actually using (cache etc etc) and / or apply other clever tricks (dedupe of memory across guests etc) to try and free some real memory.

 

If all your vm's are, genuinely, actively paging all memory in the guests - the hypervisor won't be able to do much about it.

 

You're rolling the dice if you force the hypervisor into a position where it needs to start thinking about this. I'm not sure on kvm's default behaviour if guests exhaust memory - vmware will start swapfiling so killing performance but at least keeping the guests up.

 

My understanding anyway.

Link to comment

General rule of thumb is don't over provision memory for guests.

 

As above ballooning is a last resort but isn't magic and can't always fix the issue. You could investigate KVM being able to use disk as swap for guest memory / migrate to vmware which does do swapping and accept the performance penalties when ballooning fails and the hypervisor swaps your guest memory out.

 

My hunch would be KVM *does* try to swap out guest memory (rather than, as you're seeing killing the guest or more accurately having the KVM process oom'd ?) but uses the system swap space to do so. And I don't think unraid runs with swap? I can't check my unraid machine right now to confirm.

 

If that's the case you could configure unraid with some swap space and see if that will allow KVM to swap guest memory. Performance penalties but your vms would keep running.

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.