http://containerz.blogspot.com/2015/03/virtualization-vs-containerization.html

Virtualization vs. Containerization

 
Containers provide isolated runtime environments for applications: the entire user space environment is exclusively presented to the container, and any changes to it do not impact other containers' environments. To provide this isolation, a combination of OS-based mechanisms is used: Linux name spaces are used for isolation and scoping mechanism. File system mounts define what files are accessible to the container. cgroups define resource consumption of containers. Still all containers share the same OS kernel which can realize memory footprint efficiencies when identical libraries are used by multiple containers.

With system virtualization, the hypervisor provides a full virtual machine to a guest: the entire OS image including the kernel is now dedicated to the virtual machine. CPU virtualization is used to provide each guest with an exclusive view of a full system environment, and these mechanisms also ensure isolation from other guests. Hypervisor-based management of virtual CPUs, memory and I/O devices is used to define resource consumption of guests.

Which one is better?

As always, it depends on your needs. If you just want to have a number of separate instances to run applications, a container environment often provides greater efficiency, both in managing the application environment, starting the application instances, and in resource consumption. Simple modification and deployment of application environments has been a design principle of container solutions like Docker and is entirely in the DevOps spirit (guess you just have been waiting for more buzzwords).

If you want to have best isolation of environments and come from a server virtualization perspective, then system virtualization may be more relevant: Noisy neighbours are much less of an issue than with containers. While many of the container folks currently focus on improving container isolation, virtual machine isolation is still superior. Coming from physical servers, virtual servers are a natural step, and an existing ecosystem around server management can often be applied to virtual servers, too.

On z systems, Linux has good scalability (to run containers), but z is the platform with an extremely efficient virtualization technology (to run virtual servers), and it is inherent in the entire system architecture. Without having measured it, combining the technologies is probably less painful on z Systems than on other platforms.

There is a third way: both.
Combining system virtualization with containers can be done in multiple ways:

1. A Virtual Machine in a Container

Docker has quite some flexibility on where containers are deployed. One option (called "execution driver") is to use KVM images. This allows to use all the DevOps methods of Docker and combine it with best isolation available, at the cost of having to start up entire Operating System instances when starting containers -- meaning startup time and footprint. Memory efficiencies can only be realized through Kernel Samepage Merging (KSM) -- less effective and efficient, but it's a start.

2. A Container in a Virtual Machine

Conversely, you can run a virtual machine and start a container inside. The VM would not be controlled by Docker, but by existing virtualization management infrastructure. Once the OS instance is up, starting a container would then be done using Docker, and no special setup has to be performed for running containers. Again, containers would have strong isolation since the next container runs in another virtual system; footprint-wise, efficiencies would only be possible through memory deduplication techniques by the hypervisor.

2b. Multiple Containers in a Virtual Machine

This is a variation of running Docker in a VM, suitable for multi-tenancy environments. Here, the assumption is that strongest isolation is only required between containers of different tenants, and straight Linux container isolation is good enough between several containers of the same tenant. Advantages are lower number of virtual machines to run, best isolation between tenants, and enjoying all the efficiencies of vanilla Docker setups.

To summarize: it depends.

 
 

