[conspire] Machine virtualisation, the flavour du jour

Rick Moen rick at linuxmafia.com
Fri Aug 19 12:18:29 PDT 2005

I wrote:
> Quoting Peter Knaggs (peter.knaggs at gmail.com):
> > I'd prefer to focus my energies on studying xen and linux, rather than
> > VMware.
> I've taken quite a shine to Fabrice Bellard's QEMU, as well.

But I haven't yet actually sampled Xen.

The Xen folks, at Cambridge, have some good documentation that casts
_some_ light on the differences among virtualisers, virtual machine
monitors, emulators, etc., e.g., 
on http://www.cl.cam.ac.uk/Research/SRG/netos/xen/performance.html :

  By requiring operating systems to be ported to run over Xen, machine
  virtualization can be achieved considerably more efficiently than
  schemes that rely on trapping faulting instructions or use an
  interpreter or JIT compiler emulating privileged operating system code.
  Of course, the downside is you have to do the OS port, but our
  experience indicates that this usually isn't too time consuming or

  Operating systems running over Xen execute in x86 privilege ring 1
  instead of ring 0, which we reserve for Xen. This prevents guest OSes
  from using the normal privileged instructions to turn on/off
  interrupts, change page table bases etc. Instead, they must make a
  'hypercall' down into Xen to ask the operation to be performed on
  their behalf. This sounds expensive, but with a properly designed
  asynchronous interface the hypercalls are relatively infrequent.

  Rather than attempting to emulate some existing hardware device, Xen
  exports specially designed block device and network interface
  abstractions to guest operating systems, requiring a specially written
  driver. The advantage of this approach is that guest I/O performance is
  excellent: we typically get the same performance on Gigabit Ethernet
  links running over Xen as we do with the native operating system.

This is why -- absent Microsoft Corp.'s cooperation, which will be 
arriving with the next shipment of snow from Hell -- it's not possible
to run MS-Windows[1] or other proprietary OSes as guest OS under anything 
less than a full-PC emulator (e.g., VMware, QEMU in its "do everything"
mode, potentially Bochs) or nearly-full-PC emulator (Win4Lin).  

Somewhere, actually, there's some slightly cranky documentation from
VMware's chief scientist about how VMware is neither of those things,
but I don't have it and don't remember the gist of it.

Anyhow, bearing in mind that benchmarks are a genre of fiction, the Xen
guys have posted some, comparing Xen performance vs. native Linux,
VMware, and User Mode Linux.  I'm surprised at how badly UML is claimed
to perform, relatively speaking.

But this goes some distance towards explaining why Internet hosting
companies are so happy with Xen.

[1] But note this from Xensource:  "the paravirtualized approach we use
to get such high performance has not been usable directly for Windows to
date.  However recently announced hardware support from Intel and AMD
will allow us to transparently support Windows XP & 2003 Server in the
near future. We are working on this and intend to have support available
by the time the new processors are available.

More information about the conspire mailing list