在 ESXi 客户机上,安装有 Ubuntu 18.04 操作系统,两个网卡从两个不同的 vswitch 连接,每个网卡都有一个单独的 10Gb 上行链路。
balance-rr
我用这两个链路和模式制作了一个绑定网卡balance-alb
。测试带宽时,它不超过绑定接口的 10Gb(约 9.7gbps)限制。
bwm-ng v0.6.1 (probing every 0.500s), press 'h' for help
input: /proc/net/dev type: rate
\ iface Rx Tx Total
==============================================================================
lo: 0.00 b/s 0.00 b/s 0.00 b/s
ens160: 3.82 kb/s 5.30 Gb/s 5.30 Gb/s
ens192: 15.33 kb/s 4.35 Gb/s 4.35 Gb/s
bond0: 19.16 kb/s 9.64 Gb/s 9.64 Gb/s
------------------------------------------------------------------------------
total: 38.31 kb/s 19.28 Gb/s 19.29 Gb/s
# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens160: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP mode DEFAULT group default qlen 1000
link/ether 00:0c:29:xx:xx:xx brd ff:ff:ff:ff:ff:ff
3: ens192: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP mode DEFAULT group default qlen 1000
link/ether 3a:f0:c2:xx:xx:xx brd ff:ff:ff:ff:ff:ff
4: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 3a:f0:c2:xx:xx:xx brd ff:ff:ff:ff:ff:ff
# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: adaptive load balancing
Primary Slave: None
Currently Active Slave: ens192
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: ens192
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:0c:29:xx:xx:xx
Slave queue ID: 0
Slave Interface: ens160
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:0c:29:xx:xx:xx
Slave queue ID: 0
我已经测试了配置,没有使用 ESXi(裸机上的 Ubuntu 机器),我为 bond0 接口获得了大约 16Gbps 的聚合带宽。此外,使用 ESXi 客户机上的一个网卡,我可以使其饱和并获得大约 10gbps 的带宽。
ESXi vswitch 或客户机有任何限制吗?
答案1
https://www.vmware.com/pdf/10GigE_performance.pdf
这篇文章可能会有所帮助。由于协议开销,使用标准 MTU 大小的数据包的实际限制为 9.3Gbps。