Full transcript of “Delays in Network and Throughput - Part 01 | Computer Networks | Prof. Neminath, IITI”. Click a timestamp to open the video at that moment. Need another video? Use the YouTube transcript generator.
0:03 [music] Welcome back. In the last lecture, we started discussing the delays incurred during the transmission. So, we'll continue that discussion today as well. And uh we'll add or study few more uh kind of the delays. So mainly the propagation delay and the processing delay. And we'll briefly revisit the queuing delay and towards the end we'll discuss the uh how do we calculate the throughput of the network. [snorts] Uh so let's begin with the first kind of the delay that is called as the
0:50 propagation delay for today's discussion. So we said that transmission time or the delay is the time taken for the uh bits to be put onto the link. So we have a buffer and from that buffer till the point here putting onto the link then whatever time it is taking that is exactly the uh the transmission time. So depending upon the width of this link, how many bits can actually flow in that particular uh link. So you can either put more number of the bits or less number of the bits. If the link has a larger capacity, then you can push large number of the bits and on the other hand
1:35 if the link is slower in speed, then you actually able to put less number of the bits. So once the transmission is actually ending uh so from that point of time uh the data to move to the other end whatever time it is taking that we roughly call it as the propagation delay. So this is what the propagation delay roughly maps to. So suppose if I transmit one and the one is actually flowing on the wire or the link and it reaches the other end from the sender to the recipient. So this time that is taken after the transmission is done. So this is called as the roughly we call it as a propagation delay. [snorts] So uh on the physical link uh there is
2:23 exactly there is a signal that is propagating from the sender side to the recipient side. So this time uh so if you can recolct the earlier discussion so if you have a pipe the pipe at the when you say trans something is transmitted I'm actually putting several drops of the liquid at the starting of the pipe and that drop immediately do not appear at the other end. So how much time it takes for that particular every drop that I put on the one side to it to appear on the other side. So this time is actually the propagation delay. So this is a function of the distance between the source and destination. So the propagation delay
3:09 let me denote it as t propagation is uh distance between the source and the recipient or the sender and the recipient uh divided by the speed with which the transmission actually happens. this the speed is actually a characteristics of the physical wire that you you have used in the link. Uh so if it is a optical fiber link so then the speed of the transmission might be uh a bit larger and on the other hand if you use the copper cable or some other type of cable then it might be slightly less. So uh let's understand the difference between the transmission delay and the the
3:54 propagation delay in a slightly better way taking the example that your textbook uses. So we said that uh the transmission actually uh we are actually transmitting the bits on the wire but we we logically that as the bunch of bits which we call it as a packets. So what is shown in this picture is there are a bunch of the vehicles the cars let's assume there are 10 such uh cars and then these 10 cars move as a chunk all of them will go together and then once it reaches a particular toll booth they are till all the 10 vehicles come the vehicles are held up and then they are allowed to go
4:39 through the this toll booth at a certain rate and once they exit that toll booth then they are actually again uh moving on the road till the next toll booth again till all the cars come uh they are not processed they are actually held up there and again they are scheduled for transmission. So depending upon the width or the number of the people sitting at the toll booth who inspect the vehicle and then schedule it for transmission. So if I have more number of the people sitting there then uh you can you can think of at a faster rate the vehicles are actually able to move it and then once the vehicles pass through this toll gate whatever is the the [clears throat]
5:25 distance between this toll booth to the next one. Uh so that is actually a function that depends on how what is the length of that uh that road the distance between these two toll booths. So in a nutshell the vehicles move as a bunch and then they are actually scheduled for transmission at each toll booth and then they again move. So the time taken by the toll booth to put that move that vehicle from the uh road from where from which they came to the next road is the transmission time and once they are on the road the time taken for the vehicles to move to the next both is the roughly the propagation delay that is incurred. So that's how you understand the
6:12 difference between the transmission and the propagation delay. >> [snorts] >> So let's take a simple example and then try to calculate the transmission delay and also the propagation delay. So in this case I'm given if a packet has 100 bytes of the uh data and the link capacity the rate of transmission is saying he's saying 500 kilobits per second and the distance between the source and destination are from one point to another point point A to point B. uh way from where I'm sending the data is 1,000 kilometers. So he's asking to calculate the transmission and propagation delays and also the total time taken for the transmission.
6:58 So now there are only two kinds of the delays. One is the propagation and the second transmission delay. The total delay incurred is actually the sum of these two delays in the network. So what is given is the following. So you have 100 bytes of the data. So I want for the unifor the calculation. So I'll convert this into bits. So 100 bytes every byte is 8 bits. So total you have 800 bits of the data. And then the rate of transmission is 500 kilobits per second that is 500 into 10 ^ 3 bits per second. So that's roughly uh the five lakh bits per second is the rate of transmission
7:45 and we have distance also given in the kilometer that I'm going to convert into m it 10 ^ 3 m that's roughly 1 million m and then the fourth quantity which is not mentioned in the uh problem statement is the speed with which the uh data is actually getting transmitted. So as I said this is a function or the physical characteristics of the link that you used. So roughly we calculate in the absence of the speed being explicitly specified. So then we use it as the standard 2.8 into 10 ^ of 8 mm/s that is the speed of the transmission or the speed with which the actually data
8:32 moves on the link. So if you substitute those values inside the equations that we have derived. So transmission delay is L divid R. So that is the time taken for the transmission. I denote it as the TT. T is L divided by R. So L is 800 bits and then this is five lakh bits per second. So that roughly turns out to be 1.86 milliseconds of the time. And similarly the propagation delay is the distance stored by the speed with which the data is actually moving. So that is d by v. So tp stands for the propagation delay time taken per the propagation. So the distance is this 1 million m. This is in
9:18 the meters and the denominator this is in the meter per second. So this meter and the meter get cancelled. So since the the [clears throat] seconds in the denominator and the denominator that comes to the numerator so roughly is approximately 0.35 7 seconds or approximately 3.57 milliseconds. So that is the propagation delay that is uh incurred in the transmission. So the total delay is actually the sum of these two delays. So it is 1.6 6 plus 3.57 milliseconds. Both of them are in milliseconds. So whatever time is get that is the total amount of the
10:04 milliseconds. So this is uh one so 5 roughly 17 milliseconds that is the amount of the time taken for the total uh transmission. [snorts] Now we can understand this uh the difference between the transmission and the propagation dually through an animation. There is an applet. Uh there are many such applets available. So one of the applet that I'm going to use is this one. So I have opened that upate here. So let's uh the distance is 1,000 km in the previous case and now I have 100 bytes. I can make it as 500 bytes of the data. And then the speed is 500
10:51 kilobits/s and the uh sorry the rate is 500 kilobits per second and the speed is 2.8 into uh 10 ^ 8 m/s. So we can start this animation and the data is now moving onto the link at the rate of 500 kbps uh uh rain and then still the last bit of the uh data is not left the source and maybe before that itself the first bit of the transmission might arrive. So here that's the the case. So it has arrived and still source is sending the receiver is receiving and once the sender has sent all the bits corresponding to that then the transmission is actually uh done. So
11:39 after that uh the data is actually uh oh this is 500 bytes. So we had 100 bytes there. So there is a slight difference between then now all the bits uh left the source and the last bit some of the bits have already arrived and then till the last bit of the transmission is actually reaching the receiver it's so total it took 11.58 milliseconds of the time. So propagation delay is 3 570 milliseconds and the transmission delay is actually larger than the propagation delay. You can think of this as the pipe is actually smaller. So that's why it's taking. So remember we used 100 bytes there but now
12:25 in this simulation I used 500 bytes. Maybe I can make it as [snorts] 100 bytes and then rest of the quantities are more or less similar. Then we can run the simulation one more time. Now it's running for the 100 bytes 1,000 km and 500 kbps of the transmission rate. Now you can see all the bits left the so sender but uh this is one packet carrying 100 bytes of the data and now some bits have reached the receiver and till it runs till the uh the final bit actually received by the left. So you can see that roughly that whatever we calculated 570
13:10 milliseconds of the time [snorts] I think there is a slight variation in the speed that is mentioned that is why is coming but otherwise uh the speed is actually the calculations whatever we did is the accurate one. Let's go back to the slide. So this uh animation is uh done by that [clears throat] app is prepared by somebody with the name Johans Kesler. So I use that simulator to demonstrate that. So now we understood the difference between the transmission and the propagation delay. So we'll move on to the next uh delay. We'll try to understand something called as the processing delay. So we said that uh yesterday's in the lecture when we
13:55 discussed the uh the packet switching philosophy what is the packet switching philosophy. So we attach the address to the data itself and then send the uh the packet over the network and then based on the looking at that address and the router is actually doing the inspection deciding where to send that particular packet and if every router in the middle does the same thing then the data actually arrives at the uh intended recipient. Let's assume I have the same uh the data I want to send a high and then the address is now the actual IP address of the server which is 10.0.01 and this is actually moving onto the uh
14:43 the network it is sent on the link and uh going by the store and forward model that entire packet comes and gets stored in the router. Now what the router what we said is in the packet switching philosophy there is a routing table and the routing table you need to consult that routing table to determine uh where to send the packet which output link I need to use to send this particular packet so that inspection is now I have an entry 10.0 O and then star disregarding what is the last octet. So each unit is actually 8 bits of the uh size in the actual IPv4 address. So irrespective of what is the
15:29 last octet then you need to send that particular data to or packet to this interpace one is it is saying so the time it takes for the uh doing that inspection taking the bits corresponding to that address then going into the routing table and then determining the output interface only this much time that is called as the processing delay. So this is one of the component or one of the operation that is done at the every router and this time we call roughly call it as the processing delay. So if you on the this was the case only when you have a single entry in the routing table but uh there is not the
16:16 case many of the routing tables have got many many number of the entries. So for example the routing table of the router R2 looks like this. Now when the first router decided or determined which interface to send to and then the packet has now come and sit in inside the buffer or the queue of the R2 again when it is picked up or transmission what the router R2 does it uh takes out that address bits and again go and then do a search in the routing table. So this search is actually a linear search. So for example now the destination address is 10 0.1 and uh take the first entry in the routing table and see whether it is
17:01 actually matching. So here it is not a match then you go to the next okay entry and then again try to do a match. So here also it again fails and now again you go to the third entry again it fails. Now you go to the fourth entry now you find a match. So the search operation you need to continue till you find either a match or you exhausted the entire list. In either of these two cases the search ends. So if the first entry itself you find a match then well and good you are able to transmit it quickly. But if you don't find an entry then you need to exhaust the entire list. So this entire search whatever is time it is taking per comparison we call
17:46 it as part of the processing delay. Now we found a match then it is supposed to be sent on the ETH1 that is what it is saying. So on the ETH1 the packet is actually moved. So remember at every hop this is actually happening. So every router is actually doing the processing and then sending it. So depending upon the number of the hops are there inside the between the source and destination those many times the packet processing happens. So address inspection is one of the type of the inspection or processing that is done. This is up to the determining on which interface it has to send. Now the transmission delay is once the output link is determined putting the bits of
18:33 that particular packet onto that particular link is actually involving the transmission delay. Now there is a second component in the processing delay. So again I have the same packet and then packet uh uh comes uh uh in the outer. So remember when I sent it I sent it with the address of uh 10.0.1 but in the process it might get lost or the last octet might change to zero. Now every time a packet arrives there is something called as the integrity check which we call do with the something called as the check sum calculation. So on the entire data I have the check sum
19:20 and uh that checks some calculation whatever the calculated checks sum is also embedded as part of the uh packet which I not shown here but that is going as part of the packet and now on the packet and the data the check sum is recalculated and then again verified against the whatever the check sum that the packet is actually carrying. If there is a mismatch in the check related we determine there is some error in the transmission. So here in this case when the data is actually in transit something happened to the data the one which was there is actually toggled to zero. Now because of that the checksum is actually not matching. Now the router
20:05 R1 determines there is an error in the transmission. So we'll understand how you calculate that jum and what kind of the data is involved in the jum calculation and all in the later part of the discussion. But uh at least you understand this the transmission errors that happened in during the when the packet is in transit are checked at every hop and if there is an issue then the error is actually determined and then the packet might be discarded from the transmission. So again to calculate that check sum recalculate that check sum at uh at the by the router it also requires some amount of the time. So this is also part of the uh the processing delay. So one
20:51 is the inspection of the address and then comparing that with the route entries in the routing table and determining the next top uh the router. The second is the determining the error and calculating the check sum is the second component. These two put together we generally call it as the processing delay and that happens at every hop. So that is what roughly the processing delay is all about. Now let's go back to the cubing delay part. This we discussed in the previous lecture. So in this figure picture uh there are two packets which are already there inside the buffer and now the next packet that is coming is actually
21:37 depending upon the order in which they come they are put into the queue. So this is what we understood if there are no exits from this particular queue at this point of time then the packets are actually getting uh dropped. So now let's try to understand uh uh what happens how exactly Q buildup happens and then uh uh the uh when the packets are actually getting uh uh dropped. So it's like I have set the in this animation uh the arrival rate is uh emission rate is 500 packets per second but the output link has a capacity to at that,000 packets per second time. So assuming the packets are of the uniform
22:23 size. So 500 packets per second is the arrival rate and 1,000 packets per second is the exit uh rate. Then uh so there is no cube buildup that is happening really in this case because the transmission output uh link has got a better capacity or higher capacity than the input link. There is no issue here at no point of in time the uh packets are actually getting queued. So let me uh uh reset this and change these parameters. So let's say I still have 500 packets per second and then the exit rate is also 500 packets per second. So now what will happen? So the rate at which the packets are coming the rate at which the
23:11 uh packets are exiting the queue both are identical. So then also there is really any Q buildup that happens. So the packet comes sit in the queue and then it is immediately picked up for the output transmission and then immediately it goes. So now the Q buildup is actually not happening in this case as well. So you might have momentarily something getting added but really it is not the Q is not building up significantly. Now what happens if you have the uh let's say I have 500 packets per second arrival rate and 350 packets per second exit rate when the rate of the arrival
23:57 is bigger than the rate of the exit then that is when the cube buildup really starts happening. So here in this case 350 packets per second is the exit rate. So we see that uh uh quickly Q buildup is happening and then the queue is getting uh bigger in size. So it'll keep on accumulating the packets and then when the entire queue becomes full then that is where the packet drops actually starts happening. So you can see that now few more slots are left and then slowly I think uh it should get filled up. So once the queue is actually filled up now you can see some packets are getting uh dropped the ones that you see
24:43 which are going below as in this animation are the packets that are getting dropped. So this is what happens. So when we say that uh uh the whenever you have this situation where the queue is actually almost full and the packets are arriving at the uh Q and the input link so the packet uh drops actually starts happening. [snorts] So uh let's try to understand uh what is this uh uh transmission what exactly is happening. So I have a router here and the the input link and the output link. So the rate at which the uh the packets are picked up from this particular queue
25:30 is uh the rate at which the this cylind capacity let's call this as R and let's say if each packet is of the size L the transmission delay is L by R. So that is the rate at which the packets are exiting the Q. So uh in reality in the although in the simulation actually the packets are coming at a uniform rate that is not exactly how the packets arrive in a real network. So particularly if you use uh kind of the multiplexed transmission. So multiple people are sending the packets to this particular uh network element or the router and all
26:15 of them are actually put in the same queue. So since there is no correlation between the transmission of the one user to the second user, the packets from the different users arrive at random uh time and they are getting actually put or placed inside this particular queue. So but nevertheless if I assume that the average rate if I let's say I measure the number of the packets that came in the last 10 minutes and then let's say X amount of the packets came and the time duration is 10 minutes X divided by 10 is the total average number of the packets arrived per unit of the time. If the arrival rate is let's call that average as the
27:03 average arrival as a we define a quantity called as the uh traffic intensity as a multiplied by l by r this quantity we call it as the traffic intensity traffic intensity is the average uh arrival rate into the rate at which the transmission really actually happens on the line. [snorts] So this numerator a multiplied by L is some it is indicating the quantum total quantum of the data or the number of the bits that are arriving at the input link and the rate of exit is the R. So total
27:52 uh average arrival rate and the rate of the exit. So that is the tropic intensity. [snorts] So there is a nice way to visualize it how exactly this ratio dictates what happens in the network whether the Q is being empty or Q is going to getting filled up at a certain rate. So this uh ratio L A / R is on the X-axis and the average Q in delay that is experienced by the packet is on the Y-axis. So remember what is happening in the previous case is if the uh Q is empty which is at the beginning then the uh the queueing delay experienced by by
28:38 that packet is actually slightly less but as the Q buildup happens more the packet which is arriving at a later point of time will experience larger amount of the delay. So that is the larger queuing delay because unless the packets in the front are actually exited or cleared from the queue then the this packet may may not get its chance to do the uh transmission. So that way different packets actually experience different uh queuing delays. So queuing delay is actually variable quantity. It is a function of how many number of the packets are actually currently are there inside the queue. >> [snorts] >> So what is shown on the y-axis is
29:24 actually the average giving delay. So what this diagram is actually showing is if the quantity la / r is actually smaller then the average giving delay is actually experienced by the packet is smaller. But as the ratio increases then the time spent by a particular packet is actually increasing uh drastically after uh after time after a while once this quantity increases sufficiently then the uh the average giving delay is actually exponentially larger compared to the earlier or a smaller value. So that is how these two actually relate to each other. So the
30:10 ideal situation is when LA / R is actually smaller than one closer to zero the better it is. So if on the other hand if LA R if it is going to be greater than or equal to one then you will have an issue of uh the queuing delays and the packet drops are actually happening. So when it exceeds then you will have packet drops and then uh when it is equal to one then the uh the cube buildup actually happens eventually leading to the packet drops.