有关 RTL8125 2.5Gb 的报告信息存在冲突,无法达到最高速度

有关 RTL8125 2.5Gb 的报告信息存在冲突,无法达到最高速度

我使用的是 Ubuntu 22.04.4 LTS,主板上有 RTL8125,Windows 10 工作站配有 SD-PEX24066 NIC,使用相同的 RTL8125 芯片组,交换机是 QNAP QSW-1105-5T。我已通过 netplan 将 MTU 设置为 9000,配置在启动时设置为 9000。我没有获得我期望的速度,Ubuntu 报告了相互矛盾的信息。

这是双向 iperf(无论谁是服务器/客户端,速度都相似):

乌本图:

~# iperf3 -c 192.168.1.175 -bidir
Connecting to host 192.168.1.175, port 5201
[  5] local 192.168.1.174 port 57786 connected to 192.168.1.175 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   195 MBytes  1.64 Gbits/sec    0    158 KBytes
[  5]   1.00-2.00   sec   198 MBytes  1.66 Gbits/sec    0    158 KBytes
[  5]   2.00-3.00   sec   179 MBytes  1.50 Gbits/sec    0    158 KBytes
[  5]   3.00-4.00   sec   165 MBytes  1.38 Gbits/sec    0    158 KBytes
[  5]   4.00-5.00   sec   165 MBytes  1.38 Gbits/sec    0    158 KBytes
[  5]   5.00-6.00   sec   165 MBytes  1.39 Gbits/sec    0    158 KBytes
[  5]   6.00-7.00   sec   165 MBytes  1.38 Gbits/sec    0    158 KBytes
[  5]   7.00-8.00   sec   165 MBytes  1.38 Gbits/sec    0    158 KBytes
[  5]   8.00-9.00   sec   165 MBytes  1.38 Gbits/sec    0    158 KBytes
[  5]   9.00-10.00  sec   165 MBytes  1.38 Gbits/sec    0    158 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  1.69 GBytes  1.45 Gbits/sec    0             sender
[  5]   0.00-10.00  sec  1.69 GBytes  1.45 Gbits/sec                  receiver

视窗:

Accepted connection from 192.168.1.174, port 57776
[  5] local 192.168.1.175 port 5201 connected to 192.168.1.174 port 57786
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-1.00   sec   188 MBytes  1.57 Gbits/sec
[  5]   1.00-2.00   sec   198 MBytes  1.66 Gbits/sec
[  5]   2.00-3.00   sec   179 MBytes  1.51 Gbits/sec
[  5]   3.00-4.00   sec   165 MBytes  1.39 Gbits/sec
[  5]   4.00-5.00   sec   165 MBytes  1.39 Gbits/sec
[  5]   5.00-6.00   sec   165 MBytes  1.39 Gbits/sec
[  5]   6.00-7.00   sec   165 MBytes  1.38 Gbits/sec
[  5]   7.00-8.00   sec   165 MBytes  1.39 Gbits/sec
[  5]   8.00-9.00   sec   165 MBytes  1.39 Gbits/sec
[  5]   9.00-10.00  sec   165 MBytes  1.38 Gbits/sec
[  5]  10.00-10.04  sec  5.74 MBytes  1.38 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-10.04  sec  0.00 Bytes  0.00 bits/sec                  sender
[  5]   0.00-10.04  sec  1.69 GBytes  1.44 Gbits/sec                  receiver

Ubuntu NIC 显示的额定速度信息相互矛盾,不知道该相信什么:

~# ip link show
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: enp42s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 2c:f0:5d:7c:91:20 brd ff:ff:ff:ff:ff:ff
    
~# inxi -n
Network:
  Device-1: Realtek RTL8125 2.5GbE driver: r8169
  IF: enp42s0 state: up speed: 2500 Mbps duplex: full mac: 2c:f0:5d:7c:91:20
  
~# lshw -class network
  *-network
       description: Ethernet interface
       product: RTL8125 2.5GbE Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:2a:00.0
       logical name: enp42s0
       version: 04
       serial: 2c:f0:5d:7c:91:20
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=5.15.0-97-generic duplex=full firmware=rtl8125b-2_0.0.2 07/13/20 ip=192.168.1.174 latency=0 link=yes multicast=yes port=twisted pair
       resources: irq:35 ioport:f000(size=256) memory:fc500000-fc50ffff memory:fc510000-fc513fff

~# mii-tool -v enp42s0
enp42s0: negotiated 1000baseT-FD flow-control, link ok
  product info: vendor 00:e0:4c or 00:07:32, model 4 rev 0
  basic mode:   autonegotiation enabled
  basic status: autonegotiation complete, link ok
  capabilities: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
  advertising:  1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
  link partner: 1000baseT-HD 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control

~# ethtool enp42s0
Settings for enp42s0:
        Supported ports: [ TP    MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
                                2500baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
                                2500baseT/Full
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
                                             1000baseT/Half 1000baseT/Full
                                             2500baseT/Full
        Link partner advertised pause frame use: Symmetric Receive-only
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 2500Mb/s
        Duplex: Full
        Auto-negotiation: on
        master-slave cfg: preferred slave
        master-slave status: slave
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: external
        MDI-X: Unknown
        Supports Wake-on: pumbg
        Wake-on: d
        Link detected: yes

Windows 工作站具有巨型帧、2.5G 全双工、启用大型发送卸载以及接收/发送缓冲区为 512 等功能。它显示 MTU 为 9198:

>netsh interface ipv4 show subinterface

   MTU  MediaSenseState   Bytes In  Bytes Out  Interface
------  ---------------  ---------  ---------  -------------
  9198                1        nnn        nnn  Ethernet

有谁知道为什么 Ubuntu 服务器显示冲突的信息以及我缺少什么才能达到全速?

相关内容