virtualization-vs-containerization的更多相关文章

  1. [WPF]WPF Data Virtualization和UI Virtualization

    这篇博客将介绍WPF中的虚拟化技术. 1. Data Virtualization 通常情况下我们说数据虚拟化是指数据源没有完全加载,仅加载当前需要显示的数据呈现给用户.这种场景会让我们想到数据分页显 ...

  2. Geneve: Generic Network Virtualization Encapsulation

    Earlier this year, VMware, Microsoft, Red Hat and Intel published an IETF draft on Generic Network V ...

  3. [Virtualization][SDN] VXLAN到底是什么 [转]

    写在转发之前: 几个月以前,在北大机房和燕园大厦直接拉了一根光钎.两端彼此为校园内公网IP.为了方便连接彼此机房,我做个一个VPN server在燕园的边界,北大机房使用client拨回.两个物理机房 ...

  4. Virtualization API之libvirt

    The virtualization API 之开源 libvirt探究 By Ruiy: libvirt supports Hypervisors(注,相关的hypervisors项目的权威网站已经 ...

  5. this computer does not support Intel Virtualization Technology (VT-x) .Haxm can'not be installed

    this computer does not support Intel Virtualization Technology (VT-x) .Haxm can'not be installed 本机不 ...

  6. 【转】How to Start Intel Hardware-assisted Virtualization (hypervisor) on Linux to Speed-up Intel Android x86 Emulator

    [转]How to Start Intel Hardware-assisted Virtualization (hypervisor) on Linux to Speed-up Intel Andro ...

  7. Connecting Docker for Cloud Services using SDN and Network Virtualization

     Abstract The explosive scale of container CPUs needs highly efficient network virtualization Chal ...

  8. RH133读书笔记(10)-Lab 10 Exploring Virtualization

    Lab 10 Exploring Virtualization Goal: To explore the Xen virtualization environment and the creation ...

  9. <Mastering KVM Virtualization>:第一章 了解Linux虚拟化

    本章为读者提供了Linux虚拟化中流行技术的深刻见解,以及相较于其他同类技术的优势特点.本书共有14章,囊括了KVM虚拟化中的各个方面,从KVM的内部构造开始,并包括了诸如软件定义网络(SDN),性能 ...

随机推荐

  1. ORA-28001: the password has expired

    大早上正式库提示: Oracle提示错误消息ORA-28001: the password has expired 解决办法: 1.利用SYSDBA权限登陆: 2.查看账户信息:select user ...

  2. VS2012、VS2010、VS2008常用的快捷键

    下面为大家带来VS各个版本常用的快捷方式,希望对大家开发过程中有帮助: 强迫智能感知:Ctrl+J: 强迫智能感知显示参数信息:Ctrl-Shift-空格: Ctrl+E,D ----格式化全部代码 ...

  3. 从头开始编写一个Orchard网上商店模块(3) - 创建Orchard.Webshop模块项目

    原文地址:http://skywalkersoftwaredevelopment.net/blog/writing-an-orchard-webshop-module-from-scratch-par ...

  4. 文件操作总结:关于文本和二进制流(typeText&typeBinary)

    本人能力.精力有限,所言所感都基于自身的实践和有限的阅读.查阅,如有错误,欢迎拍砖,敬请赐教——博客园:钱智慧. 总结: CFile,其自身是不提供缓冲区的(?但CFile又有一个Flush,这一点目 ...

  5. mysql日志清理

    mysql bin-log 日志清理 发现mysql数据库目录中bin-log中日志文件非常大 [root@localhost var]# du -sh mysql-bin* | sort 1020K ...

  6. [Locked] Unique Word Abbreviation

    Unique Word Abbreviation An abbreviation of a word follows the form <first letter><number&g ...

  7. glance image cache

    The Glance Image Cache The Glance API server may be configured to have an optional local image cache ...

  8. Sublime Text 2 使用心得

    一. 前言 作为一个前端,有一款好的开发利器是必不可少的,editplus.notepad++都是不错的工具,体积轻巧,启动迅速(dw太浮肿了).最近,又有一款新的编辑器诞生,席卷前端界,惹得无数喜爱 ...

  9. 取正在运行的DLL或EXE的路径

    function GetSelfPath: string;var  ModuleName: string;  i: Integer;begin  SetLength(ModuleName, 255); ...

  10. poj1873 The Fortified Forest 凸包+枚举 水题

    /* poj1873 The Fortified Forest 凸包+枚举 水题 用小树林的木头给小树林围一个围墙 每棵树都有价值 求消耗价值最低的做法,输出被砍伐的树的编号和剩余的木料 若砍伐价值相 ...