大网数据广告活动
服务器运维问答

Why multicast UDP can be slower than unicast UDP?

· 52CE 我爱测

I have two machines (with Centos 7.3 on both) connected via 1G switch. When I measure UDP thoughput between macines with iperf it gives about 850 Mbit/s. However when I measure multicast UDP thoughput it results in something like…

问题原文

原帖链接 · Alexei Osipov · CC BY-SA 3.0

I have two machines (with Centos 7.3 on both) connected via 1G switch. When I measure UDP thoughput between macines with iperf it gives about 850 Mbit/s. However when I measure multicast UDP thoughput it results in something like 95 Mbit/s (almost 10x slowdown).

What are possible causes for that?

Sample output for unicast:

$ iperf -c 192.168.1.11 -u -b 9900m -f m -i 5 -t 30 -w 1m
------------------------------------------------------------
Client connecting to 192.168.1.11, UDP port 5001
Sending 1470 byte datagrams, IPG target: 1.19 us (kalman adjust)
UDP buffer size: 2.00 MByte (WARNING: requested 1.00 MByte)
------------------------------------------------------------
[  3] local 192.168.1.208 port 52738 connected with 192.168.1.11 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 5.0 sec   503 MBytes   845 Mbits/sec
[  3]  5.0-10.0 sec   507 MBytes   850 Mbits/sec
[  3] 10.0-15.0 sec   500 MBytes   839 Mbits/sec
[  3] 15.0-20.0 sec   499 MBytes   837 Mbits/sec
[  3] 20.0-25.0 sec   497 MBytes   834 Mbits/sec
[  3] 25.0-30.0 sec   501 MBytes   841 Mbits/sec
[  3]  0.0-30.0 sec  3008 MBytes   841 Mbits/sec
[  3] Sent 2145384 datagrams
[  3] Server Report:
[  3]  0.0-30.0 sec  3008 MBytes   841 Mbits/sec   0.406 ms    0/2145384 (0%)

Sample output for multicast:

$ iperf -c 239.255.1.3 -u -b 990m -f m -i 5 -t 30 -w 1m
------------------------------------------------------------
Client connecting to 239.255.1.3, UDP port 5001
Sending 1470 byte datagrams, IPG target: 11.88 us (kalman adjust)
Setting multicast TTL to 1
UDP buffer size: 2.00 MByte (WARNING: requested 1.00 MByte)
------------------------------------------------------------
[  3] local 192.168.1.208 port 53248 connected with 239.255.1.3 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 5.0 sec  57.2 MBytes  95.9 Mbits/sec
[  3]  5.0-10.0 sec  57.0 MBytes  95.6 Mbits/sec
[  3] 10.0-15.0 sec  56.4 MBytes  94.6 Mbits/sec
[  3] 15.0-20.0 sec  56.4 MBytes  94.6 Mbits/sec
[  3] 20.0-25.0 sec  56.4 MBytes  94.6 Mbits/sec
[  3] 25.0-30.0 sec  54.5 MBytes  91.4 Mbits/sec
[  3]  0.0-30.0 sec   338 MBytes  94.3 Mbits/sec
[  3] Sent 240946 datagrams

Some observations:

  • The problem is symmetrical (switching positions of iperf client and server does not help)
  • According to iptraf-ng traffic on the sender's side is already low. However I don't know if I can trust it.

Upd: Switch: Netgear GS108 (unmanaged)

已采纳解答

原帖链接 · Zac67 · CC BY-SA 4.0

Check whether the switch is using flow control. It'll issue pause frames from the source port when any linked port isn't able to keep up with the multicast rate, ie. is linked at 100 or 10 Mbit/s.

You might want to disable flow control for the test. I generally disable it since it's rarely useful and may cause head-of-line blocking, as in your case. TCP does a much better job and there are few cases where Ethernet flow control makes sense (e.g. in a properly designed iSCSI SAN).

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-05-04)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。