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