Linux – Increasing tcp slow start Initial Window in linux 3.0 kernel

linuxtcptcp-slow-start

I was checking the IW for my site and realized that its 4.

[user~]$ sudo tcpdump -n -i any 'tcp[tcpflags] & (tcp-syn|tcp-ack) == tcp-syn and port 80'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes
10:13:20.971391 IP 175.x.x.x > 17.x.x.x.http: Flags [S], seq 3929903562, win 5840, options [mss 1460,sackOK,TS val 1701657127 ecr 0,nop,wscale 6], length 0

I run

[user~]$ uname -r
3.0.4x86_64-linode21

How can I increase the Initial Window?

Do you recommend recompiling to new kernel? (Don’t want to do) or is there another way?

An nginx HTTP cached hit takes

[site ~]$ time curl www.site.com/ >/dev/null
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6440    0  6440    0     0  26002      0 --:--:-- --:--:-- --:--:-- 39753

real    0m0.268s
user    0m0.004s
sys     0m0.012s

at least .3 sec.

Best Answer

This was thoroughly discussed in a Hacker News entry recently, and the proces involves using the "ip route change" command with some specific parameters. There is more help on the first comment of the discussion, and I would suggest you to take a look there to try that solution and see if it works.

Your kernel is pretty recent, so the initrwnd parameter that establishes the slow-start setting seems to be 10 by default... so your's being 4 is a little strange. Anyway, just test it and let us know if you noticed any improvements!