Experiments Today:

1. Kernel Records the number of TCP packet dropped. Through the /proc file system, we can copy it to user space.

2. Tools have been developed to make the experiment almost automatically. Madrid will automatically notice Router (Dublin) to change dropping rate and record the number of packet dropped in the last "blast test".  Very few human interactions are needed during the following experiments which take more than 16 hours.

a)   On dublin.cs.unh.edu, Login in as root, Insert "packet_dropper" module, Insert "change proc" module, run "dublin" whose source code is: dublin.c

b)  On prague.cs.unh.edu, run the blast test server "blastserver 1026"

c). On madrid.cs.unh.edu, run "madrid 1026 192.168.2.2   0  0.16  40 2>&1  | tee elapseTime ",   It will set router dropping rate from 0.0 to 0.16 in 40 steps, with each increment 0.004. And for each dropping rate, it will do "blast test" experiments for 10 times and use the AVG value. Source code of "madrid"  is: madrid.c

d). On dublin,  After experiment ends, there will be a directory with the starting time as its name. Run script "source colloctDropNum", you will collect all the "number of packet loss" of every experiment in a file name "dropStat".  Run "getNum dropStat dropNum", you will get the file "dropNum" with the AVG and VAR packet_loss calculated. This file can be used to do gnuplot.

e) On madrid, After finishing experiments, Run "getElapse  elapseTime elapseStat", You will get a file "elapseStat" which is used to do gnuplot (see following tables and pictures)

f). Run "gnuplot < jpg.glt" to get a the jpeg picture as you will see later.

3. The following experiment. The packet dropper drop packets in this way:

   A random number is got in this way:  Get a CPU cycle number, get its least significant 16 bits. swap the lower byte with the higher byte

   If the random number is less than:                rate*(1-rate)*65535,             packet is dropped

  The following experiments shows the above formula is acceptable It's closer to what we need than this formula  rate*65535

  Maybe it is  because of the data conversion between float number and unsigned int.

4. In the following calculation, the AVG is  average. The Var is:  sqrt( (t1-avg)**2 + (t2-avg)**2 + .....+ (t10-avg)**2 )/10)

The throughput is:  1526*100000/ AVG

The devication is:  (IDEAL - AVG)/IDEAL

