【发布时间】:2018-02-22 17:28:31
【问题描述】:
我正在使用 IPerf 在不同的网络设置之间运行一些性能测量。我发现两种基本设置之间存在巨大差异。
- 两个容器(docker)通过主机中默认的docker0桥接接口相互连接。
- 两个容器通过 VPNTunnel 接口 连接,该接口通过上述 docker0 桥进行内部连接。
IPerf 计算两种方案 10sec
**Scenario One (1)**
Client connecting to 172.17.0.4, TCP port 5001
TCP window size: 1.12 MByte (default)
------------------------------------------------------------
[ 3] local 172.17.0.2 port 50728 connected with 172.17.0.4 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 1.0 sec 3.26 GBytes 28.0 Gbits/sec
[ 3] 1.0- 2.0 sec 3.67 GBytes 31.5 Gbits/sec
[ 3] 2.0- 3.0 sec 3.70 GBytes 31.8 Gbits/sec
[ 3] 3.0- 4.0 sec 3.93 GBytes 33.7 Gbits/sec
[ 3] 4.0- 5.0 sec 3.34 GBytes 28.7 Gbits/sec
[ 3] 5.0- 6.0 sec 3.44 GBytes 29.6 Gbits/sec
[ 3] 6.0- 7.0 sec 3.55 GBytes 30.5 Gbits/sec
[ 3] 7.0- 8.0 sec 3.50 GBytes 30.0 Gbits/sec
[ 3] 8.0- 9.0 sec 3.41 GBytes 29.3 Gbits/sec
[ 3] 9.0-10.0 sec 3.20 GBytes 27.5 Gbits/sec
[ 3] 0.0-10.0 sec 35.0 GBytes 30.1 Gbits/sec
**Scenario Two (2)**
Client connecting to 10.23.0.2, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[ 3] local 10.12.0.2 port 41886 connected with 10.23.0.2 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 1.0 sec 15.1 MBytes 127 Mbits/sec
[ 3] 1.0- 2.0 sec 14.9 MBytes 125 Mbits/sec
[ 3] 2.0- 3.0 sec 14.9 MBytes 125 Mbits/sec
[ 3] 3.0- 4.0 sec 14.2 MBytes 120 Mbits/sec
[ 3] 4.0- 5.0 sec 16.4 MBytes 137 Mbits/sec
[ 3] 5.0- 6.0 sec 18.0 MBytes 151 Mbits/sec
[ 3] 6.0- 7.0 sec 18.6 MBytes 156 Mbits/sec
[ 3] 7.0- 8.0 sec 16.4 MBytes 137 Mbits/sec
[ 3] 8.0- 9.0 sec 13.5 MBytes 113 Mbits/sec
[ 3] 9.0-10.0 sec 15.0 MBytes 126 Mbits/sec
[ 3] 0.0-10.0 sec 157 MBytes 132 Mbits/sec
我对吞吐量的巨大差异感到困惑。
是不是由于涉及的加密和解密以及 OpenSSL 导致了这种退化?
还是因为在通过 VPN 隧道进行路由时,需要对应用层以下的数据包头进行多次解组和编组?
谢谢
沙比尔
【问题讨论】:
标签: performance docker networking vpn iperf