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:
- config_imtcp_0.1.1
- net/ipv4/
- tcp_imtcp.c
- imtcp.c
- tcp_guarantee.c
- tcp_biosis.c
- tcp_input.c
- tcp_output.c
- tcp_ipv4.c
- sysctl_net_ipv4.c
- Kconfig
- Makefile
- include/
- linux/
- tcp_imtcp.h
- imtcp.h
- tcp_guarantee.h
- tcp.h
- sysctl.h
- jiffies.h
- net/
- inet_timewait_sock.h
- arch/i386/kernel/
- smpboot.c
- cpu/
- proc.c
- init/
- calibrate.c
- kernel/
- timer.c
- Kconfig.hz
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
CPU | Pentium 4.2 GHz or greater |
Memory | 512 MByte or greater |
HDD | 10 GByte or greater |
NIC | 100 base-TX Ethernet Card |
Kernel | linux 2.6.16.21 kernel |
Distribution | FedoraCore 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/.
- # tar xzvf imtcp_linux_2.6.16.21_0.1.1tar.gz
- # tar xzvf linux-2.6.16.21.tar.gz
- # cp -fr imtcp_linux-2.6.16.21_0.1.1/* linux-2.6.16.21/
- # mkdir <$work> (ex. <$work> = ~/work/)
- # cp imtcp_linux-2.6.16.21_0.1.1/config_imtcp_0.1.1 <$work>/.config
- # cd linux-2.6.16.21/
- # make O=<$work> menuconfig
In menuconfig, set the following options- HZ setting
Processor type and features --> Timer frequency (default: 20000) - Preemption Model
Processor type and features --> Preemption Model --> "No Forced Preemption (Server)" - Local Version
General setup --> Local Version - append to kernel release - ImTCP
Networking --> Networking options --> TCP: IMTCP [Y] - Congestion control modules
Networking --> Networking options --> TCP: advanced congestion control [Y]
Networking --> TCP congestion control --> TCP Biosis [M]
Networking --> TCP Guarantee [M]
- HZ setting
- # make O=<$work>
- # make O=<$work> modules_install
- # make O=<$work> install
- # 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);