[转帖]Testing Docker multi-host network performance

testing,docker,multi,host,network,performance · 浏览次数 : 0

小编点评

**Docker Multi-Host Network Performance Testing** This blog post discusses the performance of Docker multi-host network. **Key Points:** * Docker provides several network options for multi-host deployments, including direct, bridge, overlay, and Swarm Mode. * The performance of each network type varies depending on the underlying implementation. * The overlay network has significant overhead due to the need for multiple containers and network management. * The Calico plugin performs best for multi-host networking, while native overlay and Weave networks suffer from performance issues. **Results:** * The results show that the "bridge" network introduces a significant overhead of 12%, which is higher than the other network types. * The "overlay" network struggles with performance, with ksoftirq experiencing significant CPU utilization. * The "Calico" plugin provides the best overall performance, followed by the "bridge-bridge" and "direct" networks. * Weave network performance is extremely poor, with high CPU utilization. **Conclusion:** * For production-grade multi-host deployments, the Calico plugin is recommended. * Native "overlay" network is suitable for prototype or quick testing cases but can suffer from performance issues. * The "bridge" network is a good option for balancing performance and overhead. * Weave network is not recommended for multi-host deployments due to performance issues. **Additional Notes:** * The results may vary depending on the underlying hardware and network configuration. * The testing was conducted using two physical servers connected over a 10GB network. * The "direct" and "host" networks were used as a comparison to the other network types.

正文

https://www.percona.com/blog/2016/08/03/testing-docker-multi-host-network-performance/

 

 

In this post, I’ll review Docker multi-host network performance.

In a past post, I tested Docker network. The MySQL Server team provided their own results, which are in line with my observations.

For this set of tests, I wanted to focus more on Docker networking using multiple hosts. Mostly because when we set up a high availability (HA) environment (using Percona XtraDB Cluster, for example) the expectation is that instances are running on different hosts.

Another reason for this test is that Docker recently announced the 1.12 release, which supports Swarm Mode. Swarm Mode is quite interesting by itself — with this release, Docker targets going deeper on Orchestration deployments in order to compete with Kubernetes and Apache Mesos. I would say Swarm Mode is still rough around the edges (expected for a first release), but I am sure Docker will polish this feature in the next few releases.

Swarm Mode also expects that you run services on different physical hosts, and services are communicated over Docker network. I wanted to see how much of a performance hit we get when we run over Docker network on multiple hosts.

Network performance is especially important for clustering setups like Percona XtraDB Cluster and  MySQL Group Replication (which just put out another Lab release).

For my setup, I used two physical servers connected over a 10GB network. Both servers use 56 cores total of Intel CPUs.

Sysbench setup: data fits into memory, and I will only use primary key lookups. Testing over the network gives the worst case scenario for network round trips, but it also gives a good visibility on performance impacts.

The following are options for Docker network:

  • No Docker containers (marked as “direct” in the following results)
  • Docker container uses “host” network (marked as “host”)
  • Docker container uses “bridge” network, where service port exposed via port forwarding (marked as “bridge”)
  • Docker container uses “overlay” network, both client and server are started in containers connected via overlay network (marked as “overlay” in the results). For “overlay” network it is possible to use third-party plugins, with different implementation of the network, the most known are:

For multi-host networking setup, only “overlay” (and plugins implementations) are feasible. I used “direct”, “host” and “bridge” only for the reference and as a comparison to measure the overhead of overlay implementations.

The results I observed are:

Client Server Throughput, tps Ratio to “direct-direct”
Direct Direct 282780 1.0
Direct Host 280622 0.99
Direct Bridge 250104 0.88
Bridge Bridge 235052 0.83
overlay overlay 120503 0.43
Calico overlay Calico overlay 246202 0.87
Weave overlay Weave overlay 11554 0.044

 

