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

Why iperf still reports 1Gbps performance when using bonding over two 1Gbps adapters?

· 52CE 我爱测

As I understand it, bonding brings among other benefits the ability to increase the network speed between two machines in a LAN. Bonding [...] means combining several network interfaces (NICs) to a single link, providing either h…

问题原文

原帖链接 · Arseni Mourzenko · CC BY-SA 3.0

As I understand it, bonding brings among other benefits the ability to increase the network speed between two machines in a LAN.

Bonding [...] means combining several network interfaces (NICs) to a single link, providing either high-availability, load-balancing, maximum throughput, or a combination of these.

Source: Ubuntu documentation, emphasis mine.

I have bonding configured on two servers; both have two 1Gbps NIC adapters. When testing speed between those servers using iperf, the report indicates:

  • 930 to 945 Mbits/sec when using balance-rr bonding mode.
  • 520 to 530 Mbits/sec from machine A to B when using 802.3ad,
  • 930 to 945 Mbits/sec from machine B to A when using 802.3ad.

An interesting thing is that when using 802.3ad, ifconfig indicates that practically all RX is on eth0 (2.5 GB vs. a few KB/MB) and all TX on eth1 on machine A, and the inverse on machine B.

When asking iperf to use multiple connections (iperf -c 192.168.1.2 -P 10), the obtained sum is very close to the results displayed when using a single connection.

Two machines are connected to a Netgear GS728TS which has LACP configured properly (I hope), with two LAGs covering two ports each. IEEE 802.3x mode is enabled.

Is iperf suited well for this sort of tests? If yes, is there something I'm missing?

已采纳解答

原帖链接 · Arseni Mourzenko · CC BY-SA 3.0

After contacting Netgear support, it appears that:

If you use 2 stations (1 client/1 server), it will actually only use one link (hence the 1Gbps/940mbps), the link used is decided by the LACP hashing algorithm.

To go above the 1Gbps limit, you will need to test with more that 1 client.

Source: Netgear support ticket response

The same ticket response links to Netgear's public forum post, where we can read that:

You can only get 2Gbps aggregate when the LACP hashing algorithm puts multiple traffic streams down different paths and it doesn't always. With a small number of clients (2 in your case), odds are good that they both might get hashed to the same link.

For those who don't want to read the entire forum discussion, here are the key points:

  • There should be at least two clients connecting to the server to benefit from LACP. A single client will use one link only, which will limit its speed to 1 Gbps.

  • Two clients should be using different links to benefit from LACP.

  • With only two network adapters on the server, there is a 50% chance of getting the same link from two clients, which will result in total speed capped at 1 Gbps. Three network adapters decrease the chance down to 33%, four—to 25%.

To conclude, there is no way with Netgear GS728TS to obtain a 1.4 to 1.8 Gbps speed between two machines.

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

资料来源与适用范围

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

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

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