hc_*_*hc_ 7 networking performance
我在我的网络设置中目睹了非常反直觉的效果。
我有一个网络设置,其中三个设备(我们称它们为server、laptop和nettop,都运行 Linux,详情如下)连接到一个千兆以太网交换机。
余测量网络通过(a)在从所述传送文件服务器到笔记本电脑使用scp和使用(b)中iperf -s的上服务器和iperf -c在笔记本电脑。
当我在所有三个设备都启动并运行的情况下执行吞吐量测试时,我获得了大约 40 MB/s (SSH) 或 280 Mbits/s (iperf) 的正常性能。
但是,一旦我关闭完全不参与测量过程的网络,我就会得到大约 3.5 MB/s (SSH) 或 58 Mbits/s (iperf) 的糟糕性能。
如果情况相反,我会尝试查明网络是否以某种方式干扰了传输。但是当我关闭它时性能下降一个数量级的事实让我感到困惑。
这种行为是完全可重现的。一旦网络可以ping通,性能就会立即提高。一旦关闭,性能就会下降。
我尝试切断交换机的电源一分钟,并在交换机上的以太网端口周围混杂,但没有任何效果。
所以我的问题是:什么可能导致我目睹的影响?我可以在哪里查看以缩小问题的原因?
服务器有两个额外的网络接口,一个连接到电缆调制解调器,另一个连接到 wifi 路由器。
服务器运行一个 DHCP 服务器,nettop 和膝上型计算机从中获取它们的地址。它还运行许多其他服务,包括运行两个 VM 的 KVM。
所有设备都在10.2.3.0/24网络中。服务器有10.2.3.1,笔记本10.2.3.37,上网本10.2.3.42。连接到 Wifi 的服务器接口有10.2.4.1/24. nettop 和笔记本电脑的 wifi 适配器都未启用。
ethtool显示以下适配器设置。这些输出不受关闭和打开nettop 的影响。
在服务器上:
# ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
MDI-X: on
Supports Wake-on: pumbag
Wake-on: g
Current message level: 0x00000001 (1)
Link detected: yes
Run Code Online (Sandbox Code Playgroud)
在笔记本电脑上:
# ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
MDI-X: Unknown
Supports Wake-on: g
Wake-on: g
Current message level: 0x000000ff (255)
drv probe link timer ifdown ifup rx_err tx_err
Link detected: yes
Run Code Online (Sandbox Code Playgroud)