netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] cubic: backoff after slow start
@ 2007-08-07 18:37 Stephen Hemminger
  2007-08-08  0:57 ` Injong Rhee
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2007-08-07 18:37 UTC (permalink / raw)
  To: Injong Rhee, Sangtae Ha; +Cc: netdev

CUBIC takes several unnecessary iterations to converge out of slow start. This
is most noticable over a link where the bottleneck queue size is much larger than BDP,
and the sender has to "fill the pipe" in slow start before the first loss. Typical
consumer broadband links seem to have large (up to 2secs) of queue that needs
to get filled before the first loss.

A possible fix is to use a beta of .5 (same as original TCP) when leaving
slow start.  Originally, the Linux version didn't do slow start so it probably
never was observed.

--- a/net/ipv4/tcp_cubic.c	2007-08-02 12:16:22.000000000 +0100
+++ b/net/ipv4/tcp_cubic.c	2007-08-03 15:57:12.000000000 +0100
@@ -289,7 +289,11 @@ static u32 bictcp_recalc_ssthresh(struct
 
 	ca->loss_cwnd = tp->snd_cwnd;
 
-	return max((tp->snd_cwnd * beta) / BICTCP_BETA_SCALE, 2U);
+	/* Initial backoff when leaving slow start */
+	if (tp->snd_ssthresh == 0x7fffffff)
+		return max(tp->snd_cwnd >> 1U, 2U);
+	else
+		return max((tp->snd_cwnd * beta) / BICTCP_BETA_SCALE, 2U);
 }
 
 static u32 bictcp_undo_cwnd(struct sock *sk)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-08  1:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-07 18:37 [RFC] cubic: backoff after slow start Stephen Hemminger
2007-08-08  0:57 ` Injong Rhee

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).