Installing BIC or CUBIC Linux Kernel
Step 1: Download Kernel and Patches
- Download Linux Kernel 2.6.13 to /usr/src [Download
Now]
- Download the SACK Fast-Path Patch for Linux 2.6.13 to /usr/src [Download
Now]
- Download the BIC or CUBIC Patch for Linux 2.6.13 to /usr/src
Now]
Step 2: Unpack and Patch Kernel
- "cd /usr/src"
- "tar vxfz linux-2.6.13.tar.gz"
- "cd linux-2.6.13"
- "patch -p1 < ../sack-fastpath-kernel-2.6.13.patch"
- Patch the Congestion Control algorithm (BIC, CUBIC), You can install either of protocols (BIC, CUBIC) or both of them
- BIC: "patch -p1 < ../bic-kernel-2.6.13.patch"
- CUBIC: "patch -p1 < ../cubic-kernel-2.6.13.patch"
- BIC & CUBIC: "patch -p1 < ../bic-kernel-2.6.13.patch; patch -p1 < ../cubic-kernel-2.6.13.patch"
- "make mrproper"
- "make clean"
Step 3: Configure Kernel
-
"make menuconfig" to configure Kernel based on your machine hardware.
For more information on Kernel configuration, visit TLDP
and LinuxFocus.
- Code maturity level options
- [*] Prompt for development and/or incomplete code/drivers
- Processor type and features
- [*] Symmetric multi-processing support (Select for SMPs only)
- Networking options
- [*] TCP: advanced congestion control (NEW)
- TCP congestion control
- [*] Binary Increase Congestion (BIC) control (NEW)
- [*] CUBIC (BIC 2.0) (NEW)
- For Intel e1000 NIC Users: Turn on NAPI option
- Network Device Support
- Ethernet (1000 Mbit)
- Intel(R) PRO/1000 Gigabit Ethernet support
- Use Rx Polling (NAPI)
Step 4: Compile and Install Kernel
- "make"
- "make modules_install"
- grub.conf users: edit file /boot/grub/grub.conf, change the line with
"default" to "default=0". lilo.conf users: read LinuxFocus
for instructions
- "shutdown -r now"
Step 5: Set Kernel Parameters for GigaBit WAN
-
sysctl -w net.core.rmem_max=107374182
-
sysctl -w net.core.wmem_max=107374182
-
sysctl -w net.core.rmem_default=107374182
-
sysctl -w net.core.wmem_default=107374182
-
sysctl -w net.core.optmem_max=107374182
-
sysctl -w net.ipv4.tcp_rmem="107374182 107374182 107374182"
-
sysctl -w net.ipv4.tcp_wmem="107374182 107374182 107374182"
-
sysctl -w net.ipv4.tcp_mem="107374182 107374182 107374182"
-
sysctl -w net.core.netdev_max_backlog=1000
-
ifconfig eth0 txqueuelen 1000
-
sysctl -w net.ipv4.route.flush=1
-
sysctl -w net.ipv4.tcp_no_metrics_save=1
-
/usr/sbin/ethtool -K eth0 tso off
-
For Intel e1000 NIC Users: Add "options e1000 RxDescriptors=4096" into /etc/modules.conf
Step 6: Enable BIC or CUBIC on the fly
-
Enable BIC as a default tcp congestion control: sysctl -w net.ipv4.tcp_congestion_control=bic
-
Enable CUBIC as a default tcp congestion control: sysctl -w net.ipv4.tcp_congestion_control=cubic
If you have any questions, please send email to sha2@ncsu.edu or rhee@ncsu.edu.