8

I am upgrading my shared hosting to VPS hosting, mainly to just add server administration skills to my development skills, so I'm facing a lot of new choices just signing up.

I need to choose a virtualization platform, either Xen or OpenVZ.

From what I can tell, OpenVZ is more "user-friendly", but other than that I can't really tell a difference.

I'm going to choose Ubuntu Linux, just because I believe it is the most user friendly and very popular, and I assume both Xen and OpenVZ work equally well with it.

For my purposes of "learning how to administrate a server" which do you think would be more appropriate, Xen or OpenVZ?

splattne
  • 28,348
  • 19
  • 97
  • 147
Edward Tanguay
  • 1,139
  • 4
  • 20
  • 30

8 Answers8

8

They are pretty dramatically different technologies. Xen provides full virtualization and varying degrees of paravirtualization. OpenVZ, on the other hand uses a container model, without any hardware or system virtualization.

OpenVZ is more efficient, from a memory usage perspective, than Xen, because the host kernel is shared across all guests. Xen provides greater separation. Xen is also historically more reliable. OpenVZ has a long-standing memory allocation bug, possibly related to memory fragmentation, which can pop up in the strangest of places and lead to processes dying unexpectedly. If you always overspec memory and don't "oversell", I believe this problem can be mitigated, but I haven't done enough experimentation to know.

OpenVZ is definitely not more friendly than Xen, in my experience. Also, the available tools (both free and commercial) for managing and interacting with Xen are dramatically better. Citrix, Red Hat, and many others have cool tools for interacting with Xen instances, and many Open Source projects have begun to integrate Xen related features. The uptake for OpenVZ is much lower, at least from top-tier vendors and projects.

That said, you've claimed your purpose is to learn...so, try them both. It won't hurt to understand how two very different virtualization technologies work.

swelljoe
  • 1,414
  • 8
  • 12
7

One major difference between Xen and OpenVZ is that with Xen, there is no overselling.

When you get a Xen VPS with 512M RAM, you get 512M RAM.

With OpenVZ it's all kinda smoke and mirror. The host might claim "Guaranteed RAM: 512M" and "Burstable RAM: 1G" but in reality there's no way to guarantee anything with OpenVZ. Depending on what other VPS accounts on the same server is doing, you may or may not (most likely not) get 512M RAM despite the "guarantee".

Many (most?) hosting companies oversell their OpenVZ VPS. With a 8G RAM server they might put in 16 VPS accounts each with a "guaranteed" RAM of 1G.

This is why most VPS out there are OpenVZ-based and OpenVZ VPS are generally cheaper than Xen VPS.

Continuation
  • 3,050
  • 5
  • 29
  • 38
4

I'm using OpenVZ on my servers (I used to run Xen before). It's not real virtualization like Xen or KVM. OpenVZ is runing multiple isolated instances (containers).

It's much easier to maintain, and performance overhead is near zero.

If you want to use OpenVZ and Ubuntu, use 8.04 LTS because there is official OpenVZ kernel image.

miHost
  • 183
  • 2
  • 6
4

We are generaly using OpenVZ in our hosting solution, because it's easier to maintain than Xen solution. But if you need to host something different than linux, then OpenVZ is not your choice. I can advice you an interesting project pve.proxmox.com This project uses KVM ans OpenVZ to provide full variaty of service, you can host non-Linux OSes under KVM ans Linux OSes under OpenVZ. And It's very easy to start with it, cause it have "Baremetal installer", that works from the box.

2

OpenVZ is not full virtualisation, you're only running one kernel that's shared between all VM's. It can be a good way to consolidate multiple hosts that share the same OS, but it's not a general suolution.

Apart from Xen there's also KVM which is maturing quickly, if you're willing to base of 9.04 then you could consider it production ready.

Lastly Sun's VM platform is maturing and could also be an option.

If you want simple, full, windows capable virtualisation the free VMWare ESXi is still the best way to get it.

LapTop006
  • 6,466
  • 19
  • 26
2

I use XEN at work and home and haven't had problems with just using it in a long while. Haven't touched OpenVZ, and don't know anything about it's community scene.

Hopefully, both will be dead in a couple years in favor of KVM, so I don't know that it really matters. The main reason for XEN was simply the fact that it's the official RHEL 5.3 way to do virtualization.

James Cape
  • 1,067
  • 8
  • 16
  • 3
    Erm, why is it hopeful that both Xen and OpenVZ will be dead in a couple of years? Both provide very useful benefits that KVM does not (and will not or cannot provide) and have good reasons to exist. Please research and understand why a technology/program exists before declaring it obsolete. – Christopher Cashell Jun 15 '09 at 15:28
  • 1
    It's hopeful because the fewer redundant options for virtualization the better. I have been using XEN for two years, and would still like an official version that doesn't require a massive ugly stupid kernel patch to work. The Linux kernel has enough stability issues without a giant third-party patch getting dropped on top of it. – James Cape Jun 16 '09 at 02:42
  • 3
    None of the three are redundant -- they solve different problems. Xen provides a bare-metal hypervisor, which can use several different OSes as a service domain (patched Linux, various BSDs, Solaris...), KVM provides a hypervisor strongly tied to Linux, and OpenVZ provides lightweight containers for Linux rather than a hypervisor. – Stephen Veiss Aug 01 '09 at 03:55
1

If you don't have to mess with the install of Xen, go with it. It provides better performance and security isolation. It's performance is pretty much on par with OpenVZ (maybe a bit lower).

Xen handles really well situations where you have one VM trying to overload everything while I am not so sure how well OpenVZ handles that.

But, in the end, you are right, you probably won't see a difference.

Antoine Benkemoun
  • 7,314
  • 3
  • 41
  • 60
-1

In general everyone prefers Xen. If you want to choose a VPS then most probably you will try to find a cheap XEN based hosting.

However if you want a shared hosting environment then you can go for OpenVZ but make it less pricey.

Always XEN is best i guess ( IMO )