关于Docker性能



关于Docker性能

0 2


csdn2014

PPT for CSDN 2014 container meetup

On Github caishu / csdn2014

关于Docker性能

蔡书 ( caishu@redhat.com )

2014-10-18

免责

该材料提到的工具和结论是基于Docker运行于RHEL7的

						
[root@caishu-rhel7 ~]# uname -a
Linux 3.10.0-123.8.1.el7.x86_64 #1 SMP Mon Aug 11 13:37:49 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@caishu-rhel7 ~]# docker version
Client version: 1.1.2
Client API version: 1.13
Go version (client): go1.3.1
Git commit (client): d84a070/1.1.2
Server version: 1.1.2
Server API version: 1.13
Go version (server): go1.3.1
Git commit (server): d84a070/1.1.2
[root@caishu-rhel7 ~]# docker info
Containers: 2
Images: 72
Storage Driver: devicemapper
 Pool Name: docker-253:0-2041800-pool
 Data file: /var/lib/docker/devicemapper/devicemapper/data
 Metadata file: /var/lib/docker/devicemapper/devicemapper/metadata
 Data Space Used: 3492.2 Mb
 Data Space Total: 102400.0 Mb
 Metadata Space Used: 4.0 Mb
 Metadata Space Total: 2048.0 Mb
Execution Driver: native-0.2
Kernel Version: 3.10.0-123.8.1.el7.x86_64
						
					

性能的几个方面

  • CPU : cpu.shares, cpuset
  • MEM
  • DISK : --volumn,
  • Network : --net=host

恰当使用

  • 灵活性
    • 软件分发
    • 环境部署与迁移
  • 高性能
    • 大量同构应用的密集部署
    • 重计算,轻端口

tuna/tuned/tuned-adm

对比KVM和Docker

  • KVM
    • 不同的内核
    • 动态迁移
    • 虚机互操作相对复杂
  • Docker
    • 占用资源少,可以实现更高密度
    • 可以共享资源,方便升级

概念和工具

参考材料

致谢:Jeremy Eder和我的同事们

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Resource_Management_and_Linux_Containers_Guide/index.htmlhttps://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Performance_Tuning_Guide/index.htmlhttps://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/index.htmlhttps://access.redhat.com/articles/881893http://redhat.slides.com/jeremyeder/performance-analysis-of-dockerhttps://developerblog.redhat.com/2014/08/19/performance-analysis-docker-red-hat-enterprise-linux-7

0