Observations
  • “Bridge” network added overhead, about 12%, which is in line with my previous benchmark. I wonder, however, if this is Docker overhead or just the Linux implementation of bridge networks. Docker should be using the setup that I described in Running Percona XtraDB Cluster nodes with Linux Network namespaces on the same host, and I suspect that the Linux network namespaces and bridges add overhead. I need to do more testing to verify.
  • Native “Overlay” Docker network struggled from performance problems. I observed issues with ksoftirq using 100% of one CPU core, and I see similar reports. It seems that network interruptions in Docker “overlay” are not distributed properly across multiple CPUs. This is not the case with the “direct” and “bridge” configuration. I believe this is a problem with the Docker “overlay” network (hopefully, it will eventually be fixed).
  • Weave network showed absolutely terrible results. I see a lot of CPU allocated to “weave” containers, so I think there are serious scalability issues in their implementation.
  • Calico plugin showed the best result for multi-host containers, even better than “bridge-bridge” network setup
Conclusion

If you need to use Docker “overlay” network — which is a requirement if you are looking to deploy a multi-host environment or use Docker Swarm mode — I recommend you consider using the Calico network plugin for Docker. Native Docker “overlay” network can be used for prototype or quick testing cases, but at this moment it shows performance problems on high-end hardware.

与[转帖]Testing Docker multi-host network performance相似的内容:

[转帖]Testing Docker multi-host network performance

https://www.percona.com/blog/2016/08/03/testing-docker-multi-host-network-performance/ 03Aug2016 By Vadim Tkachenko Cloud, MySQL Docker, multi-host ne

[转帖]Dynamic A/B Testing with NGINX Plus

https://www.nginx.com/blog/dynamic-a-b-testing-with-nginx-plus/ The key‑value store feature was introduced in NGINX Plus R13 for HTTP traffic and exte

[转帖]Comcast

https://github.com/tylertreat/comcast Testing distributed systems under hard failures like network partitions and instance termination is critical, bu

[转帖][译] 基于 Envoy、Cilium 和 eBPF 实现透明的混沌测试(KubeCon, 2019)

http://arthurchiao.art/blog/transparent-chaos-testing-with-envoy-cilium-ebpf-zh/ 译者序 本文内容来自 2019 年的一个技术分享 Transparent Chaos Testing with Envoy, Cilium

[转帖]Linux终端:用cat命令查看不可见字符

https://developer.aliyun.com/article/80607 printf 'testing\012\011\011testing\014\010\012more testing\012\011\000\013\000even more testing\012\011\011

[转帖]

Linux ubuntu20.04 网络配置(图文教程) 因为我是刚装好的最小系统,所以很多东西都没有,在开始配置之前需要做下准备 环境准备 系统:ubuntu20.04网卡:双网卡 网卡一:供连接互联网使用网卡二:供连接内网使用(看情况,如果一张网卡足够,没必要做第二张网卡) 工具: net-to

[转帖]

https://cloud.tencent.com/developer/article/2168105?areaSource=104001.13&traceId=zcVNsKTUApF9rNJSkcCbB 前言 Redis作为高性能的内存数据库,在大数据量的情况下也会遇到性能瓶颈,日常开发中只有时刻

[转帖]ISV 、OSV、 SIG 概念

ISV 、OSV、 SIG 概念 2022-10-14 12:29530原创大杂烩 本文链接:https://www.cndba.cn/dave/article/108699 1. ISV: Independent Software Vendors “独立软件开发商”,特指专门从事软件的开发、生产、

[转帖]Redis 7 参数 修改 说明

2022-06-16 14:491800原创Redis 本文链接:https://www.cndba.cn/dave/article/108066 在之前的博客我们介绍了Redis 7 的安装和配置,如下: Linux 7.8 平台 Redis 7 安装并配置开机自启动 操作手册https://ww

[转帖]HTTPS中间人攻击原理

https://www.zhihu.com/people/bei-ji-85/posts 背景 前一段时间,公司北京地区上线了一个HTTPS防火墙,用来监听HTTPS流量。防火墙上线之前,邮件通知给管理层,我从我老大那里听说这个事情的时候,说这个有风险,然后意外地发现,很多人原来都不知道HTTPS防