Hyper-V Windows 客户机无法达到 1.5Gbit/s 以上,但 Linux 客户机可以

Hyper-V Windows 客户机无法达到 1.5Gbit/s 以上,但 Linux 客户机可以

请告诉我需要寻找哪些设置来解决我的问题。我在 Hyper-V(Windows Server 2016)上遇到了网络性能问题。

该服务器具有 10Gbits 接口。我用它iperf3来测量理论带宽。
从 Hyper-V 主机(Windows Server 2016)到其他 10Gbits/sec 服务器,它显示有 2 个并行工作器:

# iperf3 -c target.host -P 2
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec  5.48 GBytes  4.70 Gbits/sec                  sender
[  4]   0.00-10.00  sec  5.48 GBytes  4.70 Gbits/sec                  receiver
[  6]   0.00-10.00  sec  5.44 GBytes  4.67 Gbits/sec                  sender
[  6]   0.00-10.00  sec  5.44 GBytes  4.67 Gbits/sec                  receiver
[SUM]   0.00-10.00  sec  10.9 GBytes  9.37 Gbits/sec                  sender
[SUM]   0.00-10.00  sec  10.9 GBytes  9.37 Gbits/sec                  receiver

看起来不错,大约 10Gbits/秒

从来宾虚拟机(CentOS 7.4)我可以看到相同目标的相同性能:

