1

We all know that TCP's congestion control uses additive (linear) increase and multiplicative decrease when adjusting sliding window size. Is there a way to change it to "linear decrease"?

When a packet is lost, TCP assumes the link is congested, so it cuts the size of the sliding window in half. I want to change this behaviour by making it decrease the sliding window by 1 MSS (maximum segment size).

I don't know if it's possible in closed-source operating systems like OS X or Windows, but this should be possible in open-source ones, since it's not an option which can be toggled, I guess I have to change the source code of TCP implementation in the OS.

Solutions for OS X are preferred, but Linux (Ubuntu) is ok too.

1 Answer 1

1

I do not know a lot about the Mac, but... inspection of the output of

   sysctl -a | grep net.inet.tcp

showed that it is aware of the existence of congestion-control algorithms:

   net.inet.tcp.rfc1323: 1

clearly enables implementation of RFC1323, the IEEE directive about improvements to TCP. However, there is no field relating to the choice of CCA, which in turn suggests LEDBAT is the only available choice.

Within Linux, instead, the available congestion control algorithms, are stored here:

 $ ls /lib/modules/`uname -r`/kernel/net/ipv4/
   ah4.ko        ip_gre.ko     tcp_bic.ko        tcp_illinois.ko  tcp_veno.ko      xfrm4_mode_beet.ko
   esp4.ko       ipip.ko       tcp_diag.ko       tcp_lp.ko        tcp_westwood.ko  xfrm4_mode_transport.ko
   gre.ko        ip_tunnel.ko  tcp_highspeed.ko  tcp_probe.ko     tcp_yeah.ko      xfrm4_mode_tunnel.ko
   inet_diag.ko  ip_vti.ko     tcp_htcp.ko       tcp_scalable.ko  tunnel4.ko       xfrm4_tunnel.ko
   ipcomp.ko     netfilter     tcp_hybla.ko      tcp_vegas.ko     udp_diag.ko

To use one, you just modprobe the relevant module and modify /proc/sys as follows:

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

Wikipedia has a nice, crystal-clear, informative page on congestion-control algorithms. In particular, Linux's default CCA,

  # sysctl -a | grep net.ipv4 | grep congestion
  net.ipv4.tcp_allowed_congestion_control = cubic reno
  net.ipv4.tcp_available_congestion_control = cubic reno
  net.ipv4.tcp_congestion_control = cubic

TCP-Cubic, is well-described here.

In regard to your question, it is stated that:

[CUBIC] ... is a less aggressive and more systematic derivative of BIC TCP, in which the window is a cubic function of time since the last congestion event, with the inflection point set to the window prior to the event.

An inflection point is where a curves changes curvature sign, i.e. it goes from concave to convex, or viceversa. This means that, close to this point, the curve is nearly exactly linear, the first correction term vanishing as described above.

Thus, it is not true that

TCP's congestion control uses ... multiplicative decrease when adjusting sliding window size

This depends on the CCA. Also, the standard one in Linux, TCP-Cubic, is effectively linear close to the last congestion event.

You must log in to answer this question.

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