【原创】运维基础之Docker(6)性能
The general result is that Docker is nearly identical to Native performance and faster than KVM in every category.
1 CPU

2 Memory

3 Network


Docker’s use of bridging and NAT noticeably increases the transmit path length; vhost-net is fairly efficient at transmitting but has high overhead on the receive side. Containers that do not use NAT have identical performance to native Linux.

NAT, as used in Docker, doubles latency in this test. KVM adds 30µs of overhead to each transaction compared to the non-virtualized network stack, an increase of 80%.
4 Disk




5 Other
5.1 redis


5.2 mysql



可见除了Network之外,docker非常接近native,
带宽测试:nuttcp (http://www.nuttcp.net/)
延迟测试:netperf (http://netperf.org/netperf/)
而docker network中常用的host和bridge差别也很大,对nginx压测数据如下:
1)native
# ./http_load -p 10 -s 10 urls/raw_nginx.urls
274791 fetches, 10 max parallel, 1.78339e+08 bytes, in 10.0001 seconds
649 mean bytes/connection
27478.9 fetches/sec, 1.78338e+07 bytes/sec
msecs/connect: 0.0345773 mean, 0.445 max, 0.011 min
msecs/first-response: 0.310406 mean, 1.026 max, 0.088 min
HTTP response codes:
code 200 -- 274791
2)docker network-host
# ./http_load -p 10 -s 10 urls/docker_host_nginx.urls
202773 fetches, 10 max parallel, 1.316e+08 bytes, in 10 seconds
649 mean bytes/connection
20277.3 fetches/sec, 1.31599e+07 bytes/sec
msecs/connect: 0.0426044 mean, 0.897 max, 0.013 min
msecs/first-response: 0.423675 mean, 1.401 max, 0.076 min
HTTP response codes:
code 200 -- 202773
3)docker network-bridge
# ./http_load -p 10 -s 10 urls/docker_bridge_nginx.urls
80282 fetches, 10 max parallel, 5.2103e+07 bytes, in 10 seconds
649 mean bytes/connection
8028.2 fetches/sec, 5.2103e+06 bytes/sec
msecs/connect: 0.0522431 mean, 0.489 max, 0.014 min
msecs/first-response: 1.17323 mean, 10.748 max, 0.122 min
HTTP response codes:
code 200 -- 80282
几种部署的nginx结果如下:使用native可以达到27k的tps,使用docker network-host可以达到20k的tps(下降24%),使用docker network-bridge(默认)可以达到8k的tps(下降70%);
参考:
docker network
https://docs.docker.com/network/
An Updated Performance Comparison of Virtual Machines and Linux Containers
https://domino.research.ibm.com/library/cyberdig.nsf/papers/0929052195DD819C85257D2300681E7B/$File/rc25482.pdf
【原创】运维基础之Docker(6)性能的更多相关文章
- 【原创】运维基础之Docker(1)简介、安装、使用
docker 18.09 官方:https://docs.docker.com/ 一 简介 Docker is a platform for developers and sysadmins to d ...
- 【原创】运维基础之Docker(2)通过docker部署zookeeper nginx tomcat redis kibana/elasticsearch/logstash mysql kafka mesos/marathon
通过docker可以从头开始构建集群,也可以将现有集群(配置以及数据)平滑的迁移到docker部署: 1 docker部署zookeeper # usermod -G docker zookeeper ...
- 【原创】运维基础之Docker(3)搭建私有仓库
下载并启动registry $ docker pull registry$ docker run --name my_registry -d -p 5000:5000 -v /var/lib/regi ...
- 【原创】运维基础之Docker(7)关于docker latest tag
Docker images have a tag named latest which doesn’t work as you expect.Latest is just a tag with a s ...
- 【原创】运维基础之Docker(5)docker部署airflow
部署方式:docker+airflow+mysql+LocalExecutor 使用airflow的docker镜像 https://hub.docker.com/r/puckel/docker-ai ...
- 【原创】运维基础之Docker(4)实用工具ctop
ctop类似于top,top监控的是进程,ctop监控的是容器(container top) 安装 # wget https://github.com/bcicen/ctop/releases/dow ...
- Linux运维基础
一.服务器硬件 二.Linux的发展史 三.Linux的系统安装和配置 四.Xshell的安装和优化 五.远程连接排错 六.Linux命令初识 七.Linux系统初识与优化 八.Linux目录结构 九 ...
- 第一阶段·Linux运维基础-第1章·Linux基础及入门介绍
01-课程介绍-学习流程 02-服务器硬件-详解 03-服务器核心硬件-服务器型号-电源-CPU 01-课程介绍-学习流程 1.1. 光看不练,等于白干: 1.2 不看光练,思想怠慢: 1.3 即看又 ...
- linux运维基础知识
linux运维基础知识大全 一,序言 每一个微不足道的知识,也是未来的铺垫.每一份工作的薪资职位,也是曾经努力的结果. 二,服务器 1,运维人员工作职责: 1)保证数据不丢失:2)保证服务器24小时运 ...
随机推荐
- 归并排序_JAVA
import java.util.Arrays; public class Main { public static void main(String[] args) { int[] a = { 6, ...
- ajax方式下载文件
在web项目中需要下载文件,由于传递的参数比较多(通过参数在服务器端动态下载指定文件),所以希望使用post方式传递参数.通常,在web前端需要下载文件,都是通过指定<a>标签的href属 ...
- PC机Win10声音问题两例处理办法
1.PC电脑接HDMI显示器后无声的解决方案点击声音->播放,下面有一个是显示器,一个扬声器,选择扬声器即可.2.低音太重解决办法扬声器属性,增强,禁用所有声音效果.
- 【Django】git建仓上传时遇到的小问题
根据教程 http://tutorial.djangogirls.org/zh/deploy/,在github上建仓上传项目文件. 执行到 git push -u origin master 时,输入 ...
- Ubuntu18.04中安装cuda的记录
一.参考: https://blog.csdn.net/QLULIBIN/article/details/78714596 https://www.jianshu.com/p/00c37b09f0f3 ...
- fail2ban 防爆破,防止CC 攻击
fail2ban fail2ban监视检测日志文件,根据匹配日志的错误信息(正则式匹配)执行相应的屏蔽动作. 可用来放置爆破 和 CC 攻击. 安装: yum install fail2ban -y ...
- AspectJ开发
aspectJ 是基于java语言的aop框架,提供了强大的aop功能. aspectJ的实现主要有两种,一种是基于xml的声明式aspectJ,另一种是基于注解的aspectJ. 1.基于xml的声 ...
- 函数语法:原生JS获取数组的索引值index
var lis = document.getElementsByTagName("li"); for(var i=0;i<lis.length;i++) { lis[i].i ...
- python加密(MD5)
# import hashlib # # 1. 创建一个MD5对象 # obj = hashlib.md5(b"flkjsdalkfjklasdjfklasjkflasdjklfasdjfl ...
- Redis 集群环境的搭建
下载与解压 [root@localhost ~]# cd /usr/temp/ [root@localhost temp]# wget http://download.redis.io/release ...