Performance Evaluation of Xen Vs. OpenVZ
An anonymous reader writes "Compared to an operating-system-level virtualization technology like OpenVZ, Xen — a hypervisor-level virtualization technology that allows multiple operating systems to be run with and without para-virtualization — trades off performance for much better isolation and security. OpenVZ's performance advantage due to running virtual containers in a single operating system kernel can be significant. A performance evaluation study (PDF) done by researchers at the University of Michigan and HP labs provides insight into how big a performance penalty Zen pays and what causes the overheads (primarily L2 cache misses)." From the report: "We compare both technologies with a base system in terms of application performance, resource consumption, scalability, low-level system metrics like cache misses and virtualization-specific metrics like Domain-0 consumption in Xen. Our experiments indicate that the average response time can increase by over 400% in Xen and only a modest 100% in OpenVZ as the number of application instances grows from one to four... A similar trend is observed in CPU consumptions of virtual containers."
Hypervisor — the software that makes the virtualization happen... sometimes means virtualization that runs on bare-metal, rather than under a host OS.
Paravirtualization — I think this just refers to the cases where the guest OS is modified/recompiled to run work without needing to run in Ring 0, and instead changes those to be explicit calls to the virtualization software.
So translated, I think that means "virtualization software that runs on bare-metal, both using unmodified guest OS's, and modified guest OS's."
I use vserver in combination with unionfs, which just rocks.
I can add and remove (semi) virtual machine at will. Each VM feels barely heavier than just an ordinary process.
I take my normal mount points, and make it the read-only layer. I then add a writable layer on top of that and that's it. I've also created some handy scripts that'll let me manage, add, remove, start, stop, etc, VM's.
As somebody that actually has experience setting up and running virtualized systems (I work for a web hosting company) let me add my two cents here.
OpenVZ is ok if all of your child environments run the same OS and you don't care about them stealing each other's resources. We constantly have problems with customers overloading their VPS and causing problems with the other environments, this doesn't happen with Xen. I've fork bombed child environments and caused the load to spike to over 700 until it crashed, dom0 and the rest of my domUs just kept running like nothing was even happening.
OpenVZ also wins if you want to oversell hardware, Xen doesn't have "burstable" memory like OpenVZ does. Personally I prefer Xen for the jailing that it does and you can also run multiple OSes at the same time. I have a server at work that's running CentOS, Windows 2003, Windows Longhorn, and Gentoo all at the same time, OpenVZ only lets you run Linux on Linux.
Here are a few talking points based on my experiences with both Xen and VMWare (ESX Server & Workstation).
1. Cost - no contest, xen wins hands down $0 vs $5000/cpu.
2. Performance - xen wins noticably, i can get away with running 8 virtual machines with 1/4 the hardware that VMWare required for 6.
3. Capabilities - VMware versions ESX GSX and up beat Xen in ease of use and flexibility, anything less and Xen wins. Xen does have a quicker live migration capability, but falls short on conencting external hardware to the virtual machine (something that is trivial in VMware).
4. Stability - about even, maybe Xen. I've seen ESX crash once, and have never seen Xen crash.
5. Ease of use - VMWare no question. Theres a learning curve to Xen and setting up new VM images is a pain. (which is disappearing) There are fantastic tools for VMware that will let you manage virtual machine creation and even migration from a physical box. (some of which can be used to feed xen too =))
The bottom line. A Xen setup (using open source version) that can easily run 12 VMs costs about $2,000 on DIY hardware. A VMWare server/software combo to do the same? about $30,000. Assume an additional 40-80 hours of learning to get up to speed with Xen vs VMware.
The comments above cover the open source / free version of Xen. I have no experience with the commercial Xen offerings.
Personally i'm Xen biased due to cost.
Linux has a lot of great VM options. VMware is a great free (cost) option, and KVM has become a great option very quickly. OpenVZ and VServer are interesting light weight OS "jail" virtualizations. They each have pros and cons, depending on your requirements and apps being used.
I'm setting up my "next generation" home linux server, and looking into the virtualization options for that. Probably a bigger factor than performance is the setup and manageability. I have found Xen to be pretty primitive compared to VMWare.. setup is a pain, documentation is spotty, and support is minimal. The one advantage of Xen is that you can (and often must) do everything with it from the command-line. The GUI tools are weak at best.
I am now leaning towards using VMWare server. But, I still need to do some testing with KVM.. articles I have read about it sound very impressive. KVM paravirtualization performance is supposed to be excellent. But, I don't know about management.
Go the FreeBSD way!
Lousy virtualization, Happy users: FreeBSD's jail(2) facility
Source: UKUUG
Tags: ukuug, presentation, freebsd, jails, poul-henning kamp
Slides (2.7 Mb)
Lousy virtualization, Happy users: FreeBSD's jail(2) facility by Poul-Henning Kamp (phk@FreeBSD.org)
bash$
It's not always about performance; Xen gets each their separate kernel. This means that special adjustments can be made for a virtual machine. Also, with Xen you could easily experiment with an upgraded kernel for the virtual machines, without rebooting the main (host) machine. Finally, I for myself like the fact that you have your 'own' kernel. It feels much more like a real machine. Especially with a bootloader like pygrub, which is employed in RedHat AS and CentOS, the kernel inside the virtual machine can even be upgraded by yum running inside the VM.
Note that I'm not a Xen apologist, I'm not denying a performance hit here.
8 of 13 people found this answer helpful. Did you?
This is a bit out of date, but here is some comparison between Xen, User Mode Linux, and Vmware 3.2 (which is the most recent version that allows publication of benchmarks).
http://www.cl.cam.ac.uk/research/srg/netos/xen/pe
Xen is always faster than Vmware, with the exact amount varying depending on the specific load. They've all improved since then, of course.
qemu runs Win2k. My AMDX2 3800 runs it using kqemu. I happily use it for testing things in I.E. It seems about as fast as my PIII 1Ghz laptop, though I've never actually measured it.
There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
Virtuozzo/OpenVZ and VMWare have strengths in completely different areas.
VMWARE is an excellent DR/BC solution due to complete virtual machine portability. However consolidation ratios (8:1 maybe) and performance are not that great, for consolidation you've probably only saved a few Us, but you have not really helped reduce the support burden, you'll still need lots of middleware / server management software to manage your estate. To actually get the most out of the DR/BC solution you also need an FC SAN and the complete Virtual Centre suite. If you've that kind of money to throw around then clearly you are in it for BC/DR purposes and VMWare is the right option. At this level you don't care if your consolidation ratios are 1:0.9 or worse.
Virtuozzo/VZ on the other hand wins hands down for consolidation and management; you can easily fit 20-30 or more VPSes on a single server; and whatever the consolidation ratio the responsiveness will always be better than the same server under VMWare. However there are some drawbacks, Virtuozzo doesn't give you complete portability; you can only host Windows 2003 guest servers on a Windows 2003 hardware node for instance and you are unable to install device drivers. Adding a new VPS takes about as long and uses about as much resource as creating a new user on a system.
I use both solutions; each definitely have their own place and couldn't be more different in their relative strengths.
Jason
In fact, free OpenVZ has most of what you tell about VMware. Live migration is here, and it does not require to have a SAN or a dedicated NIC, or pay for vmotion. High availability with clustering can be set up (see here). And finally, you don't have to pay a performance penalty if you want virtualization.
The commercial product based on OpenVZ (i.e. Virtuozzo) has all that plus web-based and gui management tools, P2V migration tools etc. etc.
It also makes sense to point out that Xen also has a live migration feature, although I haven't tried it.
-- Kir Kolyshkin, OpenVZ project leader.
VMWARE consolidation tends to be limited by your overall system RAM. I can only assume that you are making very small RAM allocations (128M-192M?) or you have a large amount of physical RAM available (12-16GB?)
Jason.