[tech] Virtual machines, containers, and resource use
David Adam
zanchey at ucc.gu.uwa.edu.au
Sun Feb 23 14:21:19 WST 2014
Comrades,
As you will be aware, we have a pretty beefy VM server on Medico running
Proxmox.
It is capable of hosting both fully-virtualised virtual machines, running
any operating system, and also running OpenVZ Linux containers. We only
have a couple of containers and I want to highlight their benefits.
Containers are a bit like FreeBSD's jails, Solaris' zones or chroots on
steroids. When you create a container, it shares the host kernel but gets
is own allocation of memory, disk space, and CPU cores. Importantly, those
resources are not exclusively allocated to the container - they remain
available for other containers to share.
If you just want to spin up an extra instance of Debian to test something
out or run a couple of daemons, a container is probably a better tool than
a VM. It's a lot faster, there's a lot less layers (no filesystem on a
block device on a file system on a block device) and it leaves more
resources for everyone else.
I have added instructions for creating containers to the wiki:
http://wiki.ucc.asn.au/Proxmox#Adding_Containers
Keep using VMs if you want to run non-Debian (or non-Linux) OSes, fiddle
with filesystems, or run a kernel newer than 2.6.32.
Unfortunately, to run newer version of most non-Debian OSes in containers
will require an upgrade to the Proxmox kernel, something that might be
worth tackling in the near future. Perhaps once the new fileserver arrives
we can give some serious thought to clustering a couple of Proxmox hosts.
David Adam
UCC Wheel Member
zanchey at ucc.gu.uwa.edu.au
More information about the tech
mailing list