Overview

We implement ImTCP and some applications (TCP symbiosys and TCP guarantee, which controll the congestion window size of TCP by using the measurement results of ImTCP) by modifying the linux 2.6.16.21 kernel system. If you want to use them, download the following archive file and rebuild your kernel system.

imtcp_linux2.6.16.21_0.1.0b.tar.gz archive file contains:

When you install ImTCP, the value of HZ becomes important. The accuracy of measurement result depends on the parameter HZ. When HZ is set to large value, you can obtain the bandwidth information more accurately. On the other hand, setting the large value to HZ affects the performance of your system. So when determining the value of HZ, you should consider the trade-off relationship between the accuracy of measurement result and the performance of the system.

For more information you can read [3], and you can change the value of HZ.

Recommended specification

CPUPentium 4.2 GHz or greater
Memory512 MByte or greater
HDD10 GByte or greater
NIC100 base-TX Ethernet Card
Kernellinux 2.6.16.21 kernel
DistributionFedoraCore 5

Download now

Please visit here.

Installing ImTCP

In this section, we show an example for installing in your kernel system. When installing ImTCP, some source files are overwritten. So when you modify the files, be careful. If you do not have the original kernel archive (linux-2.6.16.21.tar.gz), you can get the file from http://www.kernel.org/.

  1. # tar xzvf imtcp_linux_2.6.16.21_0.1.1tar.gz
  2. # tar xzvf linux-2.6.16.21.tar.gz
  3. # cp -fr imtcp_linux-2.6.16.21_0.1.1/* linux-2.6.16.21/
  4. # mkdir <$work> (ex. <$work> = ~/work/)
  5. # cp imtcp_linux-2.6.16.21_0.1.1/config_imtcp_0.1.1 <$work>/.config
  6. # cd linux-2.6.16.21/
  7. # make O=<$work> menuconfig
    In menuconfig, set the following options
    1. HZ setting
      Processor type and features --> Timer frequency (default: 20000)
    2. Preemption Model
      Processor type and features --> Preemption Model --> "No Forced Preemption (Server)"
    3. Local Version
      General setup --> Local Version - append to kernel release
    4. ImTCP
      Networking --> Networking options --> TCP: IMTCP [Y]
    5. Congestion control modules
      Networking --> Networking options --> TCP: advanced congestion control [Y]
      Networking --> TCP congestion control --> TCP Biosis [M]
      Networking --> TCP Guarantee [M]
  8. # make O=<$work>
  9. # make O=<$work> modules_install
  10. # make O=<$work> install
  11. # reboot

Parameter settings

settings for ImTCP in sysctl

In this sub-section, we describe parameters of ImTCP. All parameters are set by sysctl, and the list of parameters is as follow.

net.ipv4.imtcp_mode
Measurement mode switch flag (Default:0)
net.ipv4.imtcp_streams
Number of streams per measurement (Default:4)
net.ipv4.imtcp_packets
Number of packets per stream (Default:10)
net.ipv4.imtcp_min_timer
Immediate send timer (Default:0)
net.ipv4.imtcp_measurements
Number of packets starting to send packets (Default:5)
net.ipv4.imtcp_high_pct
Extra parameters for ImTCP (Default:55. used for calculating the available bandwidth)
net.ipv4.imtcp_low_pct
Extra parameters for ImTCP (Default:55. used for calculating the available bandwidth)
net.ipv4.imtcp_high_pdt
Extra parameters for ImTCP (Default:40. used for calculating the available bandwidth)
net.ipv4.imtcp_low_pdt
Extra parameters for ImTCP (Default:40. used for calculating the available bandwidth)

If you want to use ImTCP, set to the imtcp_mode parameter before begining data transmission.

# sysctl net.ipv4.imtcp_mode=1

settings for TCP guarantee in socket option

In this sub-section, we describe parameters of TCP guarantee. All parameters are set by setsockopt() function (in C/C++ language). The list of parameters is as follow.

TCP_GUARANTEE_BW
Name of TCP option for TCP guarantee (Default: 10 [Mbps])
TCP_GUARANTEE_SLOT
Time interval to achieve required throughput (Default: 32 [RTT])

If you use TCP guarantee, add descriptions in your application program as follows (in C/C++ language). If you want to know more information about setsockopt(), see the man page of your system.

int required_tput = 5; //[Mbps]
socklen_t tput_len = sizeof(required_tput);
setsockopt(s, IPPROTO_TCP, TCP_GUARANTEE_BW, (char*)&required_tput, tput_len);