The  System Resource Usage Information is Here 

     
Drop Rate 1st 2nd 3rd 4th 5th 6th 7th 8th 9th 10th AVG Var Throughput
0.000 12.32 12.32 12.31 12.31 12.31 12.31 12.31 12.31 12.31 12.31 12.31 0.00 12394411.68
0.004 12.99 12.59 12.79 13.17 12.60 12.59 12.40 12.40 12.79 12.59 12.69 0.23 12024269.18
0.008 13.03 13.59 12.82 13.61 13.41 14.49 13.57 13.60 13.40 13.40 13.49 0.42 11310406.48
0.012 15.31 15.42 14.61 14.04 13.44 16.18 16.46 15.20 16.17 16.18 15.30 0.96 9973204.60
0.016 17.99 16.64 19.87 16.62 18.42 16.94 16.83 18.16 17.03 16.36 17.49 1.05 8726981.55
0.020 21.26 20.74 18.56 20.05 21.00 18.97 26.87 21.35 17.87 21.46 20.81 2.35 7331956.09
0.024 23.43 25.84 25.90 23.01 27.62 23.58 25.14 21.59 25.04 25.61 24.68 1.67 6184146.39
0.028 25.31 27.72 27.54 27.45 29.48 25.96 29.75 27.82 30.42 27.16 27.86 1.54 5477190.33
0.032 34.43 33.46 33.08 29.40 28.88 31.71 33.08 36.67 31.33 33.86 32.59 2.22 4682417.90
0.036 40.80 35.03 39.26 35.51 38.59 35.15 39.25 41.65 35.93 42.34 38.35 2.64 3979035.96
0.040 41.95 48.40 43.73 46.08 40.96 42.71 45.29 40.11 38.26 44.12 43.16 2.86 3535599.33
0.044 51.97 45.64 55.22 55.16 47.17 54.90 52.50 50.70 54.80 51.73 51.98 3.20 2935800.99
0.048 55.36 55.41 61.94 61.95 60.29 66.75 52.99 60.14 58.93 54.04 58.78 4.08 2596121.18
0.052 69.98 73.98 60.19 62.15 72.58 72.68 65.11 64.00 67.75 71.22 67.96 4.61 2245306.19
0.056 69.77 72.20 76.65 82.50 71.58 76.66 83.47 70.56 65.85 69.88 73.91 5.46 2064617.31
0.060 87.45 98.03 82.97 83.50 85.43 90.31 85.51 80.84 93.70 82.53 87.03 5.18 1753478.80
0.064 103.32 87.00 101.86 101.01 102.58 92.62 99.52 97.31 100.38 102.73 98.83 4.97 1544018.70
0.068 108.92 103.53 109.42 113.80 109.72 111.25 112.89 109.09 102.42 111.73 109.28 3.52 1396451.21
0.072 124.90 106.30 129.08 118.05 125.90 120.64 122.25 115.95 127.76 118.02 120.89 6.41 1262356.76
0.076 127.76 129.32 131.02 130.16 142.18 139.16 132.00 131.71 123.64 134.28 132.12 5.09 1154984.36
0.080 140.81 137.27 155.75 147.54 144.97 156.74 153.63 149.57 142.82 146.47 147.56 6.12 1034176.58
0.084 161.29 161.04 167.57 165.31 148.00 168.35 157.95 156.23 155.00 171.69 161.24 6.83 946397.70
0.088 184.55 171.42 161.32 164.91 169.46 168.01 171.48 177.38 161.87 185.72 171.61 8.14 889215.21
0.092 195.15 191.70 183.14 183.62 192.28 174.82 196.47 199.02 182.55 184.22 188.30 7.32 810421.85
0.096 187.63 215.40 199.74 193.41 214.44 218.42 198.20 214.47 182.22 197.55 202.15 12.12 754892.47
0.100 228.06 212.05 200.16 215.17 229.87 222.89 224.19 203.80 222.19 213.95 217.23 9.46 702471.53
0.104 239.91 238.53 247.39 237.46 234.98 232.09 239.62 252.00 260.19 228.21 241.04 9.12 633095.21
0.108 260.11 257.69 274.48 246.26 278.23 255.89 239.82 251.15 269.08 266.32 259.90 11.67 587142.09
0.112 276.53 245.12 292.47 293.05 279.71 299.58 278.66 271.20 262.33 288.95 278.76 15.47 547424.29
0.116 267.54 298.92 277.95 281.56 295.81 293.19 292.96 271.20 271.22 325.72 287.61 16.67 530585.15
0.120 316.72 313.57 355.82 349.28 316.02 301.51 300.52 304.97 319.18 288.32 316.59 20.11 482009.91
0.124 332.46 317.02 352.20 334.09 360.45 339.43 311.92 342.88 416.15 338.81 344.54 27.53 442908.08
0.128 353.36 347.81 387.85 373.76 346.92 378.18 356.26 344.41 366.06 379.69 363.43 14.91 419888.30
0.132 384.03 371.50 434.31 345.38 381.08 384.69 384.13 378.45 376.12 385.90 382.56 20.65 398892.73
0.136 403.46 392.77 423.92 417.35 414.60 400.23 419.92 388.59 417.37 387.91 406.61 12.99 375296.35
0.140 438.84 511.19 425.73 443.63 418.77 406.25 445.06 457.91 443.17 436.08 442.66 26.79 344731.78
0.144 421.11 474.07 483.75 430.14 443.25 437.47 453.94 488.38 455.33 471.42 455.89 21.86 334732.82

Experiment Raw Data:  elapseTime

Through /proc file system, we can see the actual number of TCP packets that are dropped are as follows:

Drop Rate 1st 2nd 3rd 4th 5th 6th 7th 8th 9th 10th AVG VAR IDEAL Deviation
0.000 0 0 0 0 0 0 0 0 0 0 0 0 0 0.000
0.004 397 396 421 411 392 391 396 393 389 382 397 11 400 0.008
0.008 820 769 760 845 755 854 776 800 762 788 793 34 800 0.009
0.012 1197 1160 1225 1203 1199 1206 1184 1173 1238 1256 1204 28 1200 -0.003
0.016 1572 1604 1614 1601 1662 1637 1554 1586 1555 1553 1594 35 1600 0.004
0.020 1984 1967 1949 2001 2042 1974 2090 2007 1966 1969 1995 40 2000 0.003
0.024 2417 2452 2434 2344 2389 2397 2372 2397 2394 2399 2400 29 2400 0.000
0.028 2756 2780 2846 2755 2894 2764 2854 2762 2797 2819 2803 46 2800 -0.001
0.032 3190 3212 3149 3259 3250 3273 3114 3221 3204 3285 3216 52 3200 -0.005
0.036 3617 3616 3608 3541 3558 3638 3611 3605 3507 3732 3603 58 3600 -0.001
0.040 4036 3987 3952 4036 4020 4073 4031 3908 3890 4011 3994 57 4000 0.001
0.044 4450 4247 4460 4466 4412 4444 4429 4383 4347 4522 4416 72 4400 -0.004
0.048 4941 4692 4858 4747 4819 4892 4881 4874 4683 4769 4816 84 4800 -0.003
0.052 5177 5248 5137 5065 5323 5267 5167 5212 5176 5189 5196 68 5200 0.001
0.056 5561 5545 5588 5671 5538 5667 5622 5554 5600 5627 5597 46 5600 0.000
0.060 6110 6062 5966 6036 6050 6225 6023 5994 6099 5915 6048 81 6000 -0.008
0.064 6427 6309 6465 6458 6531 6496 6502 6252 6443 6447 6433 83 6400 -0.005
0.068 6858 6833 6858 6873 6871 6726 6799 6763 6940 6832 6835 58 6800 -0.005
0.072 7331 7036 7306 7296 7160 7110 7195 7261 7319 6998 7201 115 7200 0.000
0.076 7723 7502 7508 7505 7656 7601 7704 7632 7460 7532 7582 88 7600 0.002
0.080 8073 8002 7905 8143 7990 8095 7912 8216 8006 8081 8042 93 8000 -0.005
0.084 8471 8401 8380 8421 8523 8402 8300 8511 8357 8384 8415 66 8400 -0.002
0.088 8919 8854 8670 8688 8814 8871 8839 8988 8755 8715 8811 98 8800 -0.001
0.092 9177 9237 9066 9090 9314 9021 9331 9173 9260 9272 9194 102 9200 0.001
0.096 9582 9698 9629 9544 9607 9602 9619 9603 9409 9670 9596 75 9600 0.000
0.100 10141 9788 9869 10068 10163 9924 9981 10152 10007 10059 10015 120 10000 -0.002
0.104 10323 10274 10357 10285 10400 10403 10459 10533 10329 10410 10377 76 10400 0.002
0.108 10801 10742 10697 10760 10722 10644 10759 10905 10720 11006 10776 101 10800 0.002
0.112 11338 10965 11222 11227 11200 11178 11324 11179 10940 11226 11180 125 11200 0.002
0.116 11580 11460 11653 11363 11484 11502 11385 11360 11229 11737 11475 144 11600 0.011
0.120 11785 11949 12184 11898 12053 11966 11973 11888 11855 11915 11947 105 12000 0.004
0.124 12444 12227 12351 12363 12471 12155 12388 12399 12371 12377 12355 90 12400 0.004
0.128 12813 12728 12605 12683 12626 12785 12782 12737 12806 12942 12751 94 12800 0.004
0.132 13025 13054 13291 13096 13064 13200 13084 13243 13097 13003 13116 91 13200 0.006
0.136 13488 13429 13610 13592 13484 13547 13492 13272 13382 13491 13479 95 13600 0.009
0.140 13916 13777 14024 14028 13849 13693 13873 13951 13779 13795 13869 106 14000 0.009
0.144 14102 14239 14134 14342 14311 14199 14341 14277 14091 14304 14234 92 14400 0.012

The raw Experiment data: dropStat