Xen and OpenVZ can be seen as one of the same both being virtualisation technologies they are actually very different. As a lot of you know Crucial Paradigm has been offering Xen based virtual private servers for some time now and to date we’ve built up a solid name for ourselves due to the stability and performance of the product we offer.
Moving forward however we’re in the process of deploying other vitalisation technologies and these include OpenVZ and a VMware Enterprise Cloud Hosting solution which I am really looking forward to! One thing to note is that we’re releasing these ‘flavours’ of virtual servers not because one solution is better than the other but because they each can serve you better/differently depending on the appliance and your requirement.
In this article I’ll shed more light on the Xen Vs. OpenVZ battle that is currently ongoing and by the end of this article I hope that you will have a better understanding of the two.
Both are virtual technologies are offered free, Open VZ is the free version of Parallels Virtuozzo while Xen does have its big brother Xen Enterprise which includes cool features like HA (High Availability) and clustering but of course it does come at a price . Let’s now break down what makes Xen and OpenVZ different to each other.
Xen is what we call a para-vitalisation platform and it is the closest you can get to hardware emulation. It works by creating an interface between the environments operating system and the hardware of the node server. Ok so what does this mean? Well put simply it gives you the feel, and behaviour of a dedicated server. You can completely customise your Kernal and even upload your own modules, your memory and disk space is also guaranteed and the end result is a predictable and stable virtual server. Crucial Paradigm offers Linux and Windows based Xen virtual servers as well as our budget product the Xen-VSALE Virtual Server. OpenVZ on the other hand is what we call an operating-system virtualisation technology meaning that each virtual server is basically a layer over the underlying Operating System, in the case of what Crucial Paradigm offers, Centos. This technology is based on a single Linux Kernal which has been modified to support multiple virtual server environments. The Kernal isolates the file system and memory along with each virtual server running on the host node. This method can allow an OpenVZ virtual server to perform faster than a Xen based virtual server due to its simplicity and lower overheads however this benefit can soon disappear if your host decides to oversell the resources on the host node which unfortunately does happen relatively a lot, I’ll touch on this overselling ability later in this article.
Below are two images of how Xen and OpenVZ actually work.
The key differences between Xen and OpenVZ
There are a number of key differences between the two competing technologies, these include:
- Memory allocation
- Firewall Configuration
- Custom Kernals
- Virtual Server Isolation
Memory, Memory and more Memory
Xen Memory Model
If you have a Xen VPS with 512MB of memory then what you have is a VPS with 512MB of memory, just like you would have on a dedicated server. The resources are real and have been allocated to you and only you,, it’s that simple! Now what happens when the server runs out of memory? Well it will start to swap just like your old dedicated server or the PC your using to read this article. Each VPS is allocated the same amount of swap space as RAM so a 512MB VPS will also have 512MB of Swap space but before you jump the gun and think that you essentially have 1GB of accessible memory just remember the swap space is your actually your hard drive space and when your VPS is constantly running low on memory and swapping like mad you will see a considerable performance decrease with your VPS. Fortunately this is something that you can see happening (Xen is predictable remember). Swap space should not be seen as additional RAM but rather as a warning alarm that your VM is running low on memory and it could be time to upgrade.
OpenVZ Memory Module
OpenVZ/Virtuozzo allocates memory differently to Xen (remember this is an OS level virtualisation technology) I’ll briefly explain how memory is allocated. If you have a 256MB VPS you will actually see available RAM of around 230MB this is named “privvmpages” the other 16MB (give or take) is allocated to “kmemsize” and other various resources. One issue that can arise with OpenVZ is when “privvmpages” runs out and the host node is oversold, instead of slowing to halt the VM will run out of memory and crash (think 747 losing its wings and falling from 35 thousand feet). Now I know you’re probably asking ‘what about burstable memory wont help this prevent a crash?’ Well OpenVZ does allow you to burst your memory and it’s recommended to set this to 2 x ‘privvmpages’. Having 2 x burstable memory doesn’t actually mean that you will have access to this memory however, this memory is drawn from other VM’s when they aren’t using all their memory and it’s great in theory however it does make the VPS less predictable and of course if you host is overselling you can run in to issues. Crucial has started offering OpenVZ on our VSALE range of servers and we are also looking to offer OpenVZ on our Cloud range in the coming months. If you would like to register your interest in testing the product please email us.
OpenVZ/Virtuozzo doesn’t allow full access to iptables, this can cause headaches when you’re trying to firewall your VPS, Xen on the hand does not have this limitation.
Xen allows you to have custom Kernals so each VPS that is created on the Node can be unique. OpenVZ on the other hand shares the same kernel for all VPS instances, you might argue that the ability to have custom kernals on Xen also provides increased security.
Due to Xen had capping resources such as RAM and Disk Space what you end up with is an isolated VM, you never hear about Xen VM’s bringing down or affecting other VMS’s on the host node. With OpenVZ people may argue that you see slightly better performance however any performance benefit can quickly disappear if your VPS provider is overselling the resources on the Node and other VM’s are constantly bursting their RAM limits.
Is one really better than the other? No, it really depends on what you’re after, I personally prefer Xen because performs and feels like a ‘dedicated server’, Xen offers predictable performance, isolation and customisation and that’s what’s important to me however if you’re after a fast, simple Virtual Server OpenVZ may be what you’re looking for and Crucial will soon be releasing OpenVZ on our Cloud range of Virtual Servers but of course the proper way, non oversold, solid performing Virtual Servers just like were known for.
|Hosting Options & Info||VPS||Web Solutions & Services|