Azure Accelerated Network Is Generally Available
Microsoft recently announced that Accelerated Networking is now generally available for Windows (previously GA) and Linux (new) virtual machines running in Azure.
Background
Accelerated networking is a system where virtual machines bypass the virtual switch of the underlying Azure Hyper-V host and inbound and outbound packets travel directly between the virtual machine’s virtual NIC (virtual function or VF) and the host’s physical NIC (physical function or PF). This results in:
- Better bandwidth per virtual NIC
- Lower latency
- Reduce latency
- Better processor performance (more on this later)
![How Accelerated Networking impacts Azure virtual machine architecture [Image Credit: Microsoft]](https://petri.com/wp-content/uploads/sites/3/2017/08/AzureVMAcceleratedNetworkingSR-IOV.png 994w, https://petri.com/wp-content/uploads/sites/3/2017/08/AzureVMAcceleratedNetworkingSR-IOV-300x126.png 300w, https://petri.com/wp-content/uploads/sites/3/2017/08/AzureVMAcceleratedNetworkingSR-IOV-768x323.png 768w, https://petri.com/wp-content/uploads/sites/3/2017/08/AzureVMAcceleratedNetworkingSR-IOV-500x210.png 500w)
Enabling Accelerated Networking
You can enable Accelerated Networking when creating a new virtual NIC for a new virtual machine. If you have an existing virtual machine, then you will have to delete the virtual machine and recreate it from the existing disks (you lose nothing but time):
- Managed disks: Build the new virtual machine, with Accelerated Networking enabled, from the pre-existing OS disk (Azure Portal or PowerShell) and add the data disks afterward.
- Un-Managed disks: You will have to use PowerShell or JSON to re-create the virtual machine with Accelerated Networking enabled.
Availability
The availability of Azure PowerShell depends on:
- The series/size of the virtual machine
- The guest operating system
- Only ARM virtual machines are supported – another reason to upgrade from classic/ASM deployments!
The following series are supported:
- D/DS_v3 with 8 vCPUs or more
- E/ES_v3 with 8 vCPUs or more
- D/DS_v2 with 4 vCPUs or more
- F/FS_v2 with 4 vCPUs or more
- Ms/Mms with 4 vCPUs or more
Note that 8 vCPUs on a D_v3 is 4 cores and 4 vCPUs on a D_v2 is also 4 cores. 4 cores appears to be the magic entry point at this time.
Unsupported Virtual Machines
If your virtual machine is not supported and you want to improve networking performance, you should verify that RSS (Receive Side Scaling) is enabled in the network adapter properties of the guest OS, as discussed by Microsoft.
Timing
The timing of the GA is wonderful for two reasons. The first is that Microsoft recently updated the Azure virtual machine specifications documentation to give us real max bandwidth figures for each size of the virtual machine. Previously, we had to decipher what “low”, “medium”, and “high” meant. Now we can see what is possible, if we enable the free Accelerated Networking feature if the virtual machine can support it.
Microsoft stated:
… worked to optimize the CPU and disk I/O path and are not seeing noticeable performance impact after the fix has been applied.
And went on to state:
A small set of customers may experience some networking performance impact. This can be addressed by turning on Azure Accelerated Networking.
The timing of the GA of Accelerated Networking couldn’t have been better! Why would Accelerated Networking help? When a virtual machine uses the default path of networking, packets have to flow across the following to travel between physical NIC and the virtual NIC:
- Drivers in host kernel mode
- The virtual switch in host user mode
- The VMbus in kernel mode
There are more context switches when this default path is used. Therefore the impact of the Meltdown fix (as it stands today) is magnified. If we can reduce those context switches by enabling Accelerated Networking, then more processor time is made available to the services in the virtual machine.