Changes between Version 3 and Version 4 of GENIEducation/SampleAssignments/TcpAssignment/ForInstructors


Ignore:
Timestamp:
05/14/13 11:00:12 (12 years ago)
Author:
shuang@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIEducation/SampleAssignments/TcpAssignment/ForInstructors

    v3 v4  
    99
    1010== Guidance for leading the exercise ==
    11 
    12  Steps by step instructions for how to do this assignment, e.g.:
    13    * useful commands:
     11 * useful commands:
    1412 Change the use of congestion control algorithm:
    1513{{{
     
    2725
    2826== Solutions ==
    29 Anything that would help grade this assignment, e.g.:
    30   * Answers to the source code for kernel module can be found [http://www.gpolab.bbn.com/experiment-support/TCPExampleExperiment/tcp_exp_answer.c Here]
     27 * Section 3.1 Question 1. use default TCP congestion control (cubic) on left and right, run iperf between them (TCP flow comes from right to left): [[BR]]
     28 On left, run:
     29 {{{
     30 /usr/local/etc/emulab/emulab-iperf -s
     31 }}}
     32 On right, run (10.10.1.1 is the ip address for left):
     33 {{{
     34 /usr/local/etc/emulab/emulab-iperf -c 10.10.1.1 -t 60
     35 }}}
     36 Results: 94.2 Mbps for Cubic when there is no delay introduced
     37{{{
     38------------------------------------------------------------
     39Client connecting to 10.10.1.1, TCP port 5001
     40TCP window size: 16.0 KByte (default)
     41------------------------------------------------------------
     42[  3] local 10.10.2.1 port 53755 connected with 10.10.1.1 port 5001
     43[  3]  0.0-60.0 sec    674 MBytes  94.2 Mbits/sec
     44}}}
     45 Let both left and right use reno as the TCP congestion control mechanism, repeat the experiments:
     46{{{
     47echo reno | sudo tee /proc/sys/net/ipv4/tcp_congestion_control
     48}}}
     49 Results: 94.2 Mbps for reno when there is no delay introduced
     50{{{
     51------------------------------------------------------------
     52Client connecting to 10.10.1.1, TCP port 5001
     53TCP window size: 16.0 KByte (default)
     54------------------------------------------------------------
     55[  3] local 10.10.2.1 port 53073 connected with 10.10.1.1 port 5001
     56[  3]  0.0-60.0 sec    674 MBytes  94.2 Mbits/sec
     57}}}
     58 '''Answer:''' they are the same under no loss/delay
     59
     60 - Section 3.1 Question 2.
     61 '''Answer''': CUBIC controls the sending rate based on last loss event so when there is no loss, CUBIC should accelerate faster than Reno, especially when RTT is big. So when network has big RTT but no loss, CUBIC should outperform Reno.
     62
     63 - Section 3.1 Question 3. add 300ms delay and see how it goes: [[BR]]
     64  We can introduce the delay by configuring the interface on center that is connected with left, using sudo /sbin/tc qdisc [[BR]]
     65  With Cubic, here is the result:
     66{{{
     67[  3]  0.0-1800.2 sec  6.57 GBytes  31.3 Mbits/sec
     68[  3]  0.0-60.2 sec    213 MBytes  29.7 Mbits/sec
     69
     70[  3]  0.0- 1.0 sec  56.0 KBytes    459 Kbits/sec
     71[  3]  1.0- 2.0 sec    312 KBytes  2.56 Mbits/sec
     72[  3]  2.0- 3.0 sec    640 KBytes  5.24 Mbits/sec
     73[  3]  3.0- 4.0 sec  2.67 MBytes  22.4 Mbits/sec
     74[  3]  4.0- 5.0 sec  3.57 MBytes  29.9 Mbits/sec
     75[  3]  5.0- 6.0 sec  3.65 MBytes  30.6 Mbits/sec
     76[  3]  6.0- 7.0 sec  3.70 MBytes  31.1 Mbits/sec
     77[  3]  7.0- 8.0 sec  3.66 MBytes  30.7 Mbits/sec
     78}}}
     79 With Reno, here is the result:
     80{{{
     81[  3]  0.0-1800.1 sec  6.57 GBytes  31.3 Mbits/sec
     82[  3]  0.0-60.2 sec    214 MBytes  29.8 Mbits/sec
     83
     84[  3]  0.0- 1.0 sec  56.0 KBytes    459 Kbits/sec
     85[  3]  1.0- 2.0 sec    232 KBytes  1.90 Mbits/sec
     86[  3]  2.0- 3.0 sec    680 KBytes  5.57 Mbits/sec
     87[  3]  3.0- 4.0 sec  2.76 MBytes  23.1 Mbits/sec
     88[  3]  4.0- 5.0 sec  4.11 MBytes  34.5 Mbits/sec
     89[  3]  5.0- 6.0 sec  3.68 MBytes  30.9 Mbits/sec
     90}}}
     91
     92 '''Answer:''' I was hoping to see Cubic out-performs Reno but it seems that they are the same in this case.[[BR]]
     93 For the long run (e.g., 1800 seconds), Cubic and Reno perform similar under no loss and big delay [[BR]]
     94 For slow start, Cubic out-performs Reno (1.0 - 2.0 seconds) when no loss and high delay.
     95
     96 - Section 3.1 Question 4. repeat the experiments with 30 parallel connections (-P 30 option in iperf) and see how it goes: [[BR]]
     97 With Cubic, here is the result:
     98{{{
     99[ 12]  0.0-57.0 sec  13.1 MBytes  1.93 Mbits/sec
     100[ 16]  0.0-57.0 sec  13.8 MBytes  2.03 Mbits/sec
     101[ 14]  0.0-57.3 sec  20.2 MBytes  2.96 Mbits/sec
     102[ 18]  0.0-57.4 sec  18.4 MBytes  2.69 Mbits/sec
     103[  8]  0.0-57.4 sec  20.3 MBytes  2.97 Mbits/sec
     104[  7]  0.0-57.3 sec  23.7 MBytes  3.48 Mbits/sec
     105[  6]  0.0-57.3 sec  23.3 MBytes  3.41 Mbits/sec
     106[  5]  0.0-57.3 sec  29.4 MBytes  4.30 Mbits/sec
     107[  4]  0.0-57.3 sec  21.0 MBytes  3.07 Mbits/sec
     108[  3]  0.0-57.5 sec  23.3 MBytes  3.41 Mbits/sec
     109[ 11]  0.0-57.5 sec  18.5 MBytes  2.70 Mbits/sec
     110[ 15]  0.0-57.5 sec  23.7 MBytes  3.46 Mbits/sec
     111[ 13]  0.0-57.6 sec  26.4 MBytes  3.85 Mbits/sec
     112[ 17]  0.0-57.6 sec  19.3 MBytes  2.81 Mbits/sec
     113[  9]  0.0-57.8 sec  15.3 MBytes  2.22 Mbits/sec
     114[ 10]  0.0-57.9 sec  20.5 MBytes  2.97 Mbits/sec
     115[ 28]  0.0-60.0 sec  23.8 MBytes  3.32 Mbits/sec
     116[ 30]  0.0-60.0 sec  15.9 MBytes  2.22 Mbits/sec
     117[ 29]  0.0-60.1 sec  14.7 MBytes  2.05 Mbits/sec
     118[ 32]  0.0-60.1 sec  27.3 MBytes  3.81 Mbits/sec
     119[ 19]  0.0-60.1 sec  20.5 MBytes  2.86 Mbits/sec
     120[ 23]  0.0-60.1 sec  16.2 MBytes  2.25 Mbits/sec
     121[ 20]  0.0-60.1 sec  30.0 MBytes  4.19 Mbits/sec
     122[ 26]  0.0-60.1 sec  14.6 MBytes  2.04 Mbits/sec
     123[ 21]  0.0-60.2 sec  22.1 MBytes  3.07 Mbits/sec
     124[ 27]  0.0-60.3 sec  19.9 MBytes  2.77 Mbits/sec
     125[ 22]  0.0-60.4 sec  24.7 MBytes  3.44 Mbits/sec
     126[ 24]  0.0-60.4 sec  26.1 MBytes  3.62 Mbits/sec
     127[ 25]  0.0-60.5 sec  28.0 MBytes  3.88 Mbits/sec
     128[ 31]  0.0-60.5 sec  34.2 MBytes  4.74 Mbits/sec
     129[SUM]  0.0-60.5 sec    648 MBytes  89.8 Mbits/sec
     130
     131[  6]  0.0-1797.2 sec    684 MBytes  3.19 Mbits/sec
     132[  4]  0.0-1797.3 sec    678 MBytes  3.17 Mbits/sec
     133[  3]  0.0-1797.3 sec    675 MBytes  3.15 Mbits/sec
     134[ 10]  0.0-1797.8 sec    602 MBytes  2.81 Mbits/sec
     135[ 12]  0.0-1797.8 sec    664 MBytes  3.10 Mbits/sec
     136[ 17]  0.0-1797.9 sec    642 MBytes  3.00 Mbits/sec
     137[ 13]  0.0-1797.9 sec    686 MBytes  3.20 Mbits/sec
     138[  9]  0.0-1797.9 sec    707 MBytes  3.30 Mbits/sec
     139[ 14]  0.0-1798.0 sec    679 MBytes  3.17 Mbits/sec
     140[  5]  0.0-1798.2 sec    620 MBytes  2.89 Mbits/sec
     141[  8]  0.0-1798.2 sec    671 MBytes  3.13 Mbits/sec
     142[  7]  0.0-1798.2 sec    723 MBytes  3.37 Mbits/sec
     143[ 11]  0.0-1798.3 sec    696 MBytes  3.25 Mbits/sec
     144[ 16]  0.0-1798.3 sec    657 MBytes  3.07 Mbits/sec
     145[ 15]  0.0-1798.4 sec    624 MBytes  2.91 Mbits/sec
     146[ 18]  0.0-1798.8 sec    695 MBytes  3.24 Mbits/sec
     147[ 28]  0.0-1800.1 sec    705 MBytes  3.29 Mbits/sec
     148[ 23]  0.0-1800.1 sec    689 MBytes  3.21 Mbits/sec
     149[ 32]  0.0-1800.1 sec    686 MBytes  3.20 Mbits/sec
     150[ 31]  0.0-1800.2 sec    703 MBytes  3.28 Mbits/sec
     151[ 21]  0.0-1800.2 sec    671 MBytes  3.13 Mbits/sec
     152[ 30]  0.0-1800.4 sec    699 MBytes  3.26 Mbits/sec
     153[ 20]  0.0-1800.5 sec    668 MBytes  3.11 Mbits/sec
     154[ 22]  0.0-1800.6 sec    652 MBytes  3.04 Mbits/sec
     155[ 27]  0.0-1800.6 sec    701 MBytes  3.27 Mbits/sec
     156[ 19]  0.0-1800.6 sec    594 MBytes  2.77 Mbits/sec
     157[ 29]  0.0-1800.7 sec    680 MBytes  3.17 Mbits/sec
     158[ 26]  0.0-1800.8 sec    709 MBytes  3.30 Mbits/sec
     159[ 25]  0.0-1800.9 sec    646 MBytes  3.01 Mbits/sec
     160[ 24]  0.0-1801.1 sec    672 MBytes  3.13 Mbits/sec
     161[SUM]  0.0-1801.1 sec  19.7 GBytes  94.0 Mbits/sec
     162}}}
     163 With Reno, here is the result:
     164{{{
     165[ 17]  0.0-57.1 sec  7.38 MBytes  1.08 Mbits/sec
     166[ 15]  0.0-57.0 sec  7.33 MBytes  1.08 Mbits/sec
     167[ 14]  0.0-57.0 sec  7.35 MBytes  1.08 Mbits/sec
     168[ 18]  0.0-57.0 sec  7.16 MBytes  1.05 Mbits/sec
     169[ 13]  0.0-57.1 sec  7.31 MBytes  1.08 Mbits/sec
     170[  3]  0.0-57.2 sec  25.7 MBytes  3.77 Mbits/sec
     171[ 12]  0.0-57.2 sec  7.33 MBytes  1.08 Mbits/sec
     172[  5]  0.0-57.2 sec  87.5 MBytes  12.8 Mbits/sec
     173[  4]  0.0-57.2 sec  26.5 MBytes  3.88 Mbits/sec
     174[ 11]  0.0-57.2 sec  7.32 MBytes  1.07 Mbits/sec
     175[ 10]  0.0-57.3 sec  7.38 MBytes  1.08 Mbits/sec
     176[ 16]  0.0-57.3 sec  7.41 MBytes  1.09 Mbits/sec
     177[  8]  0.0-57.4 sec  29.6 MBytes  4.33 Mbits/sec
     178[  7]  0.0-57.7 sec  23.7 MBytes  3.45 Mbits/sec
     179[  9]  0.0-57.7 sec  23.3 MBytes  3.38 Mbits/sec
     180[  6]  0.0-58.1 sec  64.6 MBytes  9.33 Mbits/sec
     181[ 25]  0.0-60.0 sec  43.4 MBytes  6.06 Mbits/sec
     182[ 21]  0.0-60.0 sec  36.2 MBytes  5.05 Mbits/sec
     183[ 20]  0.0-60.2 sec  27.3 MBytes  3.81 Mbits/sec
     184[ 24]  0.0-60.1 sec  28.2 MBytes  3.94 Mbits/sec
     185[ 23]  0.0-60.1 sec  30.3 MBytes  4.23 Mbits/sec
     186[ 27]  0.0-60.0 sec  7.80 MBytes  1.09 Mbits/sec
     187[ 26]  0.0-60.1 sec  7.84 MBytes  1.09 Mbits/sec
     188[ 30]  0.0-60.1 sec  7.84 MBytes  1.09 Mbits/sec
     189[ 29]  0.0-60.1 sec  7.74 MBytes  1.08 Mbits/sec
     190[ 31]  0.0-60.1 sec  7.82 MBytes  1.09 Mbits/sec
     191[ 19]  0.0-60.3 sec  29.1 MBytes  4.04 Mbits/sec
     192[ 22]  0.0-60.2 sec  30.9 MBytes  4.31 Mbits/sec
     193[ 32]  0.0-60.1 sec  32.8 MBytes  4.58 Mbits/sec
     194[ 28]  0.0-60.1 sec  7.82 MBytes  1.09 Mbits/sec
     195[SUM]  0.0-60.3 sec    652 MBytes  90.7 Mbits/sec
     196}}}
     197 '''Answer:''' The above results show that the total performance is about the same for Cubic and Reno. [[BR]]
     198 Apparently when u use multiple TCP connections the bandwidth utilization will be higher. [[BR]]
     199 But the single throughput for each TCP connection varies. [[BR]]
     200
     201 - Section 3.1 Question 5. remove 300ms delay, add 5% lossrate and see how it goes: [[BR]]
     202 With Cubic, here is the result:
     203{{{
     204[  3]  0.0-60.0 sec  73.7 MBytes  10.3 Mbits/sec
     205
     20610% lossrate: [  3]  0.0-60.6 sec  17.3 MBytes  2.39 Mbits/sec
     207}}}
     208 With Reno, here is the result:
     209{{{
     210[  3]  0.0-60.0 sec  59.5 MBytes  8.32 Mbits/sec
     211
     21210% lossrate: [  3]  0.0-60.2 sec  13.5 MBytes  1.89 Mbits/sec
     213}}}
     214 '''Answer:''' Apparently Cubic out-performs Reno under 5% lossrate.
     215
     216 - Section 3.2 Question 1. restore NIC back to no loss and no delay, run 10 TCP connections from right to left, while running 20Mbps UDP session from top to left [[BR]]
     217 UDP throughput:
     218{{{
     219[  3]  0.0-60.1 sec    141 MBytes  19.6 Mbits/sec  0.416 ms  431/100735 (0.43%)
     220}}}
     221 TCP throughput:
     222{{{
     223[  5]  0.0-60.1 sec  50.2 MBytes  7.01 Mbits/sec
     224[  4]  0.0-60.0 sec  78.8 MBytes  11.0 Mbits/sec
     225[  7]  0.0-60.0 sec  55.0 MBytes  7.69 Mbits/sec
     226[  6]  0.0-60.0 sec  71.1 MBytes  9.94 Mbits/sec
     227[  8]  0.0-60.1 sec  39.5 MBytes  5.52 Mbits/sec
     228[ 10]  0.0-60.0 sec  37.7 MBytes  5.27 Mbits/sec
     229[ 11]  0.0-60.1 sec  39.5 MBytes  5.51 Mbits/sec
     230[ 12]  0.0-60.0 sec  73.6 MBytes  10.3 Mbits/sec
     231[  9]  0.0-60.1 sec  46.8 MBytes  6.54 Mbits/sec
     232[  3]  0.0-60.3 sec  49.1 MBytes  6.83 Mbits/sec
     233[SUM]  0.0-60.3 sec    541 MBytes  75.3 Mbits/sec
     234}}}
     235 '''Answer:''' Apparently UDP will not care about loss: the client keeps sending at a rate of 20Mbps despite 0.43% loss.[[BR]]
     236 On the other hand, TCP will do its rate control/congestion control mechanism when facing with packets loss and hence has smaller throughputs.
     237
     238 - Section 3.2 Question 2. follow question 5, how to enforce fairness using tc qdisc for this 11 flows? Prove it [[BR]]
     239 Let's try the following command and see how it goes (it simply uses fair-queuing discipline):
     240{{{
     241sudo /sbin/tc qdisc add dev eth2 root handle 1:0 sfq
     242}}}
     243 UDP throughput:
     244{{{
     245[  3]  0.0-60.0 sec    141 MBytes  19.7 Mbits/sec
     246[  3] Sent 100367 datagrams
     247[  3] Server Report:
     248[  3]  0.0-60.0 sec  67.3 MBytes  9.40 Mbits/sec  2.355 ms 52361/100366 (52%)
     249[  3]  0.0-60.0 sec  1 datagrams received out-of-order
     250}}}
     251 TCP throughput:
     252{{{
     253[  5]  0.0-57.0 sec  58.6 MBytes  8.62 Mbits/sec
     254[  4]  0.0-57.0 sec  58.7 MBytes  8.63 Mbits/sec
     255[  3]  0.0-57.0 sec  58.6 MBytes  8.63 Mbits/sec
     256[  9]  0.0-57.0 sec  58.3 MBytes  8.57 Mbits/sec
     257[  8]  0.0-57.0 sec  58.6 MBytes  8.63 Mbits/sec
     258[  7]  0.0-57.0 sec  58.2 MBytes  8.57 Mbits/sec
     259[ 10]  0.0-57.1 sec  57.4 MBytes  8.44 Mbits/sec
     260[  6]  0.0-57.0 sec  58.5 MBytes  8.61 Mbits/sec
     261[ 11]  0.0-57.0 sec  57.4 MBytes  8.44 Mbits/sec
     262[ 12]  0.0-60.0 sec  90.4 MBytes  12.6 Mbits/sec
     263[SUM]  0.0-60.0 sec    615 MBytes  86.0 Mbits/sec
     264}}}
     265 '''Answer:''' It works. UDP throughput is slightly bigger than TCP, probably because of TCP's slow start. [[BR]]
     266 A little bit surprising that one of the TCP flows has way better throughput than the rest. [[BR]]
     267 Maybe it is because that I ran both UDP and TCP for 60 seconds and that TCP connection is the last one being created[[BR]]
     268 As a result, when the UDP session ends, the last TCP session is still active for about 1 second, boosting up the total throughput. Just a guess[[BR]]
     269
     270 - Section 3.3 Question 1. change NIC delay to 100ms, remove fair queuing, see how it goes: [[BR]]
     271 Result: (I am using Cubic)
     272{{{
     273[  3]  0.0-60.0 sec    567 MBytes  79.3 Mbits/sec
     274}}}
     275 
     276 - Section 3.3 Question 2.
     277 Now add a 75ms delay variance and see how it goes:[[BR]]
     278 Result: (again, using Cubic)
     279{{{
     280[  3]  0.0-60.0 sec  24.4 MBytes  3.41 Mbits/sec
     281}}}
     282 '''Answer''': WoW! It surprised me that reordering can affect TCP's performance so much!
     283
     284 - Section 3.3 Question 3. Now tweak the parameters in /proc/sys/net/ipv4/tcp_reordering and see what's the best you can get:[[BR]]
     285 Default value is 3, meaning TCP will retransmit when 3 duplicate ACK is received. [[BR]]
     286 In our case, since no packet is really lost, meaning there is no retransmission needed. [[BR]]
     287 I changed the number to 100, here is the result:
     288{{{
     289[  3]  0.0-60.0 sec  32.6 MBytes  4.55 Mbits/sec
     290}}}
     291 Well, not a big boost. Let me change it to 100000 and here is the result:
     292{{{
     293[  3]  0.0-60.3 sec  62.4 MBytes  8.69 Mbits/sec
     294}}}
     295 Well, let me try a HUGE number 1000000000000000 which basically disables TCP's fast-retransmission and see how it goes:
     296{{{
     297[  3]  0.0-60.3 sec  71.0 MBytes  9.88 Mbits/sec
     298}}}
     299 What about if I am using Reno? Just curious[[BR]]
     300 tcp_reordering = 3, result:
     301{{{
     302[  3]  0.0-60.1 sec  40.6 MBytes  5.67 Mbits/sec
     303}}}
     304 tcp_reordering = 100000000000000, result:
     305{{{
     306[  3]  0.0-60.0 sec  71.8 MBytes  10.0 Mbits/sec
     307}}}
     308 '''Answer: ''' A too high value of tcp_reordering disables TCP's fast retransmission. A too low value will cause unnecessary retransmissions, which is a waste of bandwidth.
     309
     310 - Section 3.4 Question 1. use Cubic, with SACK on(default), set loss to 10%, see how it goes [[BR]]
     311 Result (repeated for 5 times):
     312{{{
     313[  3]  0.0-60.9 sec  14.3 MBytes  1.97 Mbits/sec
     314[  3]  0.0-60.0 sec  15.3 MBytes  2.13 Mbits/sec
     315[  3]  0.0-60.0 sec  19.3 MBytes  2.70 Mbits/sec
     316[  3]  0.0-60.2 sec  16.5 MBytes  2.30 Mbits/sec
     317[  3]  0.0-60.1 sec  19.1 MBytes  2.67 Mbits/sec
     318}}}
     319 '''Answer:''' SACK is most beneficial when receiver keeps sending duplicated ACKs back to the sender[[BR]]
     320 So if it is a long delay high bandwidth lossy network, SACK will be very useful.
     321
     322 - Section 3.4 Question 2. Disable tcp_sack and here is the result:
     323{{{
     324[  3]  0.0-60.0 sec  9.91 MBytes  1.39 Mbits/sec
     325[  3]  0.0-60.1 sec  11.4 MBytes  1.59 Mbits/sec
     326[  3]  0.0-60.2 sec  13.4 MBytes  1.87 Mbits/sec
     327[  3]  0.0-60.0 sec  10.0 MBytes  1.40 Mbits/sec
     328[  3]  0.0-60.1 sec  10.5 MBytes  1.47 Mbits/sec
     329}}}
     330 '''Answer:''' SACK is most beneficial when receiver keeps sending duplicated ACKs back to the sender[[BR]]
     331 So if it is a long delay high bandwidth lossy network, SACK will be very useful.
     332
     333 - Section 3.5 Question 1. compile and use a customized congestion control mechanism exp and see how it goes:[[BR]]
     334 In the new exp congestion control module, we use: [[BR]]
     335  a slow start exponential factor of 3 instead of 2 in Reno; [[BR]]
     336  ssthresh x 3 / 4 when entering loss recovery instead of ssthresh/2 as in Reno [[BR]]
     337
     338 The source code for the congestion control can be found [http://www.gpolab.bbn.com/experiment-support/TCPExampleExperiment/tcp_exp.c tcp_exp.c] . [[BR]]
     339 As well as the [http://www.gpolab.bbn.com/experiment-support/TCPExampleExperiment/Makefile Makefile] [[BR]]
     340 Note: You Do need to change the source code in order to make it happen. [[BR]]
     341 You can check out [http://www.cs.fsu.edu/~baker/devices/lxr/http/source/linux/net/ipv4/tcp_cong.c Reno Source Code] for reference [[BR]]
     342 (The answers to the source code change can be found [http://www.gpolab.bbn.com/experiment-support/TCPExampleExperiment/tcp_exp_answer.c here]) [[BR]]
     343
     344 Steps to compile the kernel code: [[BR]]
     345 1. Comment out the line: [[BR]]
     346   ''exclude=mkinitrd* kernel*''[[BR]]
     347   in the file ''/etc/yum.conf'', to allow yum to install kernel headers. [[BR]]
     348 2. Install the required packages with this command: [[BR]]
     349   ''sudo yum install kernel-devel kernel-headers'' [[BR]]
     350 3. Fix up the kernel version in the installed headers to match the running kernel; this can be tricky, but these steps should handle it:[[BR]]
     351   * a). Find your kernel sources. They are in ''/usr/src/kernel'', in a directory that depends on the installed version. As of the time this page was created, [[BR]]
     352   the directory is ''2.6.27.41-170.2.117.fc10.i686''. We call this directory ''$KERNELSRC''.[[BR]]
     353   * b). identify your running kernel version by running ''uname -r''. It will be something like ''2.6.27.5-117.emulab1.fc10.i686''. The first three dotted components [[BR]]
     354   (''2.6.27'', in this case) are the major, minor, and micro versions, respectively, and the remainder of the version string (''.5-117.emulab.fc10.i686'') is the extraversion. [[BR]]
     355   Note the extraversion of your kernel.[[BR]]
     356   * c). In''$KERNELSRC/Makefile'',find the line beginning with ''EXTRAVERSION''. Replace its value with the extraversion of your kernel.[[BR]]
     357   * d). Update the kernel header tree to this new version by running the command:
     358   {{{
     359   sudo make include/linux/utsrelease.h
     360   }}}
     361 After you compile the source code, you will find a kernel model named ''''tcp_exp.ko'''' being created. [[BR]]
     362 Use "''sudo insmod tcp_exp.ko''" to insert the module into the kernel. [[BR]]
     363 You can use "''sudo rmmod tcp_exp''" to remove the module later on [[BR]]
     364 Once the module is complete and loaded into the kernel, the algorithm implemented by the module can be selected in the same manner that reno and cubic were [[BR]]
     365 selected in previous sections, by placing the keyword ''exp'' in ''/proc/sys/net/ipv4/tcp_congestion_control.''
     366
     367 '''Comparison: '''Apparently this will increase the sending rate of TCP during slow start time compared with Reno; [[BR]]
     368 This new mechanism will also cut less slow start threshold when entering loss recovery. [[BR]]
     369 Thus, it is a more aggressive algorithm and should out-perform Reno in one connection facing loss/delay. [[BR]]
     370 However, when number of connections is big, it can be defeated by Reno; simply because its aggressiveness will introduce more loss when network condition is bad [[BR]]
     371
     372 - Section 3.5 Question 2. Performance Results: [[BR]]
     373 Under 500ms delay: [[BR]]
     374 Single Reno connection:
     375{{{
     376[  3]  0.0-60.3 sec    127 MBytes  17.7 Mbits/sec
     377}}}
     378 Single exp connection:
     379{{{
     380[  3]  0.0-60.3 sec  11.1 MBytes  1.54 Mbits/sec
     381}}}
     382 30 Reno connection:
     383{{{
     384[ 12]  0.0-51.0 sec  3.06 MBytes    504 Kbits/sec
     385[ 15]  0.0-51.0 sec  2.52 MBytes    414 Kbits/sec
     386[ 10]  0.0-51.0 sec  2.64 MBytes    434 Kbits/sec
     387[  3]  0.0-51.0 sec  3.00 MBytes    493 Kbits/sec
     388[  4]  0.0-51.1 sec  4.94 MBytes    811 Kbits/sec
     389[ 13]  0.0-51.1 sec  2.95 MBytes    485 Kbits/sec
     390[ 14]  0.0-51.2 sec  2.88 MBytes    471 Kbits/sec
     391[ 16]  0.0-51.2 sec  2.38 MBytes    390 Kbits/sec
     392[ 11]  0.0-51.3 sec  2.55 MBytes    418 Kbits/sec
     393[ 18]  0.0-51.3 sec  3.09 MBytes    505 Kbits/sec
     394[  7]  0.0-51.3 sec  3.92 MBytes    641 Kbits/sec
     395[  6]  0.0-51.4 sec  5.17 MBytes    845 Kbits/sec
     396[ 17]  0.0-51.4 sec  2.41 MBytes    393 Kbits/sec
     397[  9]  0.0-51.9 sec  5.90 MBytes    954 Kbits/sec
     398[  8]  0.0-52.3 sec  4.63 MBytes    744 Kbits/sec
     399[  5]  0.0-52.3 sec  4.33 MBytes    694 Kbits/sec
     400[ 19]  0.0-54.3 sec  9.04 MBytes  1.40 Mbits/sec
     401[ 23]  0.0-54.4 sec  6.91 MBytes  1.07 Mbits/sec
     402[ 22]  0.0-54.4 sec  10.8 MBytes  1.67 Mbits/sec
     403[ 21]  0.0-54.4 sec  6.48 MBytes  1.00 Mbits/sec
     404[ 24]  0.0-54.4 sec  5.59 MBytes    862 Kbits/sec
     405[ 25]  0.0-54.5 sec  9.11 MBytes  1.40 Mbits/sec
     406[ 20]  0.0-54.9 sec  5.80 MBytes    887 Kbits/sec
     407[ 32]  0.0-60.0 sec  3.20 MBytes    447 Kbits/sec
     408[ 31]  0.0-60.1 sec  3.12 MBytes    435 Kbits/sec
     409[ 27]  0.0-60.1 sec  2.52 MBytes    351 Kbits/sec
     410[ 28]  0.0-60.1 sec  2.86 MBytes    399 Kbits/sec
     411[ 30]  0.0-60.2 sec  2.01 MBytes    280 Kbits/sec
     412[ 29]  0.0-60.3 sec  2.62 MBytes    365 Kbits/sec
     413[ 26]  0.0-60.4 sec  2.92 MBytes    406 Kbits/sec
     414[SUM]  0.0-60.4 sec    129 MBytes  18.0 Mbits/sec
     415}}}
     416 30 exp connection:
     417{{{
     418[  5]  0.0-57.1 sec  8.42 MBytes  1.24 Mbits/sec
     419[ 16]  0.0-57.2 sec  2.67 MBytes    392 Kbits/sec
     420[ 14]  0.0-57.2 sec  2.63 MBytes    386 Kbits/sec
     421[ 10]  0.0-57.3 sec  2.60 MBytes    381 Kbits/sec
     422[  4]  0.0-57.3 sec  7.45 MBytes  1.09 Mbits/sec
     423[ 11]  0.0-57.3 sec  2.32 MBytes    340 Kbits/sec
     424[ 17]  0.0-57.3 sec  2.79 MBytes    408 Kbits/sec
     425[ 12]  0.0-57.3 sec  3.04 MBytes    445 Kbits/sec
     426[ 15]  0.0-57.4 sec  2.55 MBytes    372 Kbits/sec
     427[ 13]  0.0-57.4 sec  2.93 MBytes    428 Kbits/sec
     428[  7]  0.0-57.6 sec  4.09 MBytes    595 Kbits/sec
     429[  3]  0.0-57.7 sec  9.19 MBytes  1.34 Mbits/sec
     430[  8]  0.0-57.9 sec  2.77 MBytes    402 Kbits/sec
     431[  6]  0.0-58.0 sec  28.8 MBytes  4.16 Mbits/sec
     432[ 18]  0.0-58.7 sec  3.04 MBytes    434 Kbits/sec
     433[ 31]  0.0-60.0 sec  10.1 MBytes  1.41 Mbits/sec
     434[ 32]  0.0-60.0 sec  3.24 MBytes    453 Kbits/sec
     435[ 24]  0.0-60.2 sec  4.41 MBytes    614 Kbits/sec
     436[ 23]  0.0-60.3 sec  8.37 MBytes  1.16 Mbits/sec
     437[ 28]  0.0-60.3 sec  3.45 MBytes    480 Kbits/sec
     438[ 29]  0.0-60.3 sec  2.55 MBytes    356 Kbits/sec
     439[ 30]  0.0-60.4 sec  3.30 MBytes    459 Kbits/sec
     440[ 27]  0.0-60.3 sec  2.64 MBytes    367 Kbits/sec
     441[ 26]  0.0-60.4 sec  2.66 MBytes    370 Kbits/sec
     442[ 22]  0.0-60.3 sec  3.71 MBytes    516 Kbits/sec
     443[ 19]  0.0-60.8 sec  3.48 MBytes    480 Kbits/sec
     444[ 20]  0.0-61.0 sec  3.55 MBytes    489 Kbits/sec
     445[ 25]  0.0-61.3 sec  4.31 MBytes    590 Kbits/sec
     446[ 21]  0.0-61.5 sec  5.57 MBytes    759 Kbits/sec
     447[  9]  0.0-61.9 sec  4.15 MBytes    563 Kbits/sec
     448[SUM]  0.0-61.9 sec    151 MBytes  20.4 Mbits/sec
     449}}}
     450 Under 5% loss: [[BR]]
     451 Single Reno connection:
     452{{{
     453[  3]  0.0-60.0 sec  64.0 MBytes  8.95 Mbits/sec
     454}}}
     455 Single exp connection:
     456{{{
     457[  3]  0.0-60.0 sec    124 MBytes  17.3 Mbits/sec
     458}}}
     459 30 Reno connection:
     460{{{
     461[ 12]  0.0-51.0 sec  17.8 MBytes  2.92 Mbits/sec
     462[ 11]  0.0-51.0 sec  18.8 MBytes  3.09 Mbits/sec
     463[ 10]  0.0-51.0 sec  19.1 MBytes  3.14 Mbits/sec
     464[  4]  0.0-51.0 sec  16.5 MBytes  2.71 Mbits/sec
     465[  6]  0.0-51.0 sec  18.6 MBytes  3.06 Mbits/sec
     466[  8]  0.0-51.0 sec  18.8 MBytes  3.10 Mbits/sec
     467[  3]  0.0-51.0 sec  19.9 MBytes  3.27 Mbits/sec
     468[  7]  0.0-51.2 sec  18.3 MBytes  2.99 Mbits/sec
     469[  9]  0.0-51.3 sec  19.5 MBytes  3.18 Mbits/sec
     470[ 14]  0.0-54.0 sec  19.3 MBytes  3.00 Mbits/sec
     471[ 13]  0.0-54.0 sec  19.5 MBytes  3.02 Mbits/sec
     472[ 17]  0.0-54.0 sec  19.5 MBytes  3.03 Mbits/sec
     473[ 24]  0.0-54.0 sec  19.8 MBytes  3.07 Mbits/sec
     474[ 22]  0.0-54.0 sec  19.8 MBytes  3.08 Mbits/sec
     475[ 23]  0.0-54.0 sec  19.2 MBytes  2.98 Mbits/sec
     476[ 21]  0.0-54.0 sec  18.8 MBytes  2.91 Mbits/sec
     477[ 20]  0.0-54.0 sec  19.6 MBytes  3.05 Mbits/sec
     478[ 19]  0.0-54.1 sec  19.5 MBytes  3.03 Mbits/sec
     479[ 32]  0.0-54.0 sec  19.5 MBytes  3.03 Mbits/sec
     480[ 18]  0.0-54.2 sec  19.7 MBytes  3.06 Mbits/sec
     481[ 15]  0.0-54.2 sec  19.2 MBytes  2.98 Mbits/sec
     482[  5]  0.0-54.7 sec  19.3 MBytes  2.96 Mbits/sec
     483[ 27]  0.0-60.0 sec  24.2 MBytes  3.39 Mbits/sec
     484[ 28]  0.0-60.0 sec  25.7 MBytes  3.59 Mbits/sec
     485[ 26]  0.0-60.0 sec  25.7 MBytes  3.59 Mbits/sec
     486[ 25]  0.0-60.1 sec  25.0 MBytes  3.49 Mbits/sec
     487[ 31]  0.0-60.0 sec  27.3 MBytes  3.82 Mbits/sec
     488[ 30]  0.0-60.0 sec  24.7 MBytes  3.45 Mbits/sec
     489[ 16]  0.0-60.0 sec  27.5 MBytes  3.85 Mbits/sec
     490[ 29]  0.0-60.6 sec  23.4 MBytes  3.24 Mbits/sec
     491[SUM]  0.0-60.6 sec    623 MBytes  86.3 Mbits/sec
     492}}}
     493 30 exp connection:
     494{{{
     495[ 20]  0.0-39.0 sec  13.9 MBytes  2.99 Mbits/sec
     496[ 10]  0.0-39.0 sec  13.8 MBytes  2.96 Mbits/sec
     497[ 14]  0.0-39.0 sec  13.4 MBytes  2.89 Mbits/sec
     498[  8]  0.0-39.0 sec  12.7 MBytes  2.73 Mbits/sec
     499[  6]  0.0-39.0 sec  14.7 MBytes  3.15 Mbits/sec
     500[  4]  0.0-39.1 sec  13.9 MBytes  2.97 Mbits/sec
     501[  5]  0.0-39.0 sec  13.0 MBytes  2.79 Mbits/sec
     502[  3]  0.0-39.0 sec  13.1 MBytes  2.81 Mbits/sec
     503[ 11]  0.0-39.0 sec  14.4 MBytes  3.09 Mbits/sec
     504[ 12]  0.0-39.0 sec  13.9 MBytes  2.98 Mbits/sec
     505[  9]  0.0-39.0 sec  13.7 MBytes  2.95 Mbits/sec
     506[ 13]  0.0-39.0 sec  14.8 MBytes  3.19 Mbits/sec
     507[ 19]  0.0-39.0 sec  12.7 MBytes  2.73 Mbits/sec
     508[ 18]  0.0-39.0 sec  12.9 MBytes  2.76 Mbits/sec
     509[ 17]  0.0-39.0 sec  13.5 MBytes  2.90 Mbits/sec
     510[  7]  0.0-39.2 sec  14.3 MBytes  3.07 Mbits/sec
     511[ 23]  0.0-42.0 sec  16.7 MBytes  3.34 Mbits/sec
     512[ 22]  0.0-42.0 sec  15.9 MBytes  3.18 Mbits/sec
     513[ 27]  0.0-42.0 sec  16.9 MBytes  3.38 Mbits/sec
     514[ 26]  0.0-42.0 sec  16.7 MBytes  3.33 Mbits/sec
     515[ 25]  0.0-42.0 sec  16.6 MBytes  3.32 Mbits/sec
     516[ 24]  0.0-42.0 sec  15.9 MBytes  3.18 Mbits/sec
     517[ 28]  0.0-42.0 sec  16.3 MBytes  3.25 Mbits/sec
     518[ 21]  0.0-42.0 sec  16.5 MBytes  3.28 Mbits/sec
     519[ 16]  0.0-42.0 sec  16.5 MBytes  3.29 Mbits/sec
     520[ 30]  0.0-48.0 sec  29.2 MBytes  5.09 Mbits/sec
     521[ 29]  0.0-48.0 sec  27.8 MBytes  4.86 Mbits/sec
     522[ 31]  0.0-48.0 sec  29.8 MBytes  5.21 Mbits/sec
     523[ 32]  0.0-48.1 sec  25.5 MBytes  4.44 Mbits/sec
     524[ 15]  0.0-60.0 sec  52.9 MBytes  7.40 Mbits/sec
     525[SUM]  0.0-60.0 sec    532 MBytes  74.3 Mbits/sec
     526}}}
     527 Under 500ms delay and 5% loss: [[BR]]
     528 Single Reno connection:
     529{{{
     530[  3]  0.0-61.0 sec    880 KBytes    118 Kbits/sec
     531}}}
     532 Single exp connection:
     533{{{
     534[  3]  0.0-60.5 sec  1016 KBytes    138 Kbits/sec
     535}}}
     536 30 Reno connection:
     537{{{
     538[ 16]  0.0-39.2 sec    528 KBytes    110 Kbits/sec
     539[ 13]  0.0-39.4 sec    600 KBytes    125 Kbits/sec
     540[ 12]  0.0-39.6 sec    368 KBytes  76.1 Kbits/sec
     541[ 11]  0.0-39.7 sec    584 KBytes    120 Kbits/sec
     542[ 14]  0.0-39.8 sec    560 KBytes    115 Kbits/sec
     543[  8]  0.0-39.8 sec    448 KBytes  92.1 Kbits/sec
     544[ 10]  0.0-40.0 sec    456 KBytes  93.5 Kbits/sec
     545[ 15]  0.0-40.0 sec    392 KBytes  80.2 Kbits/sec
     546[  5]  0.0-40.3 sec    448 KBytes  91.0 Kbits/sec
     547[  6]  0.0-40.5 sec    400 KBytes  80.9 Kbits/sec
     548[  3]  0.0-40.5 sec    512 KBytes    103 Kbits/sec
     549[  4]  0.0-40.9 sec    416 KBytes  83.3 Kbits/sec
     550[ 17]  0.0-41.3 sec    480 KBytes  95.1 Kbits/sec
     551[  9]  0.0-41.6 sec    536 KBytes    105 Kbits/sec
     552[ 18]  0.0-42.5 sec    496 KBytes  95.5 Kbits/sec
     553[ 25]  0.0-42.6 sec    392 KBytes  75.5 Kbits/sec
     554[ 29]  0.0-42.6 sec    504 KBytes  96.9 Kbits/sec
     555[ 24]  0.0-42.7 sec    608 KBytes    117 Kbits/sec
     556[ 19]  0.0-42.7 sec    520 KBytes  99.8 Kbits/sec
     557[  7]  0.0-43.1 sec    584 KBytes    111 Kbits/sec
     558[ 26]  0.0-43.1 sec    464 KBytes  88.1 Kbits/sec
     559[ 23]  0.0-43.2 sec    512 KBytes  97.1 Kbits/sec
     560[ 30]  0.0-43.2 sec    376 KBytes  71.3 Kbits/sec
     561[ 32]  0.0-43.2 sec    576 KBytes    109 Kbits/sec
     562[ 27]  0.0-43.5 sec    584 KBytes    110 Kbits/sec
     563[ 31]  0.0-43.6 sec    456 KBytes  85.7 Kbits/sec
     564[ 28]  0.0-43.8 sec    488 KBytes  91.3 Kbits/sec
     565[ 21]  0.0-49.4 sec    592 KBytes  98.3 Kbits/sec
     566[ 22]  0.0-51.6 sec    664 KBytes    105 Kbits/sec
     567[ 20]  0.0-60.8 sec    696 KBytes  93.8 Kbits/sec
     568[SUM]  0.0-60.8 sec  14.9 MBytes  2.05 Mbits/sec
     569}}}
     570 30 exp connection:
     571{{{
     572[  3]  0.0-51.1 sec    824 KBytes    132 Kbits/sec
     573[ 19]  0.0-51.2 sec    720 KBytes    115 Kbits/sec
     574[ 14]  0.0-51.2 sec    816 KBytes    130 Kbits/sec
     575[  5]  0.0-51.3 sec    888 KBytes    142 Kbits/sec
     576[  8]  0.0-51.3 sec  1008 KBytes    161 Kbits/sec
     577[ 13]  0.0-51.3 sec    832 KBytes    133 Kbits/sec
     578[  6]  0.0-51.4 sec    776 KBytes    124 Kbits/sec
     579[  4]  0.0-51.5 sec    808 KBytes    129 Kbits/sec
     580[ 18]  0.0-51.5 sec    664 KBytes    106 Kbits/sec
     581[  9]  0.0-51.7 sec    712 KBytes    113 Kbits/sec
     582[ 15]  0.0-51.8 sec    944 KBytes    149 Kbits/sec
     583[  7]  0.0-51.9 sec    600 KBytes  94.7 Kbits/sec
     584[ 11]  0.0-51.9 sec    776 KBytes    122 Kbits/sec
     585[ 17]  0.0-52.0 sec    744 KBytes    117 Kbits/sec
     586[ 16]  0.0-52.0 sec    824 KBytes    130 Kbits/sec
     587[ 12]  0.0-52.0 sec    656 KBytes    103 Kbits/sec
     588[ 22]  0.0-54.4 sec  1.08 MBytes    166 Kbits/sec
     589[ 25]  0.0-54.4 sec    888 KBytes    134 Kbits/sec
     590[ 26]  0.0-54.6 sec  1.05 MBytes    161 Kbits/sec
     591[ 21]  0.0-54.7 sec  1.00 MBytes    153 Kbits/sec
     592[ 30]  0.0-54.8 sec    952 KBytes    142 Kbits/sec
     593[ 23]  0.0-55.0 sec    960 KBytes    143 Kbits/sec
     594[ 20]  0.0-55.0 sec  1008 KBytes    150 Kbits/sec
     595[ 27]  0.0-55.2 sec  1.04 MBytes    158 Kbits/sec
     596[ 28]  0.0-55.3 sec    872 KBytes    129 Kbits/sec
     597[ 24]  0.0-55.5 sec    728 KBytes    107 Kbits/sec
     598[ 29]  0.0-57.1 sec    848 KBytes    122 Kbits/sec
     599[ 10]  0.0-60.4 sec    952 KBytes    129 Kbits/sec
     600[ 31]  0.0-60.8 sec    808 KBytes    109 Kbits/sec
     601[ 32]  0.0-61.7 sec  1.12 MBytes    152 Kbits/sec
     602[SUM]  0.0-61.7 sec  25.4 MBytes  3.45 Mbits/sec
     603}}}
     604
     605 * Answers to the source code for kernel module can be found [http://www.gpolab.bbn.com/experiment-support/TCPExampleExperiment/tcp_exp_answer.c Here]