* tcp_slow_start_after_idle
@ 2006-06-14 5:35 David Miller
2006-06-14 16:46 ` tcp_slow_start_after_idle Rick Jones
2006-06-14 17:09 ` tcp_slow_start_after_idle Zach Brown
0 siblings, 2 replies; 5+ messages in thread
From: David Miller @ 2006-06-14 5:35 UTC (permalink / raw)
To: netdev; +Cc: zach.brown, jheffner
Bringing back up this old topic:
http://marc.theaimsgroup.com/?l=linux-netdev&m=114564962420171&w=2
I've decided to add this tunable to the net-2.6.18 tree, patch below.
The more I think about it, allowing it to be turned off is
reasonable, but it will be left on by default.
diff-tree 1cd14da556199b2827a92f1eaa9d3e8411c2b68d (from 2fa95182e211572e998c7d1f906aa74fb119b025)
Author: David S. Miller <davem@sunset.davemloft.net>
Date: Tue Jun 13 22:33:04 2006 -0700
[TCP]: Add tcp_slow_start_after_idle sysctl.
A lot of people have asked for a way to disable tcp_cwnd_restart(),
and it seems reasonable to add a sysctl to do that.
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index f12007b..d46338a 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -362,6 +362,13 @@ tcp_workaround_signed_windows - BOOLEAN
not receive a window scaling option from them.
Default: 0
+tcp_slow_start_after_idle - BOOLEAN
+ If set, provide RFC2861 behavior and time out the congestion
+ window after an idle period. An idle period is defined at
+ the current RTO. If unset, the congestion window will not
+ be timed out after an idle period.
+ Default: 1
+
IP Variables:
ip_local_port_range - 2 INTEGERS
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 98338ed..cee944d 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -405,6 +405,7 @@ enum
NET_TCP_BASE_MSS=114,
NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS=115,
NET_TCP_DMA_COPYBREAK=116,
+ NET_TCP_SLOW_START_AFTER_IDLE=117,
};
enum {
diff --git a/include/net/tcp.h b/include/net/tcp.h
index de88c54..bfc71f9 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -227,6 +227,7 @@ extern int sysctl_tcp_abc;
extern int sysctl_tcp_mtu_probing;
extern int sysctl_tcp_base_mss;
extern int sysctl_tcp_workaround_signed_windows;
+extern int sysctl_tcp_slow_start_after_idle;
extern atomic_t tcp_memory_allocated;
extern atomic_t tcp_sockets_allocated;
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index e7fb665..ce4cd5f 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -690,6 +690,14 @@ ctl_table ipv4_table[] = {
.proc_handler = &proc_dointvec
},
#endif
+ {
+ .ctl_name = NET_TCP_SLOW_START_AFTER_IDLE,
+ .procname = "tcp_slow_start_after_idle",
+ .data = &sysctl_tcp_slow_start_after_idle,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec
+ },
{ .ctl_name = 0 }
};
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 743016b..be6d929 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -59,6 +59,9 @@ int sysctl_tcp_tso_win_divisor = 3;
int sysctl_tcp_mtu_probing = 0;
int sysctl_tcp_base_mss = 512;
+/* By default, RFC2861 behavior. */
+int sysctl_tcp_slow_start_after_idle = 1;
+
static void update_send_head(struct sock *sk, struct tcp_sock *tp,
struct sk_buff *skb)
{
@@ -138,7 +141,8 @@ static void tcp_event_data_sent(struct t
struct inet_connection_sock *icsk = inet_csk(sk);
const u32 now = tcp_time_stamp;
- if (!tp->packets_out && (s32)(now - tp->lsndtime) > icsk->icsk_rto)
+ if (sysctl_tcp_slow_start_after_idle &&
+ (!tp->packets_out && (s32)(now - tp->lsndtime) > icsk->icsk_rto))
tcp_cwnd_restart(sk, __sk_dst_get(sk));
tp->lsndtime = now;
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: tcp_slow_start_after_idle
2006-06-14 5:35 tcp_slow_start_after_idle David Miller
@ 2006-06-14 16:46 ` Rick Jones
2006-06-14 23:06 ` tcp_slow_start_after_idle David Miller
2006-06-14 17:09 ` tcp_slow_start_after_idle Zach Brown
1 sibling, 1 reply; 5+ messages in thread
From: Rick Jones @ 2006-06-14 16:46 UTC (permalink / raw)
To: David Miller; +Cc: netdev, zach.brown, jheffner
> +tcp_slow_start_after_idle - BOOLEAN
> + If set, provide RFC2861 behavior and time out the congestion
> + window after an idle period. An idle period is defined at
> + the current RTO. If unset, the congestion window will not
> + be timed out after an idle period.
> + Default: 1
Did you mean "defined as" rather than "defined at?"
Also, does the congestion window "time out" or does it decay?
Perhaps:
tcp_slow_start_after_idle - BOOLEAN
If set, provide RFC2861 behavior and decay the congestion
window after the connection has been idle for the connection's
current RTO. If unset, the congestion window will not decay
when the connection has been idle.
Default: 1
> diff --git a/include/net/tcp.h b/include/net/tcp.h
> index de88c54..bfc71f9 100644
> --- a/include/net/tcp.h
> +++ b/include/net/tcp.h
> @@ -227,6 +227,7 @@ extern int sysctl_tcp_abc;
> extern int sysctl_tcp_mtu_probing;
> extern int sysctl_tcp_base_mss;
> extern int sysctl_tcp_workaround_signed_windows;
> +extern int sysctl_tcp_slow_start_after_idle;
> diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
> index 743016b..be6d929 100644
> --- a/net/ipv4/tcp_output.c
> +++ b/net/ipv4/tcp_output.c
> @@ -59,6 +59,9 @@ int sysctl_tcp_tso_win_divisor = 3;
> int sysctl_tcp_mtu_probing = 0;
> int sysctl_tcp_base_mss = 512;
>
> +/* By default, RFC2861 behavior. */
> +int sysctl_tcp_slow_start_after_idle = 1;
> +
Is this a candidate for "readmostly?"
rick jones
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: tcp_slow_start_after_idle
2006-06-14 5:35 tcp_slow_start_after_idle David Miller
2006-06-14 16:46 ` tcp_slow_start_after_idle Rick Jones
@ 2006-06-14 17:09 ` Zach Brown
2006-06-14 22:30 ` tcp_slow_start_after_idle David Miller
1 sibling, 1 reply; 5+ messages in thread
From: Zach Brown @ 2006-06-14 17:09 UTC (permalink / raw)
To: David Miller; +Cc: netdev, jheffner
David Miller wrote:
> Bringing back up this old topic:
>
> http://marc.theaimsgroup.com/?l=linux-netdev&m=114564962420171&w=2
>
> I've decided to add this tunable to the net-2.6.18 tree, patch below.
Nice, thanks for the heads-up. I'll pass the notice on to the guys who
were asking about this in that thread.
- z
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: tcp_slow_start_after_idle
2006-06-14 17:09 ` tcp_slow_start_after_idle Zach Brown
@ 2006-06-14 22:30 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2006-06-14 22:30 UTC (permalink / raw)
To: zach.brown; +Cc: netdev, jheffner
From: Zach Brown <zach.brown@oracle.com>
Date: Wed, 14 Jun 2006 10:09:52 -0700
> Nice, thanks for the heads-up. I'll pass the notice on to the guys who
> were asking about this in that thread.
Which Wall Street brokerage firm was it? :-)
That's basically who wants this stuff, people doing financial
transactions. They seem to open up a connection, and just blast out
data periodically (with frequency > RTO, which is the whole problem)
and they want good latency results from that.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: tcp_slow_start_after_idle
2006-06-14 16:46 ` tcp_slow_start_after_idle Rick Jones
@ 2006-06-14 23:06 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2006-06-14 23:06 UTC (permalink / raw)
To: rick.jones2; +Cc: netdev, zach.brown, jheffner
From: Rick Jones <rick.jones2@hp.com>
Date: Wed, 14 Jun 2006 09:46:58 -0700
> Also, does the congestion window "time out" or does it decay?
The modification made to the cwnd is indeed a decay function,
but the event is a time out, and it is also termed a restart
in other writings and contexts.
I think it's all the same. :)
> > +/* By default, RFC2861 behavior. */
> > +int sysctl_tcp_slow_start_after_idle = 1;
> > +
>
> Is this a candidate for "readmostly?"
All the networking sysctls are, we should do a sweep over them at some
point.
Thanks for reminding me.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-06-14 23:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-14 5:35 tcp_slow_start_after_idle David Miller
2006-06-14 16:46 ` tcp_slow_start_after_idle Rick Jones
2006-06-14 23:06 ` tcp_slow_start_after_idle David Miller
2006-06-14 17:09 ` tcp_slow_start_after_idle Zach Brown
2006-06-14 22:30 ` tcp_slow_start_after_idle David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).