Is there a way I can run a different (than the default) TCP congestion control algorithm in FreeBSD? I am trying to modify an existing TCP congestion control algorithm with some ideas published in research papers to try to get better performance over Wireless networks.

2 Answers 2


You can see which TCP congestion control algorithms are available by looking at the net.inet.tcp.cc.available sysctl. By default, only newreno is available, so it is the one that is used. There are several different algorithms available, look for modules named cc_something in /boot/kernel.

You can load them via kldload, such as kldload cc_vegas. After you do that, the new algorithm will show up in net.inet.tcp.cc.available. You can select it via the net.inet.tcp.cc.algorithm sysctl.

Here's a complete example:

% sysctl -a | grep net.inet.tcp.cc
net.inet.tcp.cc.available: newreno
net.inet.tcp.cc.algorithm: newreno
% sudo kldload cc_vegas
% sysctl -a | grep net.inet.tcp.cc
net.inet.tcp.cc.vegas.beta: 3
net.inet.tcp.cc.vegas.alpha: 1
net.inet.tcp.cc.available: newreno, vegas
net.inet.tcp.cc.algorithm: newreno
% sudo sysctl net.inet.tcp.cc.algorithm=vegas
net.inet.tcp.cc.algorithm: newreno -> vegas
% sudo sysctl net.inet.tcp.cc.algorithm=newreno
net.inet.tcp.cc.algorithm: vegas -> newreno
  • 1
    First of all, thank you for your answer @Steve-Willis, this already helps me a lot! Before I mark your answer as solution, I would like to ask one more question - How would I go about editing the Congestion Control algorithm? Would I just edit the cc_vegas file (for example), or is there something else I must do, to create and enable my modified Congestion Control algorithm? Thank you in advance!
    – KarlisL
    Commented Apr 17, 2015 at 4:19
  • 1
    You could edit cc_vegas.c in the kernel source and rebuild, but it would be cleaner to copy it with a new name, just to avoid confusion. Commented Apr 17, 2015 at 5:22
  • 1
    Thank you very much!!! Just to clarify and make sure I understood you correctly - should I try to edit (to try to improve it) a cc algorithm, I would just copy the file, rename it (for example cc_vegas_modified.c), make the changes and rebuild it. Then I would run the new cc algorithm with the command you stated in your answer and it would run (given that I have written a working code)?
    – KarlisL
    Commented Apr 17, 2015 at 8:25

So far as research, there's a couple of projects managed at the Centre for Advanced Internet Architectures (CAIA) at the University of Swinburne. They've been focusing at least partly about delay-based algorithms in FreeBSD[newtcp]. Together with the support of the FreeBSD foundation, the newtcp project's work has been integrated with FreeBSD 9.0 and subsequent releases.

In broader UNIX applications, personally I've seen some success with Westwood+ TCP congestion control, on Linux. Westwood may be particularly useful in wireless applications [Casetti2002]. I've also found a nice article about one TCP-FIT [Wang2011]

Personally, I'm relatively new to the FreeBSD platform. I would estimate that for any immediate applications in wireless networking, CAIA's work in delay-based TCP congestion control might be of some particular interest.

Endeavoring to extend of Steve Wills' response, in addition to there being the present availability of TCP congestion control algorithms in any single installation of a FreeBSD kernel, the FreeBSD Handbook includes instructions about rebuilding the FreeBSD kernel. [Handbook Ch 9.]

Conjecturally, with a build environment using Pourdriere for package build automation, and a LAN networks' PXE/Netboot services (BootP, DHCP, etc), it may be possible to build a relatively comfortable benchmarking environment for applications of the available TCP congestion control algorithms, on differing platforms and in differing network configurations. Furthermore, conjecturally, perhaps there may be some existing work as towards simulating radio channel noise and other wireless channel interference, as towards estimating system performance under real-world configurations. Personally, I'm afraid that the University I'm attending online does not have a lab quite equipped for this manner of research, but I'm certain that it must be possible somewhere in academia.

Here is the short bibliography:

These articles may be available directly from their respective publishers, and may be available in pre-print editions from the respective granting institutions.

  • 2
    Welcome to U&L. I edited your post, updated the links, I hope to your liking. If not you can always roll the changes back. If you keep adding answers like these, you will soon have no real restrictions on what to post here. (Couldn't get the URLs only to apply to the text between [] because the latter is used as markdown by the system as well)
    – Anthon
    Commented Jun 11, 2015 at 15:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .