Skip to contentSkip to conversation

cubic: backoff after slow start

RFC In review Stephen Hemminger 2 participants 2 messages Aug 7, 2007 – Aug 8, 2007

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

RFC 1/1 cubic: backoff after slow start

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.

net/ipv4/tcp_cubic.c +5 -1
@@ -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)
#1 lore raw

Hi Stephen,
We have been working on slow start and we have a nice solution for this. We will send you a patch and test results. Thanks
Injong

----- Original Message ----- From: "Stephen Hemminger" <[email protected]>
To: "Injong Rhee" <[email protected]>; "Sangtae Ha" <[email protected]>
Cc: <[email protected]>
Sent: Tuesday, August 07, 2007 2:37 PM
Subject: [RFC] cubic: backoff after slow start

Quoted 26 lines

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.

net/ipv4/tcp_cubic.c 2007-08-03 15:57:12.000000000 +0100 renamed from net/ipv4/tcp_cubic.c 2007-08-02 12:16:22.000000000 +0100 +5 -1
@@ -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)