Over-Committing the resource is a vital part in Virtualization. Idea of over-committment is to allocate more memory to guest machines than the host really has. Suppose a 2GB host is running two guest operating system who is having 2GB memory, in this case we can say its over committed.
In Ballooning process, Host have a right to take the free memory from Guest machines if its there. Consider the above said example, where suppose one virtual machine is using 1GB and other 1GB is free, host can ask the guest to return the free memory. Guest will give it back and host can allocate somewhere else. And if the reduced guest wants to run an application that consumes more than the 1G it currently has, it has to grow again.
virtio_balloon - This is the driver who open a communication pathway between Host and the Guest virtual machines. Hypervisor (Host) uses this communication pathway to over-committ the resource from Guest machines. If you are not loaded the virtio_balloon driver, you are not able to do the following.
1. The guest operating system ignores memory requests from the hypervisor.
2. The hypervisor cannot over-commit the memory.
2. The hypervisor cannot over-commit the memory.
The main problem is, this ballooning process is not automatic. it's entirely manual. Someone (or some tool) is supposed to be watching
the pressure in the host and guest and then operate the balloon
accordingly. In 2013 October KVM forum, Redhat introduced Automatic Ballooning. You can find the presented slides here, and its available with from Kernel 3.10 onwards. I would say, its still experimental and need more feedback.
1 comment:
Hello, thanks for your comment.
I am interested on the same subject and trying to find a peace of code (C or Java ..) that use libvirt in order to manage memory manually and i can not find it , i will apreciate if you can help me.
Thanks
Post a Comment