Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Ballooning is smart or dumb?

Featured Replies

KVM allows to a VM to increase its RAM on the fly, so I could make a VM with 4GB RAM that could go up to 8GB.

 

The question is, is this ballooning smart enough to force VMs to decrease their RAM usage and give it back if I run other virtual machines?

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

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.

  • Author

What I'm seeing is that if I run another VM, KVM prefers to kill all the VMs rather to wait for free memory (balloon service is installed in the test Windows VMs), and this is unacceptable

if thats the case, surely adding more memory is the fix? or assigning less memory to existing VMs?

 

if you are looking to squeeze every last MB out of memory, you'd be better using a dedicated hypervisor rather than an OS that needs to use memory for its own stuff as well.

  • Author

No, I was just doing overprovisioning tests.

 

In the future it would be nice to run some rarely used VM and don't have to "waste" 1GB ram just for that

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.

 

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.