Xen? (was Re: [wellylug] Mailing List & Webserver)

Ewen McNeill wellylug at ewen.mcneill.gen.nz
Sun Feb 19 08:48:28 NZDT 2006


In message <43F56EED.8010306 at cliffp.com>, Cliff Pratt writes:
>Ewen McNeill wrote:
>> [...] At some point I'll probably move it to a Xen instance on my DL380.
>> 
>What do you think of Xen (well it must fit the bill or you wouldn't use 
>it, I guess). Have you tried other VM solutions, eg UML?

I've used VMware, UML, and QEmu, as well.  

UML is a clever idea, and fairly widely used, but has a relatively high
performance overhead.  It's not as bad as it used to be (through various
host kernel drivers), but it's still a noticable overhead.  (I've found
UML to be particularly bad at disk IO; user mode CPU bound programs and
network bound programs seem less affected.)  UML is obviously limited to
Linux only, and requires a custom compiled host kernel and guest kernel.

VMWare and QEmu are full PC emulators (CPU, virtual devices, etc).
As such they can run anything with some sort of support for their emulated
devices (fairly commonly used network, graphics, sound, etc cards).
VMWare was there first.  Other than being proprietary (and moderately
expensive these days) it works quite well and is fairly efficient.
VMWare Player (gratis) also works quite well, although for Windows you
really need the VMWare Windows device drivers and you don't get that
with the Player version.  (But if someone with a more advanced version
of VMWare built up the Windows VM, then gave it to you, you'd get the
drivers too which should be okay.  VMware also seems to struggle with
windows 98, et al, which need a regular timer interrupt for various
events, these days.  They used to work well.)

QEmu works surprisingly well if you can throw enough CPU at it.  It's
quite handy for testing operating systems which haven't been ported to
anything else.  The full CPU emulation is obviously rather inefficient,
but aside from that most things work as in an ordinary PC.  It also
appears not to suffer from disk IO issues (unlike UML) from what I can
see.  There's a binary-only (gratis) CPU emulation module which
apparently makes things run a lot faster, but I've not tried that and
thus far haven't felt a great need.  It's amazing what throwing 1.8GHz
of CPU power at a problem and only needing 200MHz of emulated power will do.
QEmu is quite handy as a VMWare replacement, for testing things which
run on "a PC" and haven't been ported to anything else.  I also use it
for build environments for non-Linux OS.

Xen seems to be the most promising of the hypervisor options (thin
device management layer) which allows running any operating system which
has been ported to its hypervisor (Linux, NetBSD, and the latest
development snapshot of OpenSolaris).  The approach offers a lot of
efficiency (eg, it doesn't have to emulate the CPU), providing you
can deal with the need to port to the hypervisor (relatively simple from
what I can tell).  I believe someone is working on a HAL for Windows to
work with Xen as well.

On the other side there are things like chroots (which I use for some
build environments and tests), and things like Linux Vserver which is
basically chroots on steriods (more like FreeBSD Jails or Solaris
Zones).  Basically they partition off some IP addresses, some memory
space, some processes, etc, into their own little bit, so that they're
tidier and more secure than a chroot.  Of these VServer and Solaris
Zones seem the most complete.  I think Solaris Zones even have CPU
limits, which none of the others do.  All of this runs under one kernel,
so it's most suited to issolating specific processes for security.

I think we're getting quite close to the "mainframe" approach being
practical with "PCs" -- ie, one large highly redundant box, and lots of
virtual machines on it for most common tasks.

Ewen




More information about the wellylug mailing list