Changes between Version 15 and Version 16 of GENIEducation/SampleAssignments/TcpAssignment/ExerciseLayout/Execute


Ignore:
Timestamp:
12/09/13 17:59:41 (6 years ago)
Author:
sedwards@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIEducation/SampleAssignments/TcpAssignment/ExerciseLayout/Execute

    v15 v16  
    147147
    148148'''3.5 An Experimental Congestion Avoidance module for Linux'''[[BR]]
    149  Source code needed (to-be changed by you): [[BR]]
    150  - [http://www.gpolab.bbn.com/experiment-support/TCPExampleExperiment/Makefile Makefile]
    151  - [http://www.gpolab.bbn.com/experiment-support/TCPExampleExperiment/tcp_exp.c tcp_exp.c] [[BR]]
    152  In this exercise, you will develop and evaluate a TCP congestion control module for the Linux kernel. Linux provides a pluggable interface for TCP congestion control, which allows named congestion control modules to manipulate its sending rate and reaction to congestion events. You have already used the reno and cubic modules, and in this exercise you will create one named exp. [[BR]]
    153  Linux kernel modules must be compiled against kernel source that matches the kernel into which the module will be loaded. In order to prepare your ProtoGENI host for kernel module development, follow these steps:
    154  1. Comment out the line:
    155  {{{
    156  exclude=mkinitrd* kernel*
    157  }}}
    158  in the file ''/etc/yum.conf'', to allow yum to install kernel headers.
    159  2. Install the required packages with this command:
    160  {{{
    161  sudo yum install kernel-devel kernel-headers
    162  }}}
    163  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.
    164   (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 handout was created, that directory is ''2.6.27.41-170.2.117.fc10.i686''. We will call this directory ''$KERNELSRC''.
    165   (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 (''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. Note the extraversion of your kernel.
    166   (c) In''$KERNELSRC/Makefile'',find the line beginning with ''EXTRAVERSION''. Replace its value with the extraversion of your kernel.
    167   (d) Update the kernel header tree to this new version by running the command:
    168 {{{
    169 sudo make include/linux/utsrelease.h
    170 }}}
    171   More details to handle version issues are provided at [http://tldp.org/LDP/lkmpg/2.6/html/x380.html Building modules for a precompiled kernel]. [[BR]]
    172  A Makefile for compiling the module and the source for a stub TCP congestion control module are included in [http://www.gpolab.bbn.com/experiment-support/TCPExampleExperiment/Makefile Makefile]. [[BR]]
    173  The module is named tcp exp (for experimental TCP), and the congestion control algorithm is named exp. Comments in the provided source file explain the relationship between the various functions, and more information can be found in [http://lwn.net/Articles/128681/ Pluggable congestion avoidance modules]. [[BR]]
    174  The compiled module (which is built with make and called ''tcp_exp.ko'') can be inserted into the kernel using ''insmod''. It can be removed using the command ''rmmod tcp_exp'' and reloaded with ''insmod'' if changes are required. [[BR]]
    175  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 selected in previous exercises, by placing the keyword exp in ''/proc/sys/net/ipv4/tcp_congestion_control''.
    176  
    177  '''3.5.1 Algorithm Requirements''' [[BR]]
    178  The experimental congestion control module is based on Reno, but has the following modifications: [[BR]]
    179   • It uses a Slow Start exponential factor of 3. Reno uses 2. [[BR]]
    180   • It cuts ssthresh to 3 × !FlightSize/4 when entering loss recovery. Reno cuts to !FlightSize/2.
    181 
    182  '''3.5.2 Hints [[BR]]'''
    183  These hints and suggestions may help you get started. [[BR]]
    184  • The existing congestion avoidance modules are a good start. See ''net/ipv4/tcpcong.c'' in the Linux source for the Linux Reno implementation.[[BR]]
    185  • The file ''net/ipv4/tcp_input.c'' is a good place to learn how the congestion avoidance modules are used and invoked.[[BR]]
    186  • [http://tools.ietf.org/html/rfc5681 RFC 5681] specifies the Reno congestion control actions in detail, and may be helpful in understanding the kernel code.[[BR]]
    187  • The Linux Cross Reference at ''http://lxr.linux.no/linux'' may be useful for navigating and understanding how the code fits together.[[BR]]
    188  • If one of the hosts becomes unresponsive due to a bug in your congestion control module, you can restart the sliver to reboot it.[[BR]]
    189  • [http://tldp.org/LDP/lkmpg/2.6/html. The Linux Kernel Module Programming Guide] provides a good introduction to kernel module programming in general.[[BR]]
    190 
    191  '''3.5.3 Evaluation [[BR]]'''
    192  Once you have implemented the algorithm described above, answer the following questions:
    193   - 1. Question: Discuss the impact of these algorithmic changes in the context of traditional Reno congestion control.
    194   - 2. Question: Compare the convergence time and fairness of your algorithm with Reno and Cubic under (a) high delay (500 ms) and (2) high loss (5%) conditions. Use [https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&ved=0CDkQFjAB&url=http%3A%2F%2Fwww1.cse.wustl.edu%2F~jain%2Fpapers%2Fftp%2Ffairness.pdf&ei=10-SUYGkPKvh4APIuYGIAQ&usg=AFQjCNHgCfUSby9WFtF5TJjpFSS3ncFw8Q&sig2=KxbbF8iM1IXC7peGZV-w3g&bvm=bv.46471029,d.dmg Jain’s fairness index], or some other quantitative measure of fairness, in your comparison.
    195 
     149 [wiki:GENIEducation/SampleAssignments/TcpAssignment/ExerciseLayout/KernelMod Instructions for step 3.5] haven't been tested with xen VMs running Ubuntu.
    196150
    197151