How to virtualization be efficient

virtualization

As I understand, the virtual machine and the guest OS doubles the amount of abstraction layers (that are computationally relevant) between the user interface and the pure power of the hardware. Some of the said abstraction layers are (emulated) hardware, drivers, IO interfaces, etc.

Top-notch virtualization solutions like Xen probably eliminate a few of these complexities, but I still wonder how efficiency is achieved in these environments; and whether manageable cloud servers are really worth the performance price.

Best Answer

The answer to your question is very simple : Virtualization is not efficient (not yet). Virtual machines work well-enough (especially on similar hardware) and are a solution, but they will never achieve the same performance as real physical machines. In my company we many times are required to explain to clients when it is time to migrate a virtual machine to physical.

How would you expect multiple virtual operating systems to co-work efficiently, when none of them even knows that it is virtual? How would you expect any of the drivers to make intelligent decisions about queues and priorities when they can't even see the matching queue in the other virtual machines. Hell, they cannot even see the actual physical hardware, basing all decisions on virtual phantasms.

For example, every innocent virtual machine will interrupt the CPU at least 1000 times a second in order to advance its clock. Put n virtual machines on one physical, and you will have (n + 1) * 1000 interrupts a second! Not to mention that the interrupt is the CPU slowest operation of them all by far.

I believe that in the future we will see new operating systems that will work efficiently as guests with the host. The tendency is already to invent virtual hardware devices with small trivial drivers that leave all the decisions to the real physical machine. But we are not there yet.

John T has explained all the advantages and convenience of virtualization. I will just resume by saying that they are simply used because of convenience and economics. They are so easy to move around, and in a corporation that has lots of little-used servers littering its IT centers, it is very tempting to cram several of them into one physical machine and forget about the whole lot. Not to mention that having less physical boxes around does simplify maintenance.

Related Question