Server Types: VPS vs KVM

Discussion in 'Linux Other' started by Eric Hansen, Oct 16, 2013.

  1. Eric Hansen

    Eric Hansen Moderator Staff Writer

    Messages:
    124
    Likes Received:
    87
    Trophy Points:
    28
    Its a fun little debate to always have with others: “which do you prefer, KVM or VPS?” While its not as heated (usually) as the “Windows vs. Linux” talks, it also seems there’s new reasons each and every time...but I guess that’s more so because KVM is just stepping into its own these days.

    What Is a VPS?
    VPS (Virtual Private Server) is, well, what its name is. There’s a few different ways of creating a VPS (OpenVZ is the most popular), but its essentially a virtualized ‘instance’ of an operating system. This is done through a specialized Linux kernel or kernel modules (in the case of LXC). Resources are isolated to a point but still shared (i.e.: when your instance is assigned 2GB of RAM you get 2GB of RAM, but that is still shared with other instances).


    What Is a KVM?
    In the sense of server types KVM stands for Kernel-based Virtual Machine (there’s a device called Keyboard/Video/Mouse [KVM] as well but that’s irrelevant to this). If you’ve ever used VirtualBox or VMware’s product line then you have experience with KVM technology as its essentially the same thing. The benefit to KVM for the end-user is that resources are actually isolated all the way so you have no risk of sharing memory for example with another user. This does, however, have the downside that the server requires more hardware or fewer users on each server.

    Why Use a VPS?
    If you’re just starting out in the world of running your own server or not wanting all the usefulness of a KVM (next section) then a VPS is great. I’ve ran multiple for a few years and don’t regret it at all (if it wasn’t for a deal I got I wouldn’t have switched to KVM).

    Most businesses run their VPSes through OpenVZ and SolusVM as the control panel. The downfall to this is that SolusVM has been hit rather hard and frequent this year with security flaws in the control panel software, some major and even critical. But this also shouldn’t shy you away from a VPS. Under the hood both are the same unless you start stressing/overloading your VPS. Another benefit is that VPSes usually are easier to manage as you don’t have to go through the full installation steps of an OS like you do in KVMs. Also, due to a few factors (some already mentioned) VPSes are almost always cheaper than KVMs.

    While you don’t gain as much power using a VPS (i.e.: don’t think of trying to install OpenVZ or LXC in a VPS, it won’t work), its a beautiful stepping stone into the world of self-server management. You can update, install and break software all you want and learn how to fix it on your own. Which, yeah, isn’t always the easiest route but I personally find it extraordinarily fun to learn more about what's going on.

    Why Use a KVM?
    KVMs offer the most bang for your buck without getting an outright dedicated server. Its basically a server provider granting you access to their hardware but putting you on probation. This means you have complete control over almost everything, but it also means a lot more responsibility.

    The main purpose of my KVM usage is to cut down on servers needed and to make management easier. I operate 2 websites right now, which doesn’t sound like a lot (and it isn’t). However, when you try to set up shared SSL certificates it gets a lot worse since only 1 IP can have a certificate tied to it in the configuration file at a time (though SNI helps a lot with that). With a KVM I was able to install LXC, set up two containers/virtual machines and configure them, then have nginx proxy requests to the internal IP. While it didn’t solve the 1 IP per certificate issue it helped make the management of it vastly easier.

    Its also nice to be able to install an OS the way you want it installed instead of just going through templates like in OpenVZ. You can configure the way mount points are set up and allocated among other features. While its more time consuming than just telling SolusVM to reinstall a pre-built template you have that finer grain control that drives a lot of people to Linux to begin with.

    Lastly a short blurb. VNC is amazing! Some providers offer a way to remote into your VPS through a control panel, which is nice. However, VNC allows you to remove SSH dependency and thus theoretically make your server greatly more secure. The downfall to this is that most providers seem to frown upon people doing this as VNC is meant as a last ditch rescue effort, but its still a better alternative than trying to fire up a Java-based web app and hoping it connects before you timeout.

    Which Is Better?
    As you might notice by now I’m not posting about the cons. The reason for this is that each pro from one is a con for the other. The technology all in all is the same, just they are geared toward different users.

    If you are new to the world of managing your own server, don’t want the super-fine control over everything or just want to set it and forget it, VPS is your friend. Yet, if its the opposite you’re looking for then you’ll be marrying KVM in no time.

    While I swear by KVM these days I’m not afraid to admit when a VPS would be more beneficial. I.e.: there’s no reason to really create a KVM for a backend service of an application unless it starts to use a lot of resources, because all a KVM will do is let you be an emergency contact for it. I’ve ran multiple web app backends in a VPS and had no issues or hiccups.

    Attached Files:

Share This Page