Sunday, April 10, 2022

Reduce latency on Azure with Accelerated Networking

With Azure's accelerated networking feature, you can greatly reduce latency and improve the performance of virtual machines.


In this blog, I'll briefly describe what accelerated networking is and how it improves performance based on testing I've conducted.

What is accelerated networking?


If you are not familiar with accelerated networking, there is a good overview, here. "Enabling accelerated networking enables single root I/O virtualization (SR-IOV). SR-IOV enables network traffic to bypass the software switch layer of the Hyper-V virtualization stack." I see this as off-loading, "By moving much of Azure's software-defined networking stack off the CPUs and into FPGA-based SmartNICs, compute cycles are reclaimed by end user applications, putting less load on the VM, decreasing jitter and inconsistency in latency."

A picture tells 1000 words.

Accelerated networking
(Source: Microsoft.com)


Testing methodology

  1. Deploy two Linux virtual machines (used Bicep for repeatability)
  2. Install sockperf (used cloud-init to automate install)
  3. Test latency with sockperf before enabling accelerated networking
  4. Test latency with sockperf after enabling accelerated networking (by redeploying bicep with accelerated networking enabled)

Test 1 - Latency between availability zones


Test 1 - Results



Test 1 - Summary


Azure networking is blazing fast. We have microsecond latency even between availability zones. However, as we can see from the test results, enabling accelerated networking on the virtual machine nics improved performance by 35%. 



Test 2 - Latency within an availability zone (e.g., zonal deployment)


Test 2 - Results




Test 2 - Summary

Latency within an availability zone is impressive and on par with latency between zones, but, whoa, when we enable accelerated networking on the virtual machine nics there is a whooping 850% improvement!


Test 3 - Latency within a Proximity Placement Group


Test 3 - Results


Test 3 - Summary

Not surprisingly, Proximity Placement Groups, which places virtual machines in close 'proximity' for the lowest latency possible is impressive, but, once again, enabling accelerated networking drives latency improvement, in this case 300%.


Article summary

Enable accelerated networking on your virtual machines!

Enabling accelerated networking greatly improves the latency between virtual machines within a virtual network. It was surprising to see that enabling accelerated networking between virtual machines in a zonal deployment has similar latency to that of a proximity placement group. 

Note: I don't see downsides to enabling accelerated networking. While it is not supported on all virtual machines, nearly all of them support it and if you are using OS images based on the Azure gallery, all the necessary drivers are included. It should also be noted that there is no additional cost to enable accelerated networking.

Note2: according to Microsoft documentation, enabling accelerated networking does not have significant benefit across virtual networks or when connecting to corporate networks over Express Route and or VPN so keep that in mind. 




No comments:

Post a Comment

Reduce latency on Azure with Accelerated Networking

With Azure's accelerated networking feature, you can greatly reduce latency and improve the performance of virtual machines. In this blo...