January 21, 2017

You know all about use cases for Docker containers. But what about system container platforms such as OpenVZ and LXD? Keep reading for system container use cases.

System containers are designed to host entire operating systems inside a container. Unlike traditional virtual machines, system containers don’t require hardware emulation to run.

When might system containers come in handy? Consider the following use case examples:

  • You want to run a virtual server but need maximum performance. This is the most obvious use case for system containers. In situations where you need to host a virtual server but can’t accept the performance hit that comes with traditional, VMware-style virtualization, a system container will do the job. Because there is no hardware emulation, system containers do not create overhead that eats into the performance of the virtual servers they host.
  • You need bare-metal hardware access for your virtual server. System containers also can access bare-metal resources on the host server. You can’t do that easily with VMware, KVM or other traditional virtualization platforms. This makes system containers useful if, for instance, your virtual server needs to access the GPU on the host.
  • You need to run many virtual servers on one host. Because system containers do not require emulation, many system containers can run on a single physical host without overwhelming the system. As an example, Canonical claims that LXD can support about 14 times as many virtual servers as KVM.
  • You need your virtual servers to start fast. Canonical also claims that virtual servers hosted using LXD containers start 94 percent faster than KVM virtual machines. I have found similar results when testing LXD. Fast startups make system containers useful in scenarios where you have rapidly fluctuating demand for virtual servers and need them to start in seconds (which system containers can do) rather than minutes (which is how long it takes when using VMware or KVM).
  • You want to run multiple Linux distributions on the same host (without full virtualization). Using a system container, you could have (for instance) an Ubuntu host server and (for example) a Fedora guest running inside a container. That would come in handy if you need to host an app that is not supported on Ubuntu but works on Fedora. You could do the same thing using VMware or KVM, of course, but not without adding overhead to your system.

It’s worth noting that one use case that system containers don’t support is running a completely different type of guest operating system. You can’t run a Windows virtual server on a Linux host using system containers. (And system containers only work on Linux, so you can’t run them on a Windows host.) To do Windows-on-Linux or Linux-on-Windows, you’ll need traditional virtualization.

Conclusion

For now, system containers remain a relatively obscure technology. OpenVZ has been around for a long time but has not made a huge impact. LXD is still quite new (although Canonical is promoting it pretty aggressively). It will be some time before the tech world at large is as excited about system containers as it is right now about Docker containers.

Nonetheless, system containers already have clear use cases that can benefit production environments in a real way. If you haven’t yet taken a close look at system containers, it’s time to start.

Christopher Tozzi

Christopher Tozzi has covered technology and business news for nearly a decade, specializing in open source, containers, big data, networking and security. He is currently Senior Editor and DevOps Analyst with Fixate.io and Sweetcode.io.