Add TCP congestion control variant to Linux Ubuntu

I want to test different variants of TCP in Linux Ubuntu. I have Ubuntu 14.04 LTS with Kernel version 3.14. When I check the available congestion control algorithm using the following command sysctl net.ipv4.tcp_available_congestion_control I get only: cubic and reno. However, I want to test other variants like Hybla, HighSpeed. If I run the menuconfig I can select the variants which I want and compile the Kernel. But in my case, I already have the kernel compiled so is it possible to have some Linux package which contains TCP variants as loadable kernel modules?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Have a look here to see what modules you have installed…

ls -la /lib/modules/$(uname -r)/kernel/net/ipv4

You should get a list of modules, I got this.

tcp_bic.ko
tcp_diag.ko
tcp_highspeed.ko
tcp_htcp.ko
tcp_hybla.ko
tcp_illinois.ko
tcp_lp.ko
tcp_scalable.ko
tcp_vegas.ko
tcp_veno.ko
tcp_westwood.ko

You can see what your kernel has configured by greping your config file for TCP_CONG ie

grep TCP_CONG /boot/config-$(uname -r)
CONFIG_TCP_CONG_ADVANCED=y
CONFIG_TCP_CONG_BIC=m
CONFIG_TCP_CONG_CUBIC=y
CONFIG_TCP_CONG_WESTWOOD=m
CONFIG_TCP_CONG_HTCP=m
CONFIG_TCP_CONG_HSTCP=m
CONFIG_TCP_CONG_HYBLA=m
CONFIG_TCP_CONG_VEGAS=m
CONFIG_TCP_CONG_SCALABLE=m
CONFIG_TCP_CONG_LP=m
CONFIG_TCP_CONG_VENO=m
CONFIG_TCP_CONG_YEAH=m
CONFIG_TCP_CONG_ILLINOIS=m
CONFIG_DEFAULT_TCP_CONG="cubic"

To try one of these you need to install it using modprobe -a tcp_westwood or whatever you want. You can then test it using this

echo "westwood" > /proc/sys/net/ipv4/tcp_congestion_control

Method 2

tcp_hybla and tcp_highspeed both are added to kernel tree as module. So, you can separately compile,install those modules and can use them. Hope you are already aware of how to compile a custom module.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x