Another update from the VMQ front, this time with the formal announcement of a declaration of peace.
After a very long struggle – which started in November 2013, not long after the release of Windows Server 2012 R2 – I dare now confirm that VMQ can be re-enabled on Windows 2012 R2 Hyper-V hosts with HP/Emulex 554FLB host bus adapters.
![]()
If you have followed along, you will know that we have published several blogs on Hyper-V.nu discussing the matter. We initially discovered the problem in our own lab environment, then explained how to avoid the network disconnections by disabling VMQ, followed by how we tested the numerous HP/Emulex firmware and driver updates and about our interactions with Microsoft, Emulex and to a lesser extent HP. Many customers who were using the HP/Emulex, but also many other using OEM versions, were badly hit by the networking problems. The problem with VMQ became well known all over the world, not to say notoriously known.
Several weeks ago I was able to test a combination of new HP/Emulex firmware and drivers (February 2015), combined with a private Microsoft hotfix (The KB for the final hotfix is KB3031598), provided by the Microsoft Networking team in Redmond. We already saw promising results using older versions, but there were a couple of remaining issues which had to be solved in the Windows NIC Teaming (LBFO) stack. One issue that I kept seeing was that when there were more VMs running on a particular host in the cluster than there were VMQs available, things started to collapse. Not only were the additional VMs not getting a VMQ Queue, they would also not get assigned to the default VMQ Queue. Other VMs that were already assigned to a VMQ Queue, were disconnected and it took some time for this problem to settle and make connections possible again.
Using the latest firmware/drivers with the Microsoft LBFO hotfix solves that problem (amongst others).
It is time to say that we have the worst behind us.
The big question of course, is it safe to just install the new firmware/drivers and the hotfix? Well, I’m confident that you can but please don’t rush it. Take a good look at your teaming configuration and make sure that, if you are in a sum of queue mode (which is the case if you have a switch independent/dynamic teaming configuration), make sure that processors don’t overlap.
In our example we have the following configuration (which I have shown before and you can also see in the bonus blog by Cristian Edwards, which I provided based on our setup: http://blogs.technet.com/b/cedward/archive/2014/02/28/hyper-v-2012-r2-network-architectures-part-8-of-7-bonus.aspx)
I’ll show you my teaming and Hyper-V switching configuration below, and please note the use of RSS, VMQ and the allocation of logical cores to the different network ports.
In sum-mode VMQ, the number of VMQs on a team is the sum of the number of VMQs on the *active* members. In my example that is 60 (30 + 30). You may see only 30 if one of your NICs is disconnected or failed for some other reason. One of the modifications by the way is that 1 VMQ queue is reserved so you’ll see 29 per port and 58 per team.
[image not preserved in the archive]
The squared lines in the above diagram depict 4 network ports, each network port is avoiding logical core 0 (0+1) and and 1 (2+3). RSS is configured to use separate cores on each port 1 and 2. VMQ is configured to also use separate cores on port 3 and 4 and getting a few more queues than RSS. The exact numbers are dependent on the number of logical cores in your server configuration.
# RSS
Set-NetAdapterRss -name “Embedded FlexibleLOM Port 1” -Profile NUMAStatic -NumberOfReceiveQueues 3 -BaseProcessorGroup 0 -BaseProcessorNumber 4 -MaxProcessorNumber 8 -MaxProcessors 4
Set-NetAdapterRss -name “Embedded FlexibleLOM Port 2” -Profile NUMAStatic -NumberOfReceiveQueues 3 -BaseProcessorGroup 0 -BaseProcessorNumber 10 -MaxProcessorNumber 14 -MaxProcessors 4
Get-NetAdapterRss | sort name | ft -AutoSize
[image not preserved in the archive]
# VMQ -> see correction at bottom of blog
Set-NetAdapterVmq -Name “Embedded FlexibleLOM Port 3” -BaseProcessorGroup 0 -BaseProcessorNumber 16 -MaxProcessorNumber 22 -MaxProcessors 8 4
Set-NetAdapterVmq -Name “Embedded FlexibleLOM Port 4” -BaseProcessorGroup 0 -BaseProcessorNumber 24 -MaxProcessorNumber 30 -MaxProcessors 8 4
Get-NetAdaptervmq | select Name, InterfaceDescription, Enabled, BaseVmqProcessor, MaxProcessors, NumberOfReceiveQueues | sort name | ft -AutoSize
[image not preserved in the archive]
As you can see there are not 2 x 30 but 2 x 29 VMQ queues available.
During my test I rapidly created 70 VMs using PowerShell and tested how the allocation of VMQ queues behaved. You can do some checks with:
Get-NetAdapterVMQQueue
[image not preserved in the archive]
To see some additional information you can issue:
Get-VMNetworkAdapter -All | select Name,VMQWeight,VmqUsage,VMQueue
Now that networking with VMQ Enabled is stable again, it is interesting to see the true benefit of VMQ for VM network communication. Therefore I created a VM with 16 vCPUs and enabled virtual RSS (vRSS). vRSS can only work if you have VMQ enabled on the network ports and combined with a Windows Server 2012 R2 Hyper-V virtual switch.
Get-NetAdapter | Enable-NetAdapterRss
Get-NetAdapterRss
[image not preserved in the archive]
I used ntttcp.exe to test network communication between machines using the following parameters:
Sender
ntttcp.exe -s -m 8,*,172.30.103.101 -l 128k -a 2 -t 15
Requester
ntttcp.exe -r -m 8,*,172.30.103.101 -rb 2M -a 16 -t 15
Very quickly you can see that the VM network adapter is capable of using 100% of the 10Gb Ethernet connection.
[image not preserved in the archive]
[image not preserved in the archive]
As you can see we are finally where we always have wanted to be and enjoy the great networking performance between VMs in the latest version of Hyper-V.
This problem has taken quite a bit of time before it was acknowledged but once Microsoft, Emulex and HP started to work together, things started moving. I have spent a good number of weekends trying to see what improvements had been made, sometimes completely wrecking my cluster only to find out that I had to go back, switch off VMQ again and let it rest for another couple of months.
This time we can declare the VMQ problem with HP/Emulex network adapters has been solved!
Important
Although I’m very confident about the positive result, I still advise you to verify this in your own environment very carefully, preferably a lab or some other test/dev cluster that is not mission critical. Please take your time to verify that VMQ also behaves as expected in your environment
The main steps for this could be:
- Isolate 2 Hyper-V hosts from your cluster
- Install the latest HP/Emulex firmware/drivers (February 2015 or later)
- Enable RSS and VMQ on your physical network ports that are used for the teams
- Install the LBFO hotfix
- Create the teaming configuration (best practice is still switch independent/dynamic)
- Configure RSS if you have a separate datacenter team (MGT, LM, CSV, SMB3)
- Configure VMQ for the team used by your Hyper-V switch
- Reboot
- Configure a Hyper-V switch and connect it to the team with the VMQ enabled ports
- Create a new test cluster
- Run a cluster verification test
- Create more VMs than the sum of available VMQ Queues
- Enable vRSS in at least 2 VMs with a good number of vCPUs
- Test network communication using ntttcp.exe (as shown above)
Hopefully you’ll see the same benefits as we do with this combination.
HP will publish the latest firmware/drivers in their next HP ProLiant Service Pack (which is expected at the end of this month). Here is a temporary link I used during testing, but I’m not sure this will be the one that is published by HP:
02/03/2015 10:21 24,185,200 cp024655.exe 10.2.477.10 HP Firmware Flash for Emulex CNA – Windows (x64): ftp://h2.usa.hp.com/cp024655.exe
02/03/2015 10:21 1,494,184 cp025922.exe 10.2.531.0 HP Emulex 10/20 GbE Driver for Windows Server 2012 R2: ftp://h2.usa.hp.com/cp025922.exe
The Microsoft hotfix required is KB3031598
Finally, I’d like to thank the many people at Microsoft, HP and Emulex who contributed to this solution but especially the Microsoft Networking team who devoted lots of their time and kindly provided me with several versions of the LBFO hotfix. In the end the cooperation and driver development process seems to have improved a great deal.
So there is still hope for vNext arriving somewhere in 2016.
Best of luck!
Hans
Additional notes
Today I saw a comment by Frank Bosman, Tim van Meerveld from Microsoft and Marcin Rajtar from Emulex who added a couple of important notes around using the Emulex 554 chipset specifically:
“During our session with Emulex where we solved this issue completely we also found out you have to be very careful with the NUMA nodes and how the NIC’s are connected to these NUMA nodes. Crossing a NUMA node by using the q-link is killing for the network performance, so you have to find out this hardware relation.
Besides that, we have to make a warning about using vRSS with the current Emulex chipset (554), what is not able to send pause-frames and thereby saturating a network completely. This is because the sending part is able to transmit packets in a much higher speed then the receiving part can manage. You can make this visible in the Emulex driver (dropped packets).
Besides this, the number “29” queues is depending on how many NIC’s are configured in the Virtual Connect, because every NIC will take another queue of the total.”
Second additional note:
As some of you have noticed (thanks Greg, Frank, Charbel!), I have used 8 for MaxProcessors thinking logical processors were meant. In fact you have to put in 4 processors (even numbers)
For example, if you have two eight core processors and Hyper Threading enabled, you will see 32 processors in Windows tools that show you processors, such as Task Manager. VMQ can only use 16 of those, since it only uses the even numbered processors. To split these processors across two NICs in my configuration I use the following commands to set each NIC to use different processors for VMQ:
# VMQ using processors 16, 18, 20, 22 for port 3 and 24, 26, 28, 30 for port 4
Set-NetAdapterVmq -Name “Embedded FlexibleLOM Port 3” -BaseProcessorGroup 0 -BaseProcessorNumber 16 -MaxProcessorNumber 22 -MaxProcessors 4
Set-NetAdapterVmq -Name “Embedded FlexibleLOM Port 4” -BaseProcessorGroup 0 -BaseProcessorNumber 24 -MaxProcessorNumber 30 -MaxProcessors 4
Get-NetAdaptervmq | select Name, InterfaceDescription, Enabled, BaseVmqProcessor, MaxProcessors, NumberOfReceiveQueues | sort name | ft -AutoSize