Commit 47925cee authored by Pramod R Sanaga's avatar Pramod R Sanaga

Modified the Design doc to reflect discussion with Rob & Jon.

Changed the throughput calculation, cleaned up MaxDelay and
all other files in general to be more readable.

Added checks for out of order ACKs, and error conditions to
check for invalid packets.

sendto() calls block on Linux - verified this on
planet lab - made the writes to UDP socket non-blocking.
parent 7f75430b
......@@ -62,6 +62,20 @@ the throughput calculations resilient to the loss of a small number of
( 3 consecutive ACK packets can be dropped without any effect on the
throughput calculation ) ACK packets on the reverse path.
The ACK packets also contain the timestamps at the receiver when the original
packets were received. The timestamp for the packet being ACKed is an
absolute value ( in micro seconds ), and the values for redundant ACKs are
relative to this absolute value.
As of now, the acknowledgement packets are of the same size as the received
data packets. If they are a fixed minimum size, then it could affect the RTT
calculations. If the packets sent from nodeA -> nodeB are say 1500 bytes long
and the ACK packets are about 50 bytes, then the transmission delay on the forward
path is going to be more than the transmission delay on the reverse path.
When one way delay is calculated as half of RTT, this causes the one way delay
estimate to be lower the actual value for the forward path ( if the ACKs are a fixed minimum size).
Minimum Delay:
-------------
......@@ -82,43 +96,14 @@ way delay and the minimum from above, gives the value of approximate maximum que
on the forward path. Whenever there is a new maximum queuing delay value, an event is sent to the
application monitor and the value is used to set the maximum queue size for the dummy net pipe.
Throughput (available bandwidth):
---------------------------------
For each acknowledged packet ( assuming no dropped packets ):
Throughput = ( data size of the packet + header overhead ) / ( total one way delay for the packet )
If every packet sent from nodeA is acknowledged by nodeB and there is no packet loss on
either the forward or the reverse path, the above equation gives the throughput for
each packet sent. Taking into account packet drops on the forward path and some packet
drops on the reverse path, the throughput is calculated as below.
Whenever packets are sent by nodeA, information about the sequence number, timestamp and
the size of data in the packet is stored in a list at nodeA. When an acknowledgement
is received, all the packets being acknowledged ( including any of redundant sequence
numbers in the acknowledgement ) are removed from that list and used for throughput
calculation. The sum of these packet sizes gives the amount of data that was transferred
in this round trip time.
After the redundant acknowledgements are considered, any packets remaining in the list with
sequence numbers less than the latest acknowledged sequence number: were either lost in
the forward path, or their ACK packets were lost on the reverse path. We cannot distinguish
between forward/reverse path loss and consider them as forward path loss in both cases.
These lost packets are also removed from the list at nodeA. The start_time of the round trip
for throughput calculation is taken as the earliest send time of all the lost packets and
all the acknowledged packets. The end_time of the round trip is the time at which the
current acknowledgement was received.
The throughput is then = ( sum of data size of ACKed packets ) / ( 0.5 * (end_time - start_time ) )
Note: UDP packets sent by from nodeA may not always be the maximum sized packets, as is most
often the case with TCP. So, the minimum and maximum delay values need to be calculated ( ideally for
every packet size), keeping the maximum sized UDP packet in mind. The one way delay values are
thus scaled to represent maximum sized packets. ( we divide the one way delay by number of bytes in
the packet + overhead, and then multiply it by 1500 ).
Note:
-----
There is another way in which throughput can be calculated. The receiver(nodeB) can timestamp
packets when they are received and send these timestamps in the ACK packets.
Throughput:
-----------
Throughput = (size of data being ACKed) / ( last_receiver_time_stamp - current_receiver_time_stamp )
......@@ -127,6 +112,9 @@ assumption is that there is a single bottleneck link in the network: and the pac
by the receiver will be spaced ( in time ) depending on the queueing & transmission delays
encountered by the packets at the bottleneck.
We assume that the forward and reverse paths are symmetric, in terms of the path
capacity and delay introduced - although this might not be true in some cases.
However, the spacing between the packets at the receiver need not be the same as that
at the bottleneck.This spacing can become compressed(similar to TCP ACK compression) later on in
the network ( at a fast link for example ),and it is possible for the packets to arrive
......@@ -139,10 +127,8 @@ The reason for this is that we fail to take queuing delay into account for close
packets arriving at the receiver. Since the clocks are not synchronized between the sender and
receiver, it is not possible to accurately calculate the one way delay at the receiver.
Hence, throughput values are being calculated at the sender based on the one way delay for
each packet. However, this means that the throughput value will be effected by the RTT
calculation. We assume that the forward and reverse paths are symmetric, in terms of the path
capacity and delay introduced - although this might not be true in some cases.
This compression of packets can affect the throughput calculated - currently we do not of
any way to avoid this potential problem. ( it does seem to occur infrequently, only on a few paths ).
Problems that might crop up:
......@@ -170,5 +156,14 @@ affected by the packet drop problem.
This is just a hypothesis and needs to be tested on planetlab.
2) Reordering of packets on the forward path & reordering of ACKs on the reverse path
We currently ignore the reordering of packets/ACKs on forward/reverse paths.
If this happens persistently and is perceived as a characteristic of some links,
then it might need to be addressed.
0 215219.2
2595 215219.2
5286 215219.2
7979 215219.2
10575 215219.2
13275 215219.2
15958 215219.2
18553 215219.2
21251 215219.2
23936 215219.2
26530 215219.2
29222 215219.2
31911 215219.2
34507 215219.2
37198 215219.2
39892 215219.2
42487 215219.2
45180 215219.2
47875 215219.2
50468 215219.2
53157 215219.2
55853 215219.2
58445 215219.2
61135 215219.2
63828 215219.2
66423 215219.2
69113 215219.2
71806 215219.2
74402 215219.2
77093 215219.2
79786 215219.2
82381 215219.2
85071 215219.2
87764 215219.2
90360 215219.2
93048 215219.2
95753 215219.2
98338 215219.2
101028 215219.2
103737 215219.2
106316 215219.2
109007 215219.2
111698 215219.2
114295 215219.2
116985 215219.2
119677 215219.2
122278 215219.2
124966 215219.2
127655 215219.2
130253 215219.2
132943 215219.2
135636 215219.2
138230 215219.2
140919 215219.2
143612 215219.2
146209 215219.2
148898 215219.2
151592 215219.2
154190 215219.2
156877 215219.2
159571 215219.2
162166 215219.2
164856 215219.2
167549 215219.2
170155 215219.2
172835 215219.2
175528 215219.2
178123 215219.2
180815 215219.2
183506 215219.2
186101 215219.2
188790 215219.2
191485 215219.2
194079 215219.2
196772 215219.2
199462 215219.2
202059 215219.2
204755 215219.2
207443 215219.2
210037 215219.2
212728 215219.2
215431 215219.2
218015 215219.2
220707 215219.2
223398 215219.2
225995 215219.2
228683 215219.2
231379 215219.2
233973 215219.2
236663 215219.2
239354 215219.2
241953 215219.2
244642 215219.2
247334 215219.2
249929 215219.2
252633 215219.2
255312 215219.2
257908 215219.2
260607 215219.2
263291 215219.2
265887 215219.2
268579 215219.2
271269 215219.2
273865 215219.2
276556 215219.2
279248 215219.2
281845 215219.2
284533 215219.2
287229 215219.2
289822 215219.2
292512 215219.2
295211 215219.2
297801 215219.2
300491 215219.2
303184 215219.2
305781 215219.2
308469 215219.2
311164 215219.2
313759 215219.2
316449 215219.2
319141 215219.2
321739 215219.2
324427 215219.2
327120 215219.2
329715 215219.2
332415 215219.2
335110 215219.2
337694 215219.2
340385 215219.2
343076 215219.2
345673 215219.2
348363 215219.2
351055 215219.2
353652 215219.2
356341 215219.2
359032 215219.2
361634 215219.2
364318 215219.2
367013 215219.2
369609 215219.2
372298 215219.2
374990 215219.2
377587 215219.2
380275 215219.2
382970 215219.2
385566 215219.2
388255 215219.2
390949 215219.2
393544 215219.2
396234 215219.2
398927 215219.2
401529 215219.2
404210 215219.2
406906 215219.2
409516 215219.2
412192 215219.2
414884 215219.2
417482 215219.2
420170 215219.2
422861 215219.2
425457 215219.2
428147 215219.2
430840 215219.2
433437 215219.2
436126 215219.2
438820 215219.2
441416 215219.2
444108 215219.2
446799 215219.2
449395 215219.2
452089 215219.2
454778 215219.2
457371 215219.2
460062 215219.2
462754 215219.2
465350 215219.2
468041 215219.2
470732 215219.2
473329 215219.2
476018 215219.2
478712 215219.2
481307 215219.2
484004 215219.2
486692 215219.2
489283 215219.2
491993 215219.2
494669 215219.2
497265 215219.2
499956 215219.2
502648 215219.2
505244 215219.2
507933 215219.2
510626 215219.2
513221 215219.2
515911 215219.2
518606 215219.2
521200 215219.2
523890 215219.2
526586 14378.624
529178 14529.92
531867 14529.92
534563 14385.024
537158 14534.144
539846 14534.144
542540 14391.808
545134 14541.44
547827 14541.44
550518 14398.848
553114 14547.968
555804 14547.968
558498 14405.376
561093 14554.88
563784 14554.88
566480 14411.648
569071 14561.92
571762 14561.92
574466 14417.792
577048 14569.088
579740 14569.088
582431 14425.856
585029 14575.616
587718 14575.616
590411 14575.616
593010 14372.224
595697 14510.976
598389 14510.976
600990 14378.752
603676 14521.088
606370 14521.088
608965 14388.096
611654 14527.744
614346 14527.744
616941 14395.52
619633 14534.912
622325 14534.912
624920 14402.048
627611 14541.696
630303 14541.696
632899 14408.704
635590 14548.224
638283 14548.224
640890 14414.336
643570 14555.136
646261 14555.136
648865 14421.504
651547 14562.304
654240 14562.304
656836 14429.184
659526 14569.472
662220 14569.472
664814 14436.224
667503 14576.512
670198 14576.512
672791 14576.512
675487 14372.992
678176 14511.36
680772 14511.36
683467 14379.776
686154 14519.808
688751 14519.808
691442 14387.456
694132 14526.976
696733 14526.976
699420 14394.24
702110 14533.888
704707 14533.888
707396 14401.28
710089 14540.672
712685 14540.672
715375 14407.936
718067 14547.2
720664 14547.2
723364 14413.44
726046 14554.368
728642 14554.368
731346 14420.096
734025 14561.28
736621 14561.28
739312 14428.416
742005 14568.064
744599 14568.064
747289 14435.2
749981 14575.488
752578 14575.488
755268 14575.488
757961 14372.48
760557 14520.576
763245 14520.576
765945 14378.624
768535 14529.664
771224 14529.664
773917 14388.736
776513 14537.472
779207 14537.472
781896 14394.88
784493 14544.128
787181 14544.128
789874 14401.664
792470 14551.296
795162 14551.296
797851 14408.704
800450 14558.08
803138 14558.08
805846 14413.952
808426 14565.76
811116 14565.76
813817 14421.504
816406 14572.288
819095 14572.288
821790 14429.184
824384 14579.712
827074 14579.712
829767 14579.712
832368 14376.32
835053 14515.2
837746 14515.2
840344 14383.744
843030 14522.88
845723 14522.88
848327 14389.504
851010 14529.664
853702 14529.664
856298 14397.312
858988 14537.088
861689 14537.088
864277 14404.352
866968 14544.128
869660 14544.128
872255 14411.648
874946 14551.168
877640 14551.168
880245 14417.152
882924 14558.592
885618 14558.592
888214 14425.088
890903 14565.12
893596 14565.12
896190 14432.128
898880 14572.288
901575 14572.288
904169 14438.784
906858 14579.072
909555 14579.072
912149 14579.072
914843 14375.552
917532 14513.92
920129 14513.92
922818 14382.464
925510 14522.368
928105 14522.368
930795 14390.4
933488 14529.408
936084 14529.408
938775 14397.184
941468 14537.6
944064 14537.6
946752 14405.248
949446 14544.384
952041 14544.384
954730 14411.776
957425 14550.912
960019 14550.912
962721 14417.024
965402 14558.336
967998 14558.336
970695 14424.448
973381 14564.864
975976 14564.864
978666 14431.872
981359 14571.904
983956 14571.904
986646 14438.4
989338 14578.432
991935 14578.432
994625 14578.432
997322 14374.912
999912 14523.392
1002602 14523.392
1005303 14381.056
1007890 14532.864
1010580 14532.864
1013275 14390.144
1015868 14539.776
1018562 14539.776
1021254 14396.928
1023848 14546.688
1026537 14546.688
1029228 14404.608
1031827 14553.728
1034516 14553.728
1037209 14411.008
1039806 14560.384
1042495 14560.384
1045198 14416.64
1047783 14567.552
1050474 14567.552
1053181 14422.784
1055761 14574.336
1058454 14574.336
1061145 14574.336
1063742 14371.2
1066432 14509.312
1069122 14509.312
1071726 14377.344
1074408 14518.912
1077102 14518.912
1079699 14384.0
1082388 14523.52
1085080 14523.52
1087678 14390.784
1090366 14530.688
1093060 14530.688
1095653 14397.952
1098344 14537.472
1101045 14537.472
1103634 14404.352
1106324 14544.384
1109016 14544.384
1111611 14411.392
1114302 14552.192
1116996 14552.192
1119603 14417.792
1122279 14559.104
1124973 14559.104
1127571 14425.728
1130271 14564.608
1132953 14564.608
1135547 14432.768
1138239 14572.416
1140930 14572.416
1143527 14439.424
1146215 14579.84
1148908 14579.84
1151503 14579.84
1154198 14375.936
1156886 14514.176
1159485 14514.176
1162174 14382.72
1164867 14522.368
1167460 14522.368
1170153 14390.144
1172845 14529.28
1175440 14529.28
1178129 14397.184
1180822 14536.448
1183419 14536.448
1186106 14404.352
1188801 14543.616
1191397 14543.616
1194098 14409.6
1196780 14550.144
1199377 14550.144
1202072 14416.768
1204759 14556.8
1207354 14556.8
1210045 14424.192
1212737 14564.224
1215335 14564.224
1218022 14431.36
1220716 14571.264
1223311 14571.264
1226000 14438.4
1228697 14577.92
1231291 14577.92
1233980 14577.92
1236679 14374.528
1239268 14523.52
1241958 14523.52
1244652 14381.952
1247251 14531.968
1249940 14531.968
1252735 14379.392
1255225 14539.776
1257915 14539.776
1260608 14396.928
1263204 14546.56
1265893 14546.56
1268587 14403.968
1271182 14553.472
1273874 14553.472
1276576 14409.6
1279162 14560.384
1281851 14560.384
1284563 14416.64
1287140 14568.448
1289829 14568.448
1292525 14425.472
1295117 14575.872
1297808 14575.872
1300500 14575.872
1303101 14372.48
1305786 14511.232
1308479 14511.232
1311075 14380.032
1313766 14523.136
1316458 14523.136
1319055 14390.528
1321743 14530.048
1324437 14530.048
1327032 14397.312
1329722 14537.088
1332417 14537.088
1335010 14404.352
1337699 14544.128
1340394 14544.128
1342994 14410.624
1345679 14551.168
1348372 14551.168
1350981 14417.024
1353659 14558.08
1356353 14558.08
1358948 14424.832
1361634 14565.504
1364329 14565.504
1366923 14432.128
1369616 14571.904
1372308 14571.904
1374903 14438.528
1377593 14578.816
1380286 14578.816
1382880 14578.816
1385580 14375.04
1388263 14514.176
1390861 14514.176
1393551 14382.336
1396244 14522.368
1398839 14522.368
1401530 14389.888
1404225 14528.768
1406817 14528.768
1409508 14396.928
1412200 14536.192
1414797 14536.192
1417486 14403.584
1420178 14542.976
1422775 14542.976
1425481 14408.576
1428157 14550.144
1430753 14550.144
1433452 14416.384
1436137 14557.056
1438732 14557.056
1441423 14424.192
1444114 14565.504
1446712 14565.504
1449400 14432.512
1452094 14572.288
1454688 14572.288
1457379 14439.168
1460075 14578.816
1462667 14578.816
1465359 14578.816
1468055 14375.552
1470647 14524.16
1473337 14524.16
1476029 14382.72
1478626 14532.992
1481314 14532.992
1484007 14390.912
1486602 14540.416