[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  5.39 GBytes  4.63 Gbits/sec    0             sender
[  4]   0.00-10.00  sec  5.39 GBytes  4.63 Gbits/sec                  receiver
[  6]   0.00-10.00  sec  5.38 GBytes  4.62 Gbits/sec    0             sender
[  6]   0.00-10.00  sec  5.38 GBytes  4.62 Gbits/sec                  receiver
[SUM]   0.00-10.00  sec  10.8 GBytes  9.25 Gbits/sec    0             sender
[SUM]   0.00-10.00  sec  10.8 GBytes  9.25 Gbits/sec                  receiver

Linux 客户机之间的 NB 带宽看起来也不错,有 2-3 个工作进程时大约为 8Gbit/s。

但是如果我从 Windows Guest(Windows Server 2016 Datacenter)运行它,我会看到明显不同的画面:

[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec  1.25 GBytes  1.07 Gbits/sec                  sender
[  4]   0.00-10.00  sec  1.25 GBytes  1.07 Gbits/sec                  receiver
[  6]   0.00-10.00  sec  1.14 GBytes   983 Mbits/sec                  sender
[  6]   0.00-10.00  sec  1.14 GBytes   983 Mbits/sec                  receiver
[SUM]   0.00-10.00  sec  2.39 GBytes  2.05 Gbits/sec                  sender
[SUM]   0.00-10.00  sec  2.39 GBytes  2.05 Gbits/sec                  receiver

仅 2Gbits/秒。并行工作者的数量对摘要没有任何影响。

我尝试过多对:

  • Win VM -> Linux (硬件) - 约 2.5GBits/秒
  • Win VM -> Linux(VM,同一主机)-〜2.5Gits/秒
  • Win VM -> Win VM(同一主机)~ 1.5Gbits/s

-- 信息 --

Name                           InterfaceDescription              Enabled BaseVmqProcessor MaxProcessors NumberOfReceiveQueues
----                           --------------------              ------- ---------------- ------------- ----------------
NIC-1GBE-02                    QLogic BCM57800 Gigabit Et...#198 False   0:0              16            0
NIC-10GBE-01                   QLogic BCM57800 10 Gigabit...#195 True    0:0              16            0
NIC-10GBE-02                   QLogic BCM57800 10 Gigabit...#196 False   0:0              16            0
NIC-1GBE-01                    QLogic BCM57800 Gigabit Et...#197 False   0:0              16            0

# Get-NetAdapterVmqQueue

Name                           QueueID MacAddress        VlanID Processor VmFriendlyName
----                           ------- ----------        ------ --------- --------------
NIC-10GBE-01                   0       00-15-5D-04-11-05 50     0:0

PS C:\Windows\system32> Get-NetAdapterRss

Name                                            : NIC-1GBE-02
InterfaceDescription                            : QLogic BCM57800 Gigabit Ethernet (NDIS VBD Client) #198
Enabled                                         : True
NumberOfReceiveQueues                           : 4
Profile                                         : NUMAStatic
BaseProcessor: [Group:Number]                   : 0:0
MaxProcessor: [Group:Number]                    : 0:38
MaxProcessors                                   : 16
RssProcessorArray: [Group:Number/NUMA Distance] : 0:0/0  0:2/0  0:4/0  0:6/0  0:8/0  0:10/0  0:12/0  0:14/0
                                                  0:16/0  0:18/0  0:20/32767  0:22/32767  0:24/32767  0:26/32767
                                                  0:28/32767  0:30/32767
                                                  0:32/32767  0:34/32767  0:36/32767  0:38/32767
IndirectionTable: [Group:Number]                :

Name                                            : vEthernet (VSW-10GBE-01)
InterfaceDescription                            : Hyper-V Virtual Ethernet Adapter #2
Enabled                                         : True
NumberOfReceiveQueues                           : 16
Profile                                         : NUMAStatic
BaseProcessor: [Group:Number]                   : 0:0
MaxProcessor: [Group:Number]                    : 0:38
MaxProcessors                                   : 4
RssProcessorArray: [Group:Number/NUMA Distance] : 0:0/0  0:2/0  0:4/0  0:6/0  0:8/0  0:10/0  0:12/0  0:14/0
                                                  0:16/0  0:18/0  0:20/0  0:22/0  0:24/0  0:26/0  0:28/0  0:30/0
                                                  0:32/0  0:34/0  0:36/0  0:38/0
IndirectionTable: [Group:Number]                : 0:0   0:20    0:2     0:22    0:0     0:20    0:2     0:22
                                                  0:0   0:20    0:2     0:22    0:0     0:20    0:2     0:22

Name                                            : NIC-10GBE-01
InterfaceDescription                            : QLogic BCM57800 10 Gigabit Ethernet (NDIS VBD Client) #195
Enabled                                         : True
NumberOfReceiveQueues                           : 16
Profile                                         : NUMAStatic
BaseProcessor: [Group:Number]                   : :0
MaxProcessor: [Group:Number]                    : :38
MaxProcessors                                   : 16
RssProcessorArray: [Group:Number/NUMA Distance] :
IndirectionTable: [Group:Number]                :

Name                                            : NIC-10GBE-02
InterfaceDescription                            : QLogic BCM57800 10 Gigabit Ethernet (NDIS VBD Client) #196
Enabled                                         : True
NumberOfReceiveQueues                           : 4
Profile                                         : NUMAStatic
BaseProcessor: [Group:Number]                   : 0:0
MaxProcessor: [Group:Number]                    : 0:38
MaxProcessors                                   : 16
RssProcessorArray: [Group:Number/NUMA Distance] : 0:0/0  0:2/0  0:4/0  0:6/0  0:8/0  0:10/0  0:12/0  0:14/0
                                                  0:16/0  0:18/0  0:20/32767  0:22/32767  0:24/32767  0:26/32767
                                                  0:28/32767  0:30/32767
                                                  0:32/32767  0:34/32767  0:36/32767  0:38/32767
IndirectionTable: [Group:Number]                :

Name                                            : NIC-1GBE-01
InterfaceDescription                            : QLogic BCM57800 Gigabit Ethernet (NDIS VBD Client) #197
Enabled                                         : True
NumberOfReceiveQueues                           : 4
Profile                                         : NUMAStatic
BaseProcessor: [Group:Number]                   : 0:0
MaxProcessor: [Group:Number]                    : 0:38
MaxProcessors                                   : 16
RssProcessorArray: [Group:Number/NUMA Distance] : 0:0/0  0:2/0  0:4/0  0:6/0  0:8/0  0:10/0  0:12/0  0:14/0
                                                  0:16/0  0:18/0  0:20/32767  0:22/32767  0:24/32767  0:26/32767
                                                  0:28/32767  0:30/32767
                                                  0:32/32767  0:34/32767  0:36/32767  0:38/32767
IndirectionTable: [Group:Number]                :

Windows 客户机有什么问题?我可以调整什么来达到 10Gbit/s 左右?

答案1

尝试禁用虚拟交换机上和虚拟机内部的 VMQ。

以下是来自的链接微软戴尔关于此事。

答案2

您的描述与此 KB 完全相同:“如果启用了 VMQ,Windows Server 2012 Hyper-V 主机上的虚拟机网络性能较差“。

必须为您的适配器禁用 VMQ。如果这不起作用,请检查事件日志以了解原因。

相关内容