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.
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.