2

I just heard that a Xen VPS will consume a lot less ram than an open VPS server and i'll have a lot of free memory to expand! Is this true?

1 Answer 1

4

It will not consume a lot less ram, it just has a very different approach to virtualization and memory management.

When running on Xen you will have a standalone kernel. This means on the host you will be able to run different types of operating systems with different kernels. With OpenVZ you will share a kernel with the host. This means only virtual machines running the same kernel version as the host will be available for use.

Now this means that with Xen you have swap space and with OpenVZ you just don't. Xen limits you to the available memory that was given. Once you go over that amount you start swapping. It acts very close to how a normal physical machine works.

OpenVZ has guaranteed memory, this memory is yours and you can always depend on it on the other hand OpenVZ doesn't have swap, so what happens when you reach your memory limit? There will be burstable memory. This memory is unused memory on the host that is temporarily allocated to your VM.

Now here's the catch, when an OpenVZ server is oversold, there is probably not a lot of memory unused. Now when you are using a burstable memory and another use wants to use his guaranteed memory, bad things happen. Your burstable memory will be taken away and you find yourself in a situation where you are completely out of memory. This means that OOM killer will pass by and kill off your process.

If the OpenVZ isn't being oversold, there wont't be any issues, it's faster than Xen but it has its limits (for instance, running openvpn on an OpenVZ VM is not possible because you need to set flags in the kernel). Xen on the other hand will be a bit more predictable, but if you go past it's memory limit, you will start to swap and things can get a lot slower. (read: excessive swapping).

OpenVZ has better performance overall than Xen, IF it's not oversold. There is no such thing as more or less memory, the management of it all is just different.

3
  • Then whats the best for a wordpress site receiving 3,000 visitors per day? Xen 1GB (Linode) or openvz 2GB?
    – THpubs
    Jun 11, 2012 at 16:01
  • It's impossible to say without knowledge about oversale or not and what type of webserver you will be running and what OS. Further more on SF we don't respond to questions related to product recommendation. Jun 11, 2012 at 17:46
  • In this case I'd go with Xen, since it's a safe bet and you don't have to wonder whether it's being oversold or not.
    – kolrie
    Aug 21, 2012 at 1:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .