Experiments Today:

Just realize that I made a stupid mistake.

I had thought that "if I set drop rate to 10%, and if I send 100000 TCP packets, the number of packets dropped will be 10000. The statistics on TCP experiments shows that the number of packets dropped is ALWAYS more than 10000. My mistake is: I think there's something wrong with the packet dropping threshold value. So I was using the threshold value:  rate*(1-rate)*65535."

The reality is: Because of TCP retransmission, the actual number of packets sent is much more than 100000 packets. So the the number of packets dropped is ALWAYS more than 10000.

Now re-do the experiments with the threshold value set to: rate*65535

  The following experiments shows the above formula is acceptable. The number of packet dropped is close to what we expect.

The deviation is:  (IDEAL - AVG)/IDEAL

IDEAL is the ideal number of packets dropped during the experiments with a specific dropping rate.

 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  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.31 12.31 12.31 12.31 12.31 12.31 12.31 12.31 12.31 12.311 0.003 12395418.862
0.004 12.58 12.59 12.60 12.78 12.40 12.59 12.79 12.79 12.59 12.59 12.630 0.117 12082343.517
0.008 13.63 13.43 13.22 13.92 13.21 13.78 13.81 13.40 14.38 14.37 13.715 0.402 11126503.704
0.012 14.93 14.43 16.20 15.59 15.91 16.09 16.76 15.41 15.60 15.98 15.690 0.629 9725939.758
0.016 18.21 17.94 16.63 18.59 18.19 15.77 18.68 16.64 18.65 18.91 17.821 1.026 8562931.784
0.020 19.03 19.29 21.32 20.36 18.80 20.64 20.73 22.64 21.26 19.39 20.346 1.159 7500245.501
0.024 23.72 25.32 22.86 23.00 23.81 26.15 23.38 24.46 22.97 23.08 23.875 1.055 6391623.037
0.028 27.50 27.87 30.08 27.19 28.50 31.01 27.45 33.13 32.90 30.96 29.659 2.155 5145149.801
0.032 34.62 37.09 35.42 37.10 31.75 33.26 29.71 33.38 35.41 35.08 34.282 2.198 4451315.860
0.036 40.21 36.55 38.61 37.46 39.47 36.10 43.48 40.70 39.05 42.04 39.367 2.224 3876343.073
0.040 47.50 43.83 49.85 48.76 51.44 50.21 48.39 48.02 51.76 46.92 48.668 2.222 3135530.581
0.044 57.63 58.25 56.20 58.41 60.10 57.71 59.47 61.01 63.59 57.05 58.942 2.064 2588985.724
0.048 60.53 62.69 60.53 62.10 60.77 64.72 69.53 63.17 61.82 64.32 63.018 2.585 2421530.443
0.052 69.94 71.16 77.68 71.36 81.50 78.39 75.87 83.58 80.62 72.28 76.238 4.610 2001626.513
0.056 81.00 81.88 87.80 88.41 80.69 83.04 86.63 82.62 82.11 83.47 83.765 2.672 1821763.280
0.060 94.69 88.28 85.34 98.35 100.85 91.36 93.02 100.69 91.31 99.59 94.348 5.138 1617416.381
0.064 102.81 113.83 112.53 119.74 118.44 107.60 111.76 101.93 108.02 110.67 110.733 5.584 1378089.618
0.068 128.40 118.65 107.80 123.88 121.82 122.60 129.09 121.18 132.55 120.71 122.668 6.459 1244008.225
0.072 137.22 140.05 129.92 136.85 142.88 138.54 133.10 148.12 135.43 143.60 138.571 5.066 1101240.526
0.076 149.76 138.79 158.41 152.24 167.07 154.32 150.96 164.03 154.89 157.76 154.823 7.489 985641.681
0.080 157.50 168.43 172.89 171.53 184.27 166.37 155.31 173.43 160.68 160.15 167.056 8.432 913466.144
0.084 194.28 196.97 186.59 181.34 190.61 189.30 193.47 201.84 206.89 194.90 193.619 6.964 788145.778
0.088 209.22 205.81 224.02 217.21 214.00 216.19 227.36 210.13 207.06 221.41 215.241 6.975 708972.742
0.092 228.31 220.76 224.77 241.97 223.95 229.48 227.43 213.72 205.09 230.78 224.626 9.485 679351.480
0.096 250.06 252.02 270.32 248.97 244.95 237.94 249.31 249.61 266.07 307.15 257.640 18.789 592299.299
0.100 268.61 275.46 280.16 279.69 283.42 268.90 288.08 253.52 274.59 271.92 274.435 9.147 556051.529
0.104 317.36 276.15 307.06 292.50 310.21 326.06 321.80 330.96 318.36 305.04 310.550 15.630 491386.270
0.108 325.51 344.83 340.28 295.20 302.02 334.39 327.88 351.86 285.12 306.06 321.315 21.620 474923.358
0.112 359.97 352.99 353.36 370.75 352.03 347.78 319.44 353.36 346.82 375.23 353.173 14.319 432082.855
0.116 405.68 385.94 393.06 419.70 373.77 391.31 379.12 370.57 368.25 387.88 387.528 15.269 393777.983
0.120 426.30 422.77 401.62 424.46 426.22 376.22 420.19 400.01 418.08 403.23 411.910 15.461 370469.274
0.124 446.80 508.11 445.87 503.94 491.30 440.11 444.95 435.18 460.41 464.42 464.109 25.861 328802.064
0.128 486.39 469.44 539.99 473.81 467.21 535.21 497.34 466.53 506.08 434.08 487.608 31.134 312956.308
0.132 527.16 532.07 586.13 511.39 543.10 536.87 563.76 492.69 491.36 546.67 533.120 28.166 286239.498
0.136 600.00 566.77 558.85 608.03 556.17 592.22 558.70 579.79 570.13 625.97 581.663 22.720 262351.240
0.140 644.62 616.15 631.62 633.08 633.37 624.63 579.93 594.24 594.61 572.06 612.431 24.013 249170.940
0.144 692.91 616.93 645.45 626.70 630.92 643.30 628.59 767.10 695.61 683.01 663.052 44.209 230147.861
0.148 720.46 696.01 706.25 703.32 717.07 744.12 728.69 675.32 713.80 724.99 713.003 18.108 214024.348

 

Experiment Raw Data:  elapseTime

The green line uses the threshold value rate*(1-rate). It's data is here

Compare This Result with NS (network simulator) Result:

The data for the blue line (NS result) is here. For the original data from NS, please contact jzou

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 DEV
0.000 0 0 0 0 0 0 0 0 0 0 0 0 0 0.000
0.004 392 403 409 366 381 407 424 418 414 370 398 19 402 -0.008
0.008 840 864 814 842 785 812 861 814 774 797 820 29 806 0.017
0.012 1214 1200 1198 1229 1235 1227 1205 1191 1237 1191 1213 17 1215 -0.002
0.016 1674 1606 1598 1635 1661 1621 1566 1672 1662 1684 1638 37 1626 0.007
0.020 2087 2056 2003 2081 2019 2097 2003 2007 1972 2047 2037 40 2041 -0.002
0.024 2521 2480 2552 2465 2396 2583 2468 2418 2449 2458 2479 55 2459 0.008
0.028 2794 3029 2845 2857 2824 2868 2881 3003 2927 2859 2889 72 2881 0.003
0.032 3312 3333 3247 3320 3246 3274 3310 3216 3420 3334 3301 55 3306 -0.001
0.036 3827 3682 3766 3693 3607 3648 3835 3792 3763 3741 3735 72 3734 0.000
0.040 4204 4153 4196 4186 4274 4247 4121 4241 4231 4218 4207 43 4167 0.010
0.044 4589 4604 4646 4675 4602 4577 4639 4772 4738 4553 4640 67 4603 0.008
0.048 4873 5070 5011 5069 4940 4990 5203 4947 5056 5094 5025 89 5042 -0.003
0.052 5418 5573 5629 5366 5582 5497 5530 5674 5501 5430 5520 92 5485 0.006
0.056 5968 6009 5961 6055 5834 5833 5928 5946 5814 5791 5914 86 5932 -0.003
0.060 6307 6441 6375 6468 6454 6375 6308 6276 6423 6347 6377 64 6383 -0.001
0.064 6722 6866 6823 6873 7029 6859 6926 6780 6711 7033 6862 106 6838 0.004
0.068 7427 7325 7056 7346 7313 7287 7325 7202 7379 7429 7309 105 7296 0.002
0.072 7712 7846 7572 7802 7727 7879 7811 7734 7768 7764 7762 81 7759 0.000
0.076 8217 8206 8371 8384 8315 8264 8163 8369 8249 8175 8271 79 8225 0.006
0.080 8496 8726 8652 8690 8815 8718 8523 8825 8763 8670 8688 104 8696 -0.001
0.084 9487 9263 9250 9197 9325 9188 9333 9219 9189 9263 9271 87 9170 0.011
0.088 9733 9820 9672 9619 9854 9906 9666 9733 9751 9806 9756 86 9649 0.011
0.092 10184 10175 10195 10297 10167 10132 10193 10067 9974 10291 10168 91 10132 0.003
0.096 10650 10612 10899 10644 10607 10674 10718 10476 10744 10752 10678 106 10619 0.005
0.100 11185 11268 10985 11324 11158 11127 11158 11185 11003 11209 11160 99 11111 0.004
0.104 11888 11621 11557 11810 11731 11811 11890 11840 11612 11606 11737 121 11607 0.011
0.108 12226 12187 12329 12120 12147 12328 12026 12218 12084 12099 12176 96 12108 0.006
0.112 12687 12707 12818 12793 12623 12826 12555 12737 12708 12968 12742 110 12613 0.010
0.116 13371 13215 13102 13361 13265 13061 13321 13222 13111 13192 13222 103 13122 0.008
0.120 13968 13859 13857 13893 13895 13690 13962 13651 13894 13686 13836 111 13636 0.015
0.124 14342 14444 14443 14563 14688 14505 14331 14334 14330 14389 14437 113 14155 0.020
0.128 14801 14781 14965 14999 14790 15046 15006 14716 14853 14657 14861 128 14679 0.012
0.132 15512 15429 15634 15257 15419 15592 15293 15346 15322 15687 15449 143 15207 0.016
0.136 15752 15881 16198 16112 16067 15917 15868 16144 16007 16005 15995 133 15741 0.016
0.140 16654 16292 16725 16609 16633 16638 16405 16552 16522 16614 16564 122 16279 0.018
0.144 17166 16893 17095 17004 16839 16998 16720 17209 16888 17138 16995 151 16822 0.010
0.148 17740 17630 17515 17664 17515 17566 17392 17570 17424 17671 17569 105 17371 0.011

 

The raw Experiment data: dropStat