Since 2bits moved into using VPS (Virtual Private Servers) when Xen became available we did not have to directly use other technologies, such as Virtuozzo, OpenVZ (free version of Virtuozzo), or the older User Mode Linux.

However, two recent cases proved what we have suspected for a long time: that indeed Xen is superior to competing technologies when it comes to performance.

In one case, a client contacted us for tuning a slow system. The system gets some 75,000 page views per day on weekdays, and page generation times were 2 seconds or more, and was running on a Virtuozzo host.

2bits cloned the site on a test machine ran timing benchmarks, and found that it peformed faster on the test machine. Then we cut off the external traffic from the live machine using Apache LIMIT directives, and found that page generation times have not improved. Our recommendation to the client was to move to another host. They chose to go for a dedicated server, and that solved their problems.

In a second case, someone posted a request in the forums, where he was getting page generation times of 2+ seconds, while the query components were only 700-800 ms. Upon checking the output of phpinfo, it was apparent that they used OpenVZ. The user was trusting enough to send over a copy of the site's database and files, and we installed it on a Xen VPS.

The results were page execution time of 300 to 600 ms on Xen, as opposed to 2000+ on OpenVZ.

So, the advice is: for Drupal hosting best performance: use Xen if you want a VPS. Avoid Virtuozzo and OpenVZ.

Update

Over the past few years, we have seen more and more clients who complain about poor performance and they ended up being on Virtuozzo. A common theme was the vzfs file system, which virtualizes the host's file system and shares it across the guest instances. This saves a lot of disk space, but from what we have seen, access to the disk is slow. Therefore, database queries are slow, and even serving cached HTML pages from boost is slow. If you are using Virtuozzo, and your site is slow, check to see if you have any of these signs.

Comments

Wed, 2007/12/05 - 10:04

You can not compare XEN with OpenVZ without detailed comparison of resources allocated to the virtual host. OpenVZ vm's by default are installed with very little resources and sometimes it is even impossible to install larger software - like java into those.

Therefore you need to examine /proc/user_beancounters and make sure that there are not any bottlenecks for your application.

Look in OpenVZ wiki for more information:
http://wiki.openvz.org/Resource_shortage

Thu, 2007/12/06 - 14:59

Well, at the risk of flogging a dead horse, I think any discussion about virutalization comparisons should reference:

http://wiki.openvz.org/Introduction_to_virtualization

My understanding is that OpenVZ/Virtuozzo is fundamentally different from Xen in how it does 'virtualization', so really, the issue is whether either technology is somehow more appropriate to Drupal. Obviously, generic comparisons can be made in favour of either, depending on your setup.

I think it would be fair to say that most of the time, there's no significant difference. I would guess that if the server's not overloaded, chances are VZ would have a slight edge. I think the key question your tests raise is: does Xen handle overload better? I'd bet your examples don't demonstrate this at all, but it's still a fair question.

From looking at your various examples, I'm going to wager that Xen degrades better because it can guarantee resources - i.e., the server can't get clobbered as easily by another virtual server on the same physical machine.

The flip side of this is that if you're lucky enough to have a VZ server on a mostly empty machine, then you can take better advantage of it.

So, if you've got issues running Drupal on a server and it's a VZ virtualization, moving it to Xen will probably work, but only because you're changing hosts!

Tue, 2007/12/18 - 11:11

Xen just can not be faster than OpenVZ/Virtuozzo, that's nonsense.

Apparently in those cases you haven't configured OpenVZ/Virtuozzo resource management properly, thus applications experienced resource shortages which is the reason of the slowdown.

Let me give you a clear example: it's like driving a sport car with manual gearbox, using only the low gear. The problem of slow car is you have to upper the gear while you increase the speed. Instead, you use a truck, and now claim that the truck is faster.

This article should help: wiki.openvz.org/Resource shortage

Wed, 2008/11/05 - 05:46

Your comment based on zero personal experience with Xen and based totally on your biased assumption is the nonsense here, not that Xen is superior which it is. Nothing is superior no matter what hardware you are running than running Linux on Xen. Hardware issue is only brought up by Microsoft and VZ lovers who still hang on to old crap without even personally testing new stuff coming out which are far superior. And you point people to a crap written by VZ.org? That's absolutely laughable. Read again, Linux and Xen far superior to Microsoft and VZ.

Sat, 2010/03/20 - 10:39

I use Xen at home due to OpenVZ not keeping up with the latest kernels. But Im perplexed how you use two different hardware platforms to suggest one method of virtualisation is better than the other.

To make it a fair test, you need two identical pieces of hardware one with Xen and one with OpenVZ then your argument has weight.

I've enjoyed reading other parts of this sites, but this particular article is utterly pointless because you gave zero indication what kind of hardware these servers were on.
If you compare an OpenVZ machine that shares a slow single core CPU between 10 VMs to a dedicated server with two quad cores of course the VZ is gonna loose.
Since you didn't give ANY information about hardware we have to assume that the differences you noted are entirely down to having stronger hardware in the Xen and the dedicated servers :(

Mon, 2009/01/19 - 14:23

This whole thing is rubbish - show benchmarks on the same hardware with the same loads.

So far the only empirical evidence presented is the HP study which says OpenVZ is faster.

I am not pro MS nor pro VZ, but in this case you have not presented anything other than circumstantial claims that Xen is better. Justify it.

Wed, 2010/01/06 - 05:59

We vote for Xen we are running small VPS hosting company and I can say xen is the best virtuazliation ever we added http://hostbillapp.com to vps provisioning and we are reall happy for that.

Wed, 2010/04/28 - 09:33

I did a basic comparison of Wordpress, Drupal, and some hand coded scripts. And it's apparent that modern cmss are system hungry.

Looking at some articles, people are struggling, running their sites on small VPS instances. They are abandoning apache for nginx and using other tricks to squeeze out more performance.

Whenever I express concern about memory usage, I'm told that you can just throw more hardware at the problem as it's cheap.

Using over 32MB to render out a basic page - What!

This all seems grossly inefficient.

I wanted to use Xen, but discovered OpenVZ by luck, as our server could not run Xen, due to it's age. That might be a consideration for some.

Wed, 2011/05/18 - 06:39

Yes, I agree..
The performance of Xen is far more better than any other thing.
If you compare an OpenVZ machine that shares a slow single core CPU between 10 VMs to a dedicated server with two quad cores of course the VZ is gonna loose.
I have found this post very interesting..
Looking forward for more posts from you...

Pages

Is your Drupal or Backdrop CMS site slow?
Is it suffering from server resources shortages?
Is it experiencing outages?
Contact us for Drupal or Backdrop CMS Performance Optimization and Tuning Consulting