Should I choose KVM or OpenVZ for my VPS? [closed]
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question 开发者_StackOverflowMy VPS provider gives me the choice between KVM and OpenVZ. What is the best choice for a VPS with 128MB or 256MB RAM?
KVM does not provide anywhere near the performance of OpenVZ (or Virtuozzo, its commercial equivalent). It's extremely important to note that KVM requires a running kernel inside the VPS, whereas OpenVZ runs containers using a shared kernel. This means that a 256MB KVM VPS does not actually have the same amount of memory available to userspace that OpenVZ does. OpenVZ is an extremely lightweight virtualization technology that easily outperforms full virtualization.
KVM does provide better isolation, although this isn't usually apparent to userspace in a container.
As for the original question, if I were shopping for a VPS, there are two factors to consider:
1) At the same price point, you'll get less for your money with KVM. 256MB of KVM is less than 256MB of OpenVZ because you have to run your own kernel so there's less for your actual applications. On the other hand, some hosters charge more for OpenVZ, so you'll need to do the math.
2) It's easier for hosting companies to overcommit OpenVZ systems, so bad hosting companies may put you on a system with too many containers, so be wary of this.
KVM has much better isolation than OpenVZ and in my experience KVM gets better performance as well. However I've heard some say they get better performance from OpenVZ. KVM has come a long way in the past year though, so I wouldn't be surprised if it's surpassed OpenVZ by now...
KVM also supports any operating system (in theory), whereas OpenVZ is limited to Linux only.
We're using KVM exclusively for our virtualization systems and have no interest in switching to anything else.
If your buying from a VPS provider, then KVM/Xen. OpenVZ/LXC suppliers can oversell their products.
If it's your own server then you can have a mix of OpenVZ/LXC and KVM on the same machine.
Choose KVM because OpenVZ is often cheaper to others hosts :)
OpenVZ does not give your processes the full amount of allocated memory due to overhead, so for smaller memory VPSes, I would lean towards choosing KVM or XEN.
精彩评论