OpenVZ and XEN virtualization technology insight and comparison
Virtualization is a widely used technology nowadays. A whole set of hosting plans is based on it – the so-called Virtual Private Servers (VPS). Unlike shared hosting, a VPS allows full isolation from other users on the host server. It provides full control over the account (i.e., root access), remote reboots and system restoration.
Two of the most popular virtualization technologies are: Xen and OpenVZ. Right now we offer only Xen-virtualized VPS servers. Let’s have a closer look at these virtualization technologies.
Xen is a virtualization engine for x86, x86-64, Itanium and PowerPC platforms. On a number of processors a paravirtualization technique is applied by Xen. This means that the operating systems run on Xen are modified to achieve high performance on a wide range of hardware architectures, which are initially not intended for virtualization technologies. Below you can find the architecture of Xen:
Xen uses one privileged OS to control the hardware resources. This privileged OS must be a Unix-based one (e.g., Linux, FreeBSD, etc.). In the latest versions of Xen the following OSs can be run as guest ones: Linux, Minix, Plan 9 from Bell Labs, NetBSD, OpenBSD, FreeBSD, OpenSolaris, NetWare, GNU/Hurd/Mach, OZONE.
OpenVZ is an open-source virtualization engine on the x86, x86_64, and IA64 processors. OpenVZ, itself is built on top of Linux. Unlike Xen’s paravirtualization technique, with OpenVZ virtualization the operating environment is virtualized instead of the hardware. Thus, while there is only one operating system kernel, multiple programs run in isolation from each other within the single OS instance. OpenVZ is easily portable across different architectures, since 95 percent of the code is platform-independent. The basic architecture of OpenVZ is shown here:
Differences and Similarities
Both systems present the user with the following benefits:
- increased utilization
- rapid provisioning
- dynamic fault tolerance against software failures (through rapid bootstrapping or rebooting)
- hardware fault tolerance (through migration of a virtual machine to different hardware)
Additionally, both Xen and OpenVZ provide the ability to securely separate virtual operating systems. However, this feature is implemented through different techniques in these two virtualization solutions. Xen provides full fixed isolation, where the initially assigned quotas are kept throughout the entire functioning period, and additional requests for memory are processed using the swap space on the HDDs. OpenVZ, on the other hand, provides semi-dynamical assignment of resources. Such terms as burstable RAM and resources exist in OpenVZ. Therefore, unlike in case with Xen, VPSs based on OpenVZ may also take advantage of the free resources of the server. This can result in better usage of the resources of the carrier hardware.
The virtualization overhead observed in both OpenVZ and Xen is limited. However, in both cases the performance levels of the virtualized environment, as compared to the real hardware, are of acceptance-quality level. Specific figures depend on a great number of factors and cannot be summed up for the general conclusion.
Unlike OpenVZ, XEN has the ability to support legacy software as well as new OS instances on the same computer. That means that proprietary systems can be installed on a Xen-based carrier without any additional modification if hardware-assisted virtualization is used. OpenVZ provides compatibility only in the frame of the alike kernel such as various distributions of Linux OSs.
Both provide great and relatively equal check pointing and live migration options.
Both engines are based on the Unix OSs, therefore, they have great scalability. For example, in case of OpenVZ which employs a single kernel model, it is as scalable as the Linux kernel. Such kernel supports up to 64 CPUs and up to 64 GB of RAM (on 32-bit with PAE). A single container can scale up to the whole physical system, i.e., use all the CPUs and all the RAM.
The peculiarity of OpenVZ is the mass management support. An administrator (i.e., root) of an OpenVZ physical server (carrier) can see all the running processes and files of all the containers on the system. That makes mass management scenarios possible. In case Xen is used for server consolidation: In order to apply a security update to 10 virtual servers, an administrator is required to log into each one and run an update procedure. Since VPSs are normally intended for different users with their own projects, this is not an issue for Xen-based virtualization. However, the fact that with OpenVZ a simple shell script can update all containers at once greatly eases the management of the entire system.
It is obvious that both XEN and OpenVZ are outstanding virtualization systems and provide a sufficient number of features to support an entire type of VPS plans. Each of the engines is aimed at solving a specific set of tasks, which they successfully do. Xen is a technology mainly aimed at providing the maximum approach to the full virtualization and full separation of virtual machines on the hardware carrier. It is also aimed at supporting the maximum range of existing operating systems. Also, if your software is intensively using CPU memory, then we would advise you to choose XEN virtualization. OpenVZ, on the other hand, is a system specifically aimed at Linux-based virtual environments. It provides good dynamic resource sharing and isolation tools, which leads to higher server utilization figures. In practice, XEN will greatly suit for voip, proxy, vpn servers and unoptimized sites, and OpenVZ will be a good solution for databases and mail servers. Both engines show great performance.