Is emulation and/ or virtualization performance faster when the guest and host OS are similar? If yes, how big, relatively speaking, is the difference? And whether the answer is yes or no, why is it so?

For example:

Same architecture

Will a x86 Windows host emulate and/or virtualize an x86 Android guest faster than it will an ARM Android guest?

Similar OS

In the following two examples, please ignore the fact that Debian is arguably more resource efficient than Windows, and simply focus on relative emulation/virtualization performance.

Will a Windows 10 host emulate/virtualize a Windows 7 guest faster than it will a Debian guest? (All are x86.)

Remotely similar OS

Will an OS X host emulate/virtualize a Debian guest faster than it will a Windows guest? (All are x86.) (Since OS X and Debian are both UNIX or UNIX-like.)

I would appreciate if any answers used many layman terms and analogies to explain in a way that people who are not computer scientists could understand it.

  • 2
    $\begingroup$ When you talk about emulation, its the same, because essentially, in emulation you simulate everything. Virtualization on the other hand is a different story. $\endgroup$
    – Haris
    Apr 4 '16 at 6:12
  • $\begingroup$ @Haris Actually, I wasn't aware until now that there was a difference. I will edit the question. I want to know about both. $\endgroup$
    – Fiksdal
    Apr 4 '16 at 6:19
  • $\begingroup$ I don't think this is a computer science question as it asks for performance characteristics of real-world artifacts that depend on implementation details. (Why don't you just run experiments?) Community votes, please: is this offtopic? $\endgroup$
    – Raphael
    Apr 4 '16 at 7:40
  • $\begingroup$ @Raphael Can you suggest where on SE this could be posted? Also, as for why I don't just run experiments: Maybe I don't have the proper hardware, maybe I don't own copies of Windows, maybe I don't have access to a Mac, maybe I don't have a proper internet connection to download all these OS'es, etc, etc, etc. I live in rural India, by the way. Also, an answer to a question like this can tell us why it is so, while experiments may not. Also, other people who have the same question may be interested in reading this, rather than spending hours making experiments. $\endgroup$
    – Fiksdal
    Apr 4 '16 at 7:49
  • 1
    $\begingroup$ My point is: there probably is no answer beyond experiments. Technical details are likely to overwhelm all principled ideas. That's my intuition, anyway. As for suitable SE sites: I don't know, sorry. $\endgroup$
    – Raphael
    Apr 4 '16 at 7:51

Yes, virtualization on the same architecture will be a lot faster, if the architecture has built-in support for virtualization (as modern x86 processors do). With hardware support for virtualization, most code will run at full speed.

If you want to "virtualize" onto a different architecture, then under the hood the VM will probably end up doing emulation. Emulation is much slower.

To understand why, I suggest you do some more background reading about how virtualization and emulation work. You could start with Wikipedia: https://en.wikipedia.org/wiki/Virtual_machine and https://en.wikipedia.org/wiki/Hardware-assisted_virtualization and https://en.wikipedia.org/wiki/Hardware_virtualization and https://en.wikipedia.org/wiki/Emulator. If you'd like more details, you could check out an appropriate textbook (e.g., a good operating systems textbook).

The operating system most likely won't matter -- at least, there's no fundamental reason why it needs to make a difference. (It might make a difference for engineering reasons rather than scientific reasons, e.g., due to a 32-bit vs 64-bit OS, or due to lack of support for features used by the VM software.) The only way to know for sure is to do some experiments: measure performance on workloads you care about.

  • $\begingroup$ What do you mean by "virtualize onto a different host"? $\endgroup$
    – Fiksdal
    Apr 5 '16 at 5:12
  • $\begingroup$ @Fiksdal, oops, that didn't make any sense, did it? Edited. Thanks for pointing that out. $\endgroup$
    – D.W.
    Apr 5 '16 at 17:58
  • $\begingroup$ What about the part about similar vs dissimilar operating systems? $\endgroup$
    – Fiksdal
    Apr 5 '16 at 18:00
  • 1
    $\begingroup$ @Fiksdal, see edited answer. If you need more detail about that, you'll probably need to do experiments yourself (and it gets into material that's off-topic for this site and is likely to be specific to particular VM software; questions that are specific to particular software tools/packages are off-topic here). $\endgroup$
    – D.W.
    Apr 5 '16 at 18:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.