我在做SDN的研发。 在这种情况下,我们使用MPLS标签,Open vSwitch作为软件交换机。 我们使用2个服务器节点,ovs 2.6.0,内核模块加载,2个主机。
它们通过1千兆位以太网连接直接相连,rtt周期为1 ms,而在第一个数据包小于3 ms的情况下(使用ping实用程序)。 我使用Iperf3进行testing。 第一个testing是不使用mpls标签而达到的性能,第二个testing是使用mpls标签。 MTU被调整为不做碎片,所以这不是问题。 我尝试调整拥塞窗口和其他参数,如使用的TCPalgorithm。
mar jul 4 12:21:09 CEST 2017 Connecting to host 192.168.20.2, port 5201 [ 4] local 192.168.20.1 port 43526 connected to 192.168.20.2 port 5201 [ ID] Interval Transfer Bandwidth Retr Cwnd [ 4] 0.00-1.00 sec 112 MBytes 943 Mbits/sec 0 450 KBytes [ 4] 1.00-2.00 sec 112 MBytes 937 Mbits/sec 0 516 KBytes [ 4] 2.00-3.00 sec 112 MBytes 938 Mbits/sec 0 571 KBytes [ 4] 3.00-4.00 sec 112 MBytes 937 Mbits/sec 0 625 KBytes [ 4] 4.00-5.00 sec 112 MBytes 943 Mbits/sec 0 633 KBytes [ 4] 5.00-6.00 sec 111 MBytes 933 Mbits/sec 0 633 KBytes [ 4] 6.00-7.00 sec 111 MBytes 933 Mbits/sec 0 664 KBytes [ 4] 7.00-8.00 sec 112 MBytes 944 Mbits/sec 0 664 KBytes [ 4] 8.00-9.00 sec 111 MBytes 933 Mbits/sec 0 697 KBytes [ 4] 9.00-9.16 sec 18.8 MBytes 977 Mbits/sec 0 697 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-9.16 sec 1.00 GBytes 939 Mbits/sec 0 sender [ 4] 0.00-9.16 sec 1022 MBytes 935 Mbits/sec receiver iperf Done. <-----------> mar jul 4 12:40:10 CEST 2017 Connecting to host 192.168.20.2, port 5201 [ 4] local 192.168.20.1 port 43530 connected to 192.168.20.2 port 5201 [ ID] Interval Transfer Bandwidth Retr Cwnd [ 4] 0.00-1.00 sec 203 KBytes 1.66 Mbits/sec 57 2.82 KBytes [ 4] 1.00-2.00 sec 398 KBytes 3.26 Mbits/sec 124 2.82 KBytes [ 4] 2.00-3.00 sec 400 KBytes 3.28 Mbits/sec 124 2.82 KBytes [ 4] 3.00-4.00 sec 319 KBytes 2.61 Mbits/sec 124 2.82 KBytes [ 4] 4.00-5.00 sec 398 KBytes 3.26 Mbits/sec 126 2.82 KBytes [ 4] 5.00-6.00 sec 395 KBytes 3.24 Mbits/sec 124 2.82 KBytes [ 4] 6.00-7.00 sec 398 KBytes 3.26 Mbits/sec 126 2.82 KBytes [ 4] 7.00-8.00 sec 324 KBytes 2.66 Mbits/sec 124 2.82 KBytes [ 4] 8.00-9.00 sec 398 KBytes 3.26 Mbits/sec 124 2.82 KBytes [ 4] 9.00-10.00 sec 400 KBytes 3.28 Mbits/sec 126 2.82 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-10.00 sec 3.55 MBytes 2.98 Mbits/sec 1179 sender [ 4] 0.00-10.00 sec 3.42 MBytes 2.87 Mbits/sec receiver
我知道有使用MPLS和使用ovs的问题,但在这种情况下有一些奇怪的事实:
有人知道如何解决这个问题吗?
PD:请原谅我可能的英文拼写错误。
在做了一些研究之后,我设法隔离了这个问题并解决了这个问题。 网卡有一些校验和和卸载选项被激活,迫使数据包进入用户空间,我想封装是这里的问题。
使用ethtool实用程序,我们可以禁用这个卸载。 在这种情况下,我使用(作为根):
ethtool -K <iface> gso off && ethtool -K <iface> tso off && ethtool -K <iface> gro off
禁用TCP分段卸载(TSO),通用分段卸载(GSO)和通用接收卸载(GRO)。 rx和tx校验和也被禁用。
来源: 来源1 来源2
我希望这能帮助别人。