in this video I'm going over a Azure VM network performance with proximity
placement groups and accelerated networking
hello everyone I'm Travis and
this is Ciraltos in this video I'm going over improving vm network
performance with proximity placement groups and accelerated networking before
that please take a second to subscribe and if you enjoy these videos click on
the thumbs up to let me know this helps support the channel in the content let's
jump into it with the new-er proximity placement groups available in Azure I
guess it's been a ga for a few weeks now a proximity placement group is a logical
grouping of Azure VMs or scale sets in close proximity keep in mind that a
region can consist of multiple data centers that could be hundreds of miles
apart deploying two VMs to a region even if it's in the same resource group does
not dictate that they are physically close or even in the same data center
this potential distance can increase network latency between servers although
the latency has minimal impact for many applications some applications are
highly sensitive to network latency and keeping all servers and applications
together will increase performance and reliability using proximity placement
groups will deploy servers to the same data center thereby lowering Network
latency between the servers in the proximity group a proximity group can be
used with availability sets and availability zones but it can't span
zones keep in mind that an availability zone intentionally spread servers across
multiple data centers in a region as a way to increase availability protecting
against a data center failure proximity placement groups can be used alongside
availability zones but not together matter of fact proximity placement
groups are almost the opposite of an availability zone proximity placement
groups are for performance and availability zones are for well
availability let's look at an example of how this could be used let's say you had
an application that consists of two front end servers and two back-end
servers each of the servers are deployed to an availability set.all service can also exist in the
same proximity placement group this places them close and proximity to each
other in this configuration there's protection from a host failure with
availability sets and performance improvements with proximity placement
groups this would be the same if we replace the availability sets with scale
sets it's been an understanding for a while that servers and an availability
set are deployed in close proximity this is not guaranteed by Microsoft and it's
recommended to use proximity placement groups to accomplish this proximity
let's look at how availability zones and proximity placement groups work together
here we have servers in a proximity placement group improving performance by
keeping them close together the two servers are also in one region in an
availability zone now we duplicate that into a second availability zone and a
new proximity placement group the application is protected against data
center failures with availability zones and performance is optimized by keeping
them in proximity placement groups at each availability zone accelerated
Network enables something called single route IO Burt utilization the data path
bypasses the host to reduce latency jitter and load on the CPU network
policies that may be in place are offloaded on the hardware and in the end
traffic takes a more direct path between the VMS reducing latency here's an
overview of how it works without accelerated networking traffic passes
from the VM to the virtual switch and out the server NIC and then into the
switching environment from there at traffic goes to the physical NIC into
the virtual switch and then into the VM with accelerated networking enabled
traffic arrives at the VMs NIC bypassing the host and virtual switch the overhead
from the host and virtual switch are removed network policies are offloaded
and applied to the hardware for best results in able it on two or more VMS
connected to the same vnet accelerated networking is not supported on all VMs
and os's on the screen is a list of sizes and os's that are supported I'll
include a link to the full list below for the demo I'm going to compare
performance with and without proximity placement groups and accelerated network
first I'm going to run a latency test between two servers and two different
availability zones services deployed to a region could exist anywhere within
that region using two different availability zones gives me the worst
case scenario for distance between the servers next I'll deploy two servers in
a proximity placement group with accelerated networking and run the same
test again then we'll review the results let's get started hello everyone here I
am at the portal and I've got two virtual machines I'm going to work with
first the AZ01 and AZ02 these are both in different availability
zones so we can come in and take a look at that here one is in availability zone
one and two is an availability zone two and as I said previously the reason I
did this is to verify that these two machines are going to be in different
data centers if I was to just deploy two virtual machines without any other
settings in the same region it's possible that they could be in the same
data center or in different data centers so I wanted to go with a worst-case
scenario type of situation with these two as I measure the latency between
them so I use the availability zones for that let's go into the first one Here I
am in AZ02 let's just make sure of that there we go I've got a little bit
darker background on a Z 0 2 this is going to be my sender so a Z 0 1 is
going to be the target and I'm using Latte a it's a program that Microsoft
recommends for measuring latency Latte measures TCP and UDP delivery time
unlike tools like ping that measure ICMP time so the results are going to be a
little bit different from what you get with latency of running a ping but it is
consistent and it's measuring the latency between the two servers so I'm
going to go over to 02 I have got a couple commands to run the first is
going to open up the port on the firewall and the second is going to
start the server and I can make these commands available on my blog but
basically it's just running the latte Exe and it's setting the server to the
10.0 0.4 on port 5005 and then it's setting the iterations at 65,100 so
I'll run that and again unlike ping there's actually a client-server piece
of it so this would be equivalent to the server piece so I run that it's going to
wait for the client or the sender I'm gonna hop back to 0-2 and again this is
the sender so that's gonna run the test and this will take a few seconds to
finish I'll be back when it's done okay that finished and it's at latency here
in the usec or microseconds I think that is is three hundred and thirty six
point zero five I'm going to run this a couple more times so we can get a set of
results from multiple runs so in order to do that I need to go back to one it
does stop the server when the test is run so I have to start the server again
and run the test again okay so this time the latency is four oh four point three
eight and I'm going to run it one more time so I'll hop back to the server
start the server and let's go back to the sender here we are and we'll run it
one more time okay so the third one finished and that's at 341 point four
seven for the latency in microseconds that average is about 360 usecs so now
that I have the results on two virtual machines in different data centers
without any network acceleration I'm gonna switch over to proximity groups
running the same test on two servers that are in the same proximity group
with accelerated networking here I'm back at the portal and I've got a
resource group that I have all these virtual machines in and the first thing
I'm going to do is create a proximity group so I'll go to add and type in
proximity group proximity placement group there we go so I'll create one and
it's got my subscribe chin and resource group set I'm gonna
change the location to central US and given a name next is review and crate
and crate so I'll just take a second to crate
alright that finished let's go back to the resource group here I'm now I'm
going to walk through deploying a server in proximity placement group so I'll go
ad and I'm gonna use a Windows server and I'll select the image I want and
crate in this case data center 2019 I'll leave the subscription of the
resource group as is I'm gonna give it a name set the region to central us I have
no availability options my image is set I have to change the size because again
not all VM types and sizes support proximity placement groups I'm just
gonna pick this one I know that works I'll give it a username and password
I'll leave the rest as is it move on to disks change this to standard I don't
need premium for testing Network I'm gonna add it to an existing v-net I
don't need an external IP and down here is accelerated networking now if you get
to this point and that's not an option that means your VM size is incorrect so
you'll have to go back and look at the requirements and make sure you have the
correct VM size selected next I'll move on to management and in a test it'd be a
good idea to select Auto shut down I'm gonna just move on to advanced and here
is proximity placement group here's where I'm gonna select the proximity
group that was set up in the previous step next to tags and review and great
ok validation passed now I'm not actually going to deploy this because I
have two already that we're set up the exact same way but I still need to add
them to the proximity placement group we just created next I'm gonna go back to
the resource group if you're following along and you want to deploy a couple of
these for testing go ahead you can just pause here and come back once it's done
here I'm back in the resource group and I have two virtual machines
PPG1 & PPG2 - i'm going to go into configuration on the first one and here
is the proximity placement group i have to change this to the one we just
created and then I'll click Save I'm going to go back to that resource group
and go into the second one go to configuration and select the same
proximity group we can just double check the networking - if I come up here to
networking network interface properties
you can see accelerated networking is on and I know that's set for both of them
I'm going to pause here so I can start those two VMs and then we'll come back
in and run that same latte test and see what the results are here I'm logged
into those two servers so these two servers have accelerated networking
enabled and they are on the same proximity placement group let's just
take a look at the host names here okay this is PPG2 this is going to be the
sender and I'm going to go over to ppg1
let me make sure that's it there we go and this is going to be the receiver
first I'm going to run the netsh command to allow latté through the
firewall okay that's set and then I'm going to set up the server piece okay so
that's running and waiting for the sender and here I'll run the sender so
again these are the exact same commands I ran previously between the two servers
in different availability zones so here latency is down to 134.03 I'm going to
run it two more times and if you remember between each run I have to
restart the server component
second-run is 135.14 let's run it one more time
I'll go back to the server and run the receiver command and then back on the
sender I'll run the sender command and that's 140.12 okay so the average
of those three were 136.43 that means the difference in latency
between the two servers in the availability zone and the two servers
that are in the proximity group with accelerated networking is 224.2
usec or microseconds that's a very significant reduction in latency
between the two tests as you can see the proximity group and accelerating
networking do make quite a difference so if your application requires low latency
that's gonna be your best bet that's it for the demo and as you can see using
proximity placement groups and accelerated Network significantly
decrease latency between the two servers thanks for watching and don't forget to
subscribe like and click the bell icon for notifications of new content thanks
for watching