I'm trying to choose a virtual machine, and I can not understand how to compare them. When I read a description of any VM, I see many words about the technologies used, and why they make this VM the fastest. But they can not all be the fastest, some of them should be faster than others?

How to compare different virtual machines?

    1 answer 1

    1. The fastest are container-type virtual machines - all containers use a common core and common core-level modules, but the service structures of each process are initialized in a special way, which creates the illusion of completely different servers.

    Examples of containers - OpenVZ, Docker. They work only on Linux, because it is impossible to outrage other OS as much.

    2. Paravirtualization follows containers in order of decreasing performance. Paravirtualization is the launch of the guest OS completely at the user level, for this purpose, special drivers are prepared for the desired OS that replace all those kernel modules that previously needed access to kernel-level privileges (ring 0 on x86 / 64 architecture).

    An example of para-virtual machines is XEN, User mode linux.

    Restriction - the paravirtual guest OS should be compatible with the hypervisor used. Often, this restriction can be read as "guest OS should be Linux", although there are some exceptions.

    3. The next most serious implementations are hypervisors using hardware virtualization. This is again XEN, KVM, VirtualBox, WMWare, Hyper-V and QEMU (in KQEMU mode) ...

    There are no restrictions on the guest OS, except for the presence of drivers for virtual devices under it. But many implementations emulate real-life devices as “virtual” ones, which simplifies the problem with drivers.

    But here we must understand that despite the possibility of full virtualization on each of these VMs, they can all use partial paravirtualization to speed up the work. Therefore, if you put a special set of "guest" drivers on a VM, its work will speed up and new features may appear. Therefore, when choosing a VM, it is necessary to take into account the intended guest OS and see what guest drivers there are for it.

    It is usually considered that XEN, KVM and VirtualBox are faster when the guest OS is linux, and WMWare and Hyper-V are faster when the guest OS is Windows.

    4. The last class, the slowest - emulators. They remove the restriction on the processor architecture (you can emulate ARM on x64 or vice versa) - but they work even slower than previous classes. An example is QEMU, BOCHS.

    Emulators also have techniques for speeding up execution. But comparing emulators is already beyond the scope of this question.

    • Mark your answer with the answer. - Anton Sazonov
    • and what was closed? - Nick Volynkin
    • @NickVolynkin, I can not find. The topic of the question was exactly the same, but in the search it is no longer searched, and I closed the tab with it. - Pavel Mayorov
    • The topic was poorly formulated, and you see that instead of editing, the author chose to delete. In this formulation, everything is quite decent, plus. - Kromster September
    • 2
      For a newbie from your description (at least if I put myself in his place) absolutely does not follow that there can be (in fact, I know that I cannot) containers of a different type (each type for its version of guest) in within a single host. / As for chroot, there are many more differences (not only root-isolation), but still they are similar for a number of practical tasks. You can put the description of chroot in a separate paragraph (although, in general, the (chroot) is not very consistent with the intuitive leitmotif of the question in the current wording). - avp