Editing WP/Containers vs VMs
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
= Containers versus Virtual Machines = | = Containers versus Virtual Machines = | ||
− | This article gives an overview of containers for those who know what a Virtual Machine (VM) is. VMs are implemented by products such as VMware | + | This article gives an overview of containers for those who know what a Virtual Machine (VM) is. VMs are implemented by products such as VMware, Xen, Hyper-V, Virtual Box, Parallels Desktop etc. If you do not have experience with those or similar products, better read [[../What are containers/]] whitepaper. |
Containers are very similar to VMs in a sense that they also let one to partition one physical computer into multiple small isolated partitions (called VMs or containers). | Containers are very similar to VMs in a sense that they also let one to partition one physical computer into multiple small isolated partitions (called VMs or containers). | ||
Line 12: | Line 12: | ||
Xen, KVM, VMware and other hypervisor-based products provide an ability to have multiple instances of virtual hardware (called VMs – Virtual Machines) on a single piece of real hardware. On top of that virtual hardware one can run any Operating System, so it's possible to run multiple different OSs on one single server. Each VM runs full software stack (including an OS kernel). | Xen, KVM, VMware and other hypervisor-based products provide an ability to have multiple instances of virtual hardware (called VMs – Virtual Machines) on a single piece of real hardware. On top of that virtual hardware one can run any Operating System, so it's possible to run multiple different OSs on one single server. Each VM runs full software stack (including an OS kernel). | ||
− | In contrast, OpenVZ | + | In contrast, OpenVZ uses a single-kernel approach. There is only one single OS kernel running, and on top of that there are multiple isolated instances of user-space programs. This approach is more lightweight than VM. The consequences are: |
− | # Waiving the need to run multiple OS kernels | + | # Waiving the need to run multiple OS kernels leads to '''higher density''' of containers (compared to VMs) |
# Software stack that lies in between an application and the hardware is much thinner, this means '''higher performance''' of containers (compared to VMs) | # Software stack that lies in between an application and the hardware is much thinner, this means '''higher performance''' of containers (compared to VMs) | ||
== File system == | == File system == | ||
− | + | ||
From file system point of view, a container is just a <code>chroot()</code> environment. In other words, a container file system root is merely a directory on the host system (usually /vz/root/$CTID/, under which one can find usual directories like <code>/etc</code>, <code>/lib</code>, <code>/bin</code> etc.). The consequences are: | From file system point of view, a container is just a <code>chroot()</code> environment. In other words, a container file system root is merely a directory on the host system (usually /vz/root/$CTID/, under which one can find usual directories like <code>/etc</code>, <code>/lib</code>, <code>/bin</code> etc.). The consequences are: | ||
Line 26: | Line 26: | ||
* there is no I/O overhead (for VMs it can be as high as 1.5x to 3x, especially for small requests) | * there is no I/O overhead (for VMs it can be as high as 1.5x to 3x, especially for small requests) | ||
* mass deployment is easy | * mass deployment is easy | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |