<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>TLF Blog &#187; Virtual Private Servers</title>
	<atom:link href="http://thelinuxfix.com/blog/category/hosting/virtual-private-servers/feed/" rel="self" type="application/rss+xml" />
	<link>http://thelinuxfix.com/blog</link>
	<description>Hosting, Unix, and everything in between.</description>
	<lastBuildDate>Thu, 16 Feb 2012 23:20:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>OpenVZ vs Xen: Some VPS Basics</title>
		<link>http://thelinuxfix.com/blog/2011/10/27/openvz-vs-xen-some-vps-basics/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=openvz-vs-xen-some-vps-basics</link>
		<comments>http://thelinuxfix.com/blog/2011/10/27/openvz-vs-xen-some-vps-basics/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 18:39:12 +0000</pubDate>
		<dc:creator>Steven</dc:creator>
				<category><![CDATA[Virtual Private Servers]]></category>
		<category><![CDATA[OpenVZ]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://thelinuxfix.com/blog/?p=85</guid>
		<description><![CDATA[Taking sides in the great virtualization debate: If you&#8217;re looking to virtualize a server of your own or to pick up a VPS, you&#8217;ll probably be picking between these two staples of the virtualized world.  Each technology has its pros and cons, and your decision may change based on your needs as a sysadmin or [...]]]></description>
			<content:encoded><![CDATA[<h2>Taking sides in the great virtualization debate:</h2>
<p>If you&#8217;re looking to virtualize a server of your own or to <a title="Linux VPS by The Linux Fix" href="http://tlfhosting.com/virtual-server">pick up a VPS</a>, you&#8217;ll probably be picking between these two staples of the virtualized world.  Each technology has its pros and cons, and your decision may change based on your needs as a sysadmin or a user (Spoilers: We chose OpenVZ).  Xen and OpenVZ differ in how they virtualize servers, manage memory, and more!  I&#8217;ll try to give a little more in-depth analysis of the differences to help you decide which method is right for you.</p>
<p>The first big difference comes right down to fundamental design goals.  They are different down to the core!  Neither system is full virtualization (virtualized bios, hardware, os, everything). Xen is a hypervisor (or paravirtualization), OpenVZ is container (or OS level) virtualization.  The simple explanation is that a Xen hypervisor runs an OS that knows it&#8217;s being virtualized.  Each user is seperated and running their own OS/system, all on top of the master virtual controller (or Hypervisor).  OpenVZ uses the same underlying OS for each of the users.  The containers are all isolated and separated from each other, but using the same underlying OS.  It creates a kind of OS level &#8216;jail&#8217;.  If you&#8217;re unfamiliar with these concepts, don&#8217;t worry, it&#8217;s not as bad as it sounds!</p>
<p>This intro is getting wordy.  Time to break out some headers!</p>
<p>&nbsp;</p>
<h3><span id="more-85"></span></h3>
<h3>Virtualization (The Underbelly):</h3>
<p>Xen&#8217;s hypervisor basically sits over the hardware, and acts like a hardware virtual manager.  The &#8216;guest systems&#8217; that run on the hypervisor know they&#8217;re on a virtualized system, but are still able to function as wholly separate entities.  This means you can run just about any OS or setup regardless of what the base level system is running.  This lets you do fun stuff like running a Windows VM on a Linux box, or run a different kernel in each guest.</p>
<p>OpenVZ containers don&#8217;t try to virtualize the hardware.  Instead, it uses a special kernel to isolate processes and resources.   Every guest runs on top of the same identical system, but they are fully separated from each other (still have their own filesystems/processes).  Everyone has the same kernel, and you can&#8217;t run different OS types on the same machine (can&#8217;t support both Linux and Windows VMs).</p>
<p>From this limited information, Xen is clearly more versatile.  But wait, I don&#8217;t use Xen.  &#8216;Why not?&#8217;, you ask in a haughty voice.   I&#8217;m getting to it.</p>
<p>&nbsp;</p>
<h3>Overhead (Isolation vs Ease of Use):</h3>
<p>To keep things simple (and relevant), I&#8217;ll just be talking about 64-bit systems.  Xen does some pretty complicated stuff to make sure x86 architecture works just the way they wanted it to, and it&#8217;s impressive enough, but it adds more overhead to the process.  Not wanting to hold that against them, I&#8217;ll keep my discussions relevant to x86_64!  Oh, you only care about 64-bit architecture?  Good on you, mate!</p>
<p>Here personal preference is king.  Xen is much more virtualized, which comes with some nice pros to its cons.   It isolates its resources for you (more on this later).  This also allows custom/different kernels, since each guest is basically a wholly different environment.</p>
<p>But there is a cost in doing all of this.  Xen uses significantly more resources in overhead to create/maintain seperate instances for each VM.  OS level virtualization means many basic components exist once on the machine, and are used by all guests (like the identical kernel).  OpenVZ also uses one filesystem with chrooted environments, instead of fully separated Xen file systems.</p>
<p>If you&#8217;ll need a system with a custom kernel or want to load kernel modules,  stop reading now.  That decision pretty much makes itself, you&#8217;re a Xen fanboy now.  Get your hat on your way out of the lecture.</p>
<p>But with a single kernel, and a more manageable file system making backup/recovery easier, I find OpenVZ more manageable as a sysadmin.</p>
<p>&nbsp;</p>
<h3>Memory Management (The Gamble):</h3>
<p>Here is the real meat and potatoes of this debate.  Xen&#8217;s dedicated memory and swap space, versus OpenVZ&#8217;s density and burstable memory.</p>
<p>It comes down to Xen&#8217;s swap space use versus OpenVZ killing processes.</p>
<p>With Xen&#8217;s isolation, you get your own section of memory.  It is quartered off for you, and nobody else has write privileges to it.  If you max out your memory, it&#8217;ll dump over into swap space so nothing crashes.  The problem on a shared server is that even though disk filesystems and swap spaces are isolated, disk I/O is not.  When people start bursting into swap space, it can cause the exact problem that Xen was intended to isolate around; bad VMs affecting the performance of other VMs.  Sure, your Apache will keep on kicking, but it&#8217;s going to run terribly, and may cause problems for the rest of the machine.</p>
<p>With OpenVZ, you are given a guaranteed amount of memory.  Since it&#8217;s not fully isolated, it&#8217;s a part of shared memory on the server.  Everyone has their guaranteed memory in the same pool.  There&#8217;s also (typically) burstable memory.  If memory isn&#8217;t being utilized, others who need it for a short time can burst up into extra memory.  If guaranteed memory is required somewhere else, this optional burst memory will fail away, and the memory will be allocated to fill a guaranteed quota.  But if you suddenly have no memory where memory once was, things die.  The problem is, they sometimes don&#8217;t die nicely.   No swap space with OpenVZ, so things die, and you don&#8217;t get a lot of control over what dies.</p>
<p>So we have a stability versus performance issue!  Or do we&#8230;.</p>
<p>&nbsp;</p>
<h3>Conclusions (tl;dr):</h3>
<p>I like OpenVZ.  I like the low overhead on containers and the performance is great.  The problem with OpenVZ is over-allocating memory.  You may notice on our VPS plan descriptions that we don&#8217;t talk about burstable memory.  That&#8217;s because we don&#8217;t allocate burstable memory.  We take a stability approach to our VPS.  OpenVZ won&#8217;t allocate memory it doesn&#8217;t have.  It&#8217;ll throw an error and stop new processes from spawning, but you will know about the problem before it accidently kills off Apache or MySQL.  It won&#8217;t bring down the whole house of cards, nor will it put the burden on everyone.</p>
<p>As an admin, I like using OpenVZ for it&#8217;s natural performance benefits, and managing memory with a more Xen approach.  It&#8217;s served me, and our customers, very well.</p>
<p>As a user, I suggest two good options.</p>
<ul>
<li>Use Xen because you need it (custom kernel, different OS, etc)</li>
<li><a title="Virtual Private Severs by The Linux Fix" href="http://tlfhosting.com/virtual-server">Find an OpenVZ vendor who doesn&#8217;t oversell their resources</a> (I suggest The Linux Fix!)</li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://thelinuxfix.com/blog/2011/10/27/openvz-vs-xen-some-vps-basics/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

