Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to change the behavior of the tcp slow start protocol on a CentOS5 box (uname -r => 2.6.18-238.12.1.el5). I have read that the following command will change my icwnd to 8:

ip route change default via 1.2.3.4 dev eth1 initcwnd 8
echo "4094 $((8*16384)) 4194304" > /proc/sys/net/ipv4/tcp_wmem

(Note: The tcp_wmem portion is more or less a guess on my part, I figure the exact number isn't very important as long as it's large enough)

However, on it's own this doesn't seem to have any effect. Instead of initially sending 8 segments it still only sends 3. After further reading I found that tcp slow start works in parallel with congestion control, such that if ssthresh < cwnd, the congestion control protocol is used, otherwise slow start is used (at least, this was my understanding). I did the following to find out what my default ssthresh was set to:

[root@host ~]# cat /proc/sys/net/ipv4/tcp_congestion_control 
bic
[root@host ~]# cat /sys/module/tcp_bic/parameters/initial_ssthresh 
0

Seeing that ssthresh is 0, I would want to increase it so that it will be greater than icwnd, which in turn would cause the kernel to use slow start, which would use it's default value of 8 windows. So I did the following:

[root@host ~]# echo 13140 > /sys/module/tcp_bic/parameters/initial_ssthresh

But there is still no change at all in behavior. Does anyone know what I'm doing wrong?

(I am restarting the apache process I'm using to test this after each change). EDIT: I am also doing ip route flush cache in between changes as well

share|improve this question

2 Answers 2

You'll have to upgrade to centos6.2.

According rhel doc:

TCP initial congestion window default

In Red Hat Enterprise Linux 6.2, the TCP initial congestion window default is now set to 10, according to RFC 5681. Additionally, the initial-window code common to TCP and CCID-2 has been consolidated.

share|improve this answer

I was reading a little bit on the subject and I believe that kernel version 2.6.33 is needed in order to set a custom cwnd. I found it mentioned in this blog post: http://www.igvita.com/2011/10/20/faster-web-vs-tcp-slow-start/

If TCP slow start is, well, slow, then couldn't we just make it faster? Turns out, until very recently the Linux TCP stack itself was hardcoded to start with the congestion window (cwnd) of just 3 or 4 packets, which amounts to about 4kb (~1360 bytes per packet).

There is also some discussion about it being added to the kernel here: http://kerneltrap.org/mailarchive/linux-netdev/2009/10/26/6258693

I cannot find any good information on setting this up, but this is what I came across today...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.