Mastering Latency Testing with PsPing: IT Admin Edition

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello my name is LOL Vanderpool and this channel is dedicated to it students it professionals and anyone who enjoys learning technical [Applause] [Music] [Applause] subjects we are on part three of our look at CIS internals utility Suite we have picked out the PS tools list of utilities these are powerful remote tools that Mark renovich wrote looking at psping in terms of latency and bandwidth measurement a lot of our insight into these tools is coming from a textbook that was written by Aaron and Mark it was called troubleshooting with the windows syst internal tools so if you'd like to get a copy we got information here you can also grab a copy if you'd like to use this resource so what is latency latency is set amount of data how long does it take to get from this point to this point so that time is measured typically in milliseconds although sometimes it's measured in microseconds but it's that time that it takes for that data to get from this point to this point psping is going to do a round trip so we're going to measure the time it takes from the origination to a server and then back again so it's a round trip or rtt so what are the causes of latency well we have transmission mediums such as our y network Fiber Optic Cables all have limitations and they affect the delay in time to get data from here to here propagation it takes time even at the speed of light to move information from one point to the other routers are a big problem because they have to analyze the header of every packet and in some cases when you have multiple routers each one add that delay in time to get data from one point to another and then the evil of the internet is buffering buffering is when we avoid dropping packets at a router or a switch or a firewall or whatever by storing packets for a period of time both coming in and leaving that buffering adds time to the packet getting from one point to the other now for web traffic there's lots of ways you can reduce latency you can add CDN devices content delivery networks HTTP 2 fewer HTTP request using prefetch methods browser caching but all traffic is not web-based we've already talked in data centers have lots of routers lots of switches and that evil buffering those type devices can add latency within a data center the optical transceiver as you see the picture on the bottom right Optical transceivers have to take Optical signals and convert them into electrical and they add latency measuring latency is very important for the it pro for example look at the graphic on the left it says that we have a local user and he's connecting to a server and he connects with 150 packets going back and forth to the server and but he connects in about 0.5 seconds which is good the next graphic which is in the middle of the slide the client is still connecting with 150 packets back and forth but it's taking 7.5 seconds that's latency that's a problem now the biggest evil in latency is known as buffering so here I've got a diagram and this is input q and output Q as traffic comes into a switch or a router or a firewall or load balancer you have the potential of dropping packets which is deadly for TCP traffic not UDP traffic but TCP traffic so to avoid that the makers of routers and switches and firewalls and load balancers and all the other stuff that's running on the internet they put memory and here they're calling it an input Q that's just simply memory and an output q and we simply call these cues buffering they bring the data in they store it so we don't ever drop any packets and then they send it out so you got memory on the input memory on the output this is known as buffering and it prevents packets being dropped well that's great but it's delaying latency is going up the potential of dropping packets goes down and that is the tradeoff improperly setting of buffering can really add latency how do I begin to use psping for measuring latency and bandwidth well the first thing we want to do if I want to measure if we look at this slide and I want to measure the latency between my admin station and a server in my data center I'm going to log on to this server run an admin Powershell and I'm going to type in psping use a minus s and that's going to turn psping into a server process and I'm going to put the IP address of this computer which is 19216801 120 I'm going to pick a port 5000 and this process is going to be running on this server client or whatever it is it's going to be listening to Port 5000 then I come over to my admin station and then I'm going to send my packets to this IP address and that port number This Server process has to be extremely optimized for receiving and transmitting back that's what it's going to do it is optimized for Network listening and sending back its job is to take the echo request from the admin station immediately send it back because we don't want to impact our latency measurement we want it accurate so this PS server process has to be extremely efficient and it is it runs in a single thread it does very little file IO so that it's fast quickly we must enable a psping server we have to have a port number both for the client and the server UDP can be used so we can actually use UDP in this test one last thing depending on the antivirus you use some antivirus has its own fire wall you may have to disable that antivirus because a lot of antivirus firewall implementations are extremely aggressive and you just can't get anything through you may have to disable a firewall temporarily to do a latency and bandwidth test a lot of the parameters are the same here's a couple unique ones minus U this allows you to test UDP instead of TCP the other one is minus r requested data is sent from the psping server to the client instead of the client to the server so that's interesting all the other parameters you're very familiar with we cover them we have to have a psping server running on the destination device to do latency and bandwidth keep in mind firewall has to be open so you may have to either adjust your firewall or disable it temporarily psping server must be on a device that you have rights to and a single instance of PSP Ping Server can support both latency testing and bandwidth testing to run the server we simply go to a destination device run PSP ping DS we need the address of that machine colon and an aort number that you're going to use you can use the dasf it will help create a temporary firewall rule you must have admin rights in order to use the- f feature this firewall rule feature did not work on my Bit Defender antivirus package that I run on my admin workstation but it did work with Windows Defender here's my destination device and I'm going to be using it to install psping server I see that my IP address is 128 psping minus s that immediately turns this software module into a server then we're going to use 1921 168 now that I've put in the IP address of this device I'm going to use 5000 as my port and I'm going to hit enter and notice Windows Defender says whoo you're going to be listening I'm going to allow access and now it says type contrl c to exit waiting for TCP connection on this IP address at this port number if I launch process Explorer I'm going to run it as an administrator and we'll go look at this server so I'm going to slide down and notice under Powershell is a conhost and under conhost is PSP ping.exe so that is now running as a process on my destination device I'm going to right Mouse click go to properties go to TCP I'm looking at the network and you can see this process is listening right now and that's exactly what we want it to do on Port 5000 if I launch TCP view which is going to allow me to see all the modules of software what port they're on are they listening we're going to launch this take a look and you can see PSP ping is using TCP it's listening and it's on this IP address and it's using Port 5000 we're ready to go now in regards to the parameters for latency testing there are some differences with latency parameters than what we saw in PSP ping using icmp and TCP let's take a look first of all-i is gone we can't control interval we don't have- Q which delayed the output until we were finished so those parameters are not available a in latency testing we've got some new ones- R requested data is sent from the server to the client instead of the client to the server so that's interesting the rest of them are pretty much the same we now have a minus U which allows us to test UDP instead of TCP so here below I have my psping server and you can see it it's waiting above you see my admin station where I'm going to connect to that and we're going to test latency I'm going to make the packet size-l 1500 bytes there's the IP address of my psping server at Port 5000 so we'll go ahead in and notice at the top we see the client TCP latency test connecting to our server at Port 5000 we connected it we sent a warm-up packet which wasn't measured we sent 1500 bytes to that device and then we we are have received back four packets they were a total of 6,000 bytes our latency was .24 milliseconds maximum 1.36 milliseconds average was 0.53 milliseconds now come down here to the server it has statistics that we can look at it was waiting for the TCP connection it connected it received five packets one was the warmup it would reive 1500 bytes it's a TCP latency test it was this was a complete round trip it received four packets each, 1500 bytes for a total of 6,000 the latency was. 22 milliseconds maximum was. 28 8 milliseconds average was. 26 milliseconds now there's a difference between the server latency values and the client latency values why remember the client looks at the round trip the server simply measures based on when it received from the client so they will always be slightly different now in the parameters both ping using icmp using TCP latency and bandwidth you can gather data what's known as histograms notice the parameter DH I haven't talked about it at all it is a way of collecting data and displaying your data in a special way histograms are like bar charts but they're not exactly the same as bar charts it's a way of showing in a bar graph data over a range or distribution of data data I have probably seen many histograms in various displays of data showing or demonstrating how information is distributed over a a range of values I thought it was a bar graph but there's a difference between a bar graph and a histogram network data lends itself really well to this histogram the terms that they use are buckets and bins basically what they're talking about when they say buckets and bins is they're talking about a range of values so they're going to have a range of values and each of those ranges are going to be called buckets or bins now Mark doesn't tell us anything in the information that he has given us concerning this histogram how he calculates this so if you do Dash you're going to get 20 buckets 20 ranges but he doesn't explain how he calculates it let's go take a look at it I went to Wikipedia here's a picture of a histogram here's the data collected and then it's just displayed in what looks like a bar chart but it's not it's a histogram I have a psping server and I went ahead and did PS ping - L we're going to use a 1500 byte packet - n so we're going to do a th000 pings and DH and I put a value of 10 so we're only going to have 10 buckets 10 bins or 10 ranges all of those are pretty much synonymous terms we're going to go to this server and this port now if you look at the results it's a TCP latency test did connect it sees the port it did 1,5 iterations five were warm up and sent all that information to the psping server and back now let's look at the histogram data notice we have 10 ranges and the first one is the the quickest packet what had a latency of 0.32 and notice almost all of them out of a thousand 995 fell into this first bucket or range of 32 so everybody got there and back pretty quick and pretty much in the same time I had four in the 1.25 range or bucket or bin whichever you want to call it I had four packets in that and then only as we got to 8.65 milliseconds did I have one packet that took forever to get there and back it must have fell asleep or got lost or whatever I don't know capturing this kind of data one time is probably not of Great Value but if you think about it if you started capturing this kind of data from 8:00 when everybody logs on and then at various strategic times throughout the day you could pull all this into Excel plot this on a histogram and you could see throughout the day where your latency really goes up where it's really low and it would give you a nice visualization of how your traffic is on your Network all right how can I collect this data to play with histograms let's run psping and we're going to redirect it to a CSV file I'm going to use the redirection symbol which is the greater than and I'm going to give it a path and I'm just going to put in a CSV file and that saved it into a CSV file I'm going to go find that file to e down here somewhere and notice my Excel already looks for that extension CSV so I'm going to double click it's going to launch Excel you can see there is my data I can just highlight the data and come up to insert and come over to the graphs and choose the histogram now this automatically looks at the data automatically tries to build the chart it doesn't do a great job you can come in here and tweak all this I've gotten you about as far as I can get you and not be ignorant you can go in and adjust the vertical and the horizontal I'm not at all an expert in histograms but this is the steps you would take to get started building your histogram by the way I watched a number of videos on YouTube on histograms they never got me quite to where I could get the chart to follow the data like I wanted it to so go for it put any comments that you have some of you may be very comfortable with this love your comments [Music] below [Music]
Info
Channel: TechsavvyProductions
Views: 2,361
Rating: undefined out of 5
Keywords:
Id: 5G9REjqE-fs
Channel Id: undefined
Length: 19min 27sec (1167 seconds)
Published: Sun Sep 17 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.