13

I am looking for disable TCP slow start mechanism for high-speed network. Currently clients send 100MB flows to random servers with non-blocking 1Gbps link. In my math, the completion time of the flows is less than 1 second.

But the problem is that they cannot reach to a full link bandwidth. In other words, they are finished at slow start phase before getting a full link bandwidth.
Therefore, I want to increase TCP congestion window size to maximum.

Is there anyone who know how to change that value easily without modification the kernel?

red0ct
  • 4,840
  • 3
  • 17
  • 44
Junho Suh
  • 339
  • 1
  • 2
  • 10
  • More probably what you really want is to increase the socket receive buffer size at the receiver to at least the bandwidth-delay product – user207421 Mar 12 '20 at 07:39

1 Answers1

14

On Linux platforms the SSR setting can be checked and disabled via the following commands:

$> sysctl net.ipv4.tcp_slow_start_after_idle
$> sysctl -w net.ipv4.tcp_slow_start_after_idle=0

Slow start is also used after a connection has been idle, unless this behavior is disabled in

/proc/sys/net/ipv4/tcp_slow_start_after_idle.
a.m.
  • 2,083
  • 1
  • 16
  • 22
  • Can I set congestion window to maximum by like these? "sudo ip route change default via X.X.X.X dev ethN initcwnd 100" and "sudo ip route change default via X.X.X.X dev ethN initrwnd 100" – Junho Suh Jun 10 '13 at 08:22
  • 2
    Yes you can set like these. Please refer to http://www.cdnplanet.com/blog/tune-tcp-initcwnd-for-optimum-performance/ – a.m. Jun 10 '13 at 08:39
  • If you want it to stick (e.g. after reboot), add `net.ipv4.tcp_slow_start_after_idle=0` to /etc/sysctl.conf. – redburn Sep 12 '14 at 10:24
  • 4
    Note for those finding this answer that the question asks about TCP slow start, but this answer is about "slow start restart" which occurs after an existing socket becomes idle. This might confuse some people because this answer does not change the initial congestion window for a new connection which is governed by RFC 5681 §3.1 that requires an initcwnd based on the maximum segment size. What often helps for connections with long RTT is a cwnd resize algorithm that better resizes cwnd such as hybla (controlled with net.ipv4.tcp_congestion_control), and increasing receive buffers. – kgibm Jan 13 '21 at 16:21
  • When I have multiple interfaces, is it possible to disable slow start after idle for specific interface only? I think the feature makes lots of sense for connections over internet but for local connections it should be disabled. – Mikko Rantalainen Jul 01 '22 at 09:52