Introduction
This site aims to be a guide to the various virtualization solutions,
focussing on the x86 architecture. It provides detailed technical insight
into the different approaches and compares them. Focus lies on open source
applications or free-of-charge software.
What is virtualization?
The short story: Virtualization allows to share the resources of a single
machine (called: Host) among several separate operating systems (OS).
Resources in this context include the CPU, memory, system level hardware
(like timers and interrupt controllers) and I/O devices like network cards
or storage devices (hard disks). The virtualiation core software
(called: Hypervisor) provides the running OSes an abstraction which
allows them to run concurrently at the same time on one machine.
What is not virtualization?
The term virtualization may be used in conjuction with other terms, this is how they differ:
- Emulation:The target machine instructions are interpreted one by one, allowing running software for one machine (or architecture) on
a different machine (like PowerPC code on x86, x86 code on a Sparc). This
is usually quite costly and thus slow. Some performance issue can be
overcome by using Just-in-Time compilation afterwards, but generally you
should ook at real virtualization if you don't need to run on another
architecture. Most prominent application
here is QEMU. Advantages lie in the easy setup, since most emulators are
pure userspace applications. Security is also better, since every command
is under the control of the software and a crash will only affect the
emulator, not the whole host machine.
- Simulation: is used to rebuild a system which is as close as
possible to the original hardware. Simulators can be even cycle-accurate,
providing detailed timing information. Virtualization does not care about
the instruction timing, it aims to run as fast as possible. Some
instructions may need much longer than others. One representative of this
is SimNow.
- Container virtualization: Often called operating system level
virtualization. All guests run under one OS kernel (which is sometimes
a limitation). The view of resources of other guests is limited (like
processes or open files). Usually the file system is chroot'ed. Very fast
execution since virtually no overhead. Isolation between the guests is
usually limited. Prominent system here is OpenVZ.
History of Virtualization
Although Virtualization seems to be a more recent IT topic, the foundations
go back into the 1970s with IBM hardware. To have a reason to sell large
computers to the customers, they provides means to partition their
large mainframes into several smaller units which ran independent instances
of the operating system. Virtualization support was in the whole hardware,
not only in the CPU.
Talks (currently in German only)
Chemnitzer Linux-Tage
Themenabend Virtualisierung (Chaos Computer Club Dresden (C3D2))
Chaos Radio Express Podcast (CRE092): Virtualisierung
more infos and download
The following benchmarks provide an overview of the performance you can expect
from the various solutions in various scenarios. Since serious benchmarking
is a very complicated topic, please keep the following items in mind:
- Most of the benchmarks are relative to native performance. Running the
benchmark without any virtualization with an operation system running natively
and exclusively on the machine sets the base line to 100%. The same machine
is then running several (ideally all) virtualization tools while keeping most
of the parameters the same (same software stack, identical operations system
version, ...). The performance is the compared to the native one and the
percentage is shown.
-
Virtualization performance depends very much on your usage scenario. The numbers
are only valid for this specific benchmark. Other uses, even when similar to
the one in the benchmark, can show different (even dramatically) results.
I will try to describe what subsystems the benchmarks stress so you should get
an impression which benchmark comes close to your application.
-
Although virtualization tries to abstract from the host hardware, the benchmarks
can be sensitive to used machine. Relative benchmarking should sort out most
of the problems, but architectural differences (like memory bandwith, cache
performance) and different hardware virtualization extensions can results in
different numbers on your machine:
So be warned: Your mileage may vary...
Stressing the FPU by calculating Pi by using a taylor sum
approximation (Linux source code).
Please don't use this if you want to compute the value of Pi,
this one converges very slowly, but does a lot of self contained computations
using only very little memory. This should show a performance very close to
100% on any real virtualization solution (since only user space code without
impact on memory performance).
Stressing the FPU and the memory interface by rendering the benchmark scene
(benchmark.inc) provided with the Persistence of Vision raytracer. There should
be no I/O (the resulting image is discarded), but a high memory usage.
kernbench stresses the
system by compiling a Linux kernel. This loads the CPU,
has a lot of memory accesses and does I/O to load source files and headers
and to store the resulting object files. Besides that many processes are
created and destroyed, resulting in very frequent system calls.
The numbers were gathered while compiling a stock 2.6.25.3 Linux kernel with
make allnoconfig
on a Linux RAM disk (tmpfs) (to avoid real hardware
I/O). The kernel was compiled five times in a row (plus a warmup run) and was
only using a single job: kernbench -n 5 -s -H -O -M