我试图以几百Mbps的速率重放捕获的UDP多播数据包,但最高速度大约为86 Mbps 。 (出于一些奇怪的原因,在白天的其他时间,它始终以最大速率的十分之一,大约8.8 Mbps )
tcpreplay在eth0上
产量仅约86Mbps:
> tcpreplay -ieth0 --topspeed x.pcap sending out eth0 processing file: x.pcap Actual: 459424 packets (137973257 bytes) sent in 12.23 seconds. Rated: 11281542.0 bps, 86.07 Mbps, 37565.33 pps
iperf在eth0上
另一方面,iperf高达约800Mbps 。 请注意, 即使在tprep只产生大约8.x Mbps的时间也是如此)
iperf -c 192.168.20.55 -u -T 1 -t 5 -i 1 -b10000M ------------------------------------------------------------ Client connecting to 192.168.20.55, UDP port 5001 Sending 1470 byte datagrams UDP buffer size: 208 KByte (default) ------------------------------------------------------------ [ 3] local 192.168.20.55 port 50238 connected with 192.168.20.55 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0- 1.0 sec 96.9 MBytes 813 Mbits/sec [ 3] 1.0- 2.0 sec 96.9 MBytes 813 Mbits/sec [ 3] 2.0- 3.0 sec 97.8 MBytes 820 Mbits/sec [ 3] 3.0- 4.0 sec 96.4 MBytes 809 Mbits/sec [ 3] 4.0- 5.0 sec 96.4 MBytes 809 Mbits/sec [ 3] 0.0- 5.0 sec 484 MBytes 812 Mbits/sec [ 3] Sent 345538 datagrams [ 3] Server Report: [ 3] 0.0- 5.0 sec 400 MBytes 671 Mbits/sec 0.071 ms 60212/345537 (17%) [ 3] 0.0- 5.0 sec 1 datagrams received out-of-order
tcpreplay on lo
只是为了确保tcpreplay不在我的磁盘上等待:
> tcpreplay -ilo --topspeed x.pcap Warning in sendpacket.c:sendpacket_open_pf() line 669: Unsupported physical layer type 0x0304 on lo. Maybe it works, maybe it wont. See tickets #123/318 sending out lo processing file: x.pcap Actual: 459424 packets (137973257 bytes) sent in 0.56 seconds. Rated: 246380816.0 bps, 1879.74 Mbps, 820400.00 pps
什么解释tcpreplay在eth0速度缓慢,有没有办法改善呢?
什么版本的tprep? 新版本比旧版本更快。 你真的想运行最新的4.x支持注入通过NETMAP。
另外,你确定你在1Gbps或更好的接口? 你连接到一个100Mbps交换机端口或由于某种原因协商100Mbps? 在/ var / log / messages或dmesg中查看你的接口是如何协商的。
这个问题似乎不是由我的盒子,也不是由tcpreplay引起的。 使用以下设置在另一台计算机上进行testing
+-----------+ | L3 switch | +-+----+----+ | | +----------+ | | | +-----+-----+ | | L2 switch | | +-----+-----+ | | Cable 1 | Cable 2 +------------------------+ | NIC 1 NIC 2 | | | | My PC | | | +------------------------+
我得到这些数字
Cable Mbs pps -------------------------- 1 8.35 6174.75 2 601.07 444444.44
我还切换了电缆,以确保它不是缓慢的网卡,而不是。 我的猜测是这是L2交换机的故障。