Skip to contentSkip to conversation

BIC TCP for Linux 2.6.6

PATCH In review Stephen Hemminger 2 participants 2 messages May 7, 2004 – May 8, 2004 6 messages not in the archive

Subsystems (5)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 00b601c42638$04ecac20$96330e98@VALUED66329DCC

A message that is not in the archive (sent off-list or not yet received): 01d101c4263a$2a51d060$8c330e98@nanegrc

A message that is not in the archive (sent off-list or not yet received): 20040429153811.56d410e3@dell_ss3.pdx.osdl.net

A message that is not in the archive (sent off-list or not yet received): 003b01c42e52$6e317ef0$20339804@Nannan

A message that is not in the archive (sent off-list or not yet received): 20040505155538.0d414cae@dell_ss3.pdx.osdl.net

A message that is not in the archive (sent off-list or not yet received): 000701c43383$2f6bc1e0$8c330e98@nanegrc

#6 lore raw

PATCH 1/1 BIC TCP for Linux 2.6.6

This is a version of Binary Increase Control (BIC) TCP
developed by NCSU. It is yet another TCP congestion control
algorithm for handling big fat pipes. For normal size congestion windows it behaves the same as existing TCP Reno, but when window is large it uses additive increase to ensure fairness and when window is small it uses binary search increase.

For more details see the BIC TCP web page
http://www.csc.ncsu.edu/faculty/rhee/export/bitcp/

The original code was for web100 (2.4); this version is pretty much the same but targeted for 2.6 with less sysctl parameters and more constants.

I don't have a real high speed long haul network to test, but when running over 1G links with delays, the performance is more stable (ie tests are repeatable) and as fast as existing Reno.

Documentation/networking/ip-sysctl.txt +24 -0
diff -Nru a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
@@ -316,6 +316,30 @@
 	not as aggressive as TCP Reno.
 	Default:0
 
+tcp_bic - BOOLEAN
+	Enable BIC TCP congestion control algorithm.
+	BIC-TCP is a sender-side only change that ensures a linear RTT
+	fairness under large windows while offering both scalability and
+	bounded TCP-friendliness. The protocol combines two schemes
+	called additive increase and binary search increase. When the
+	congestion window is large, additive increase with a large
+	increment ensures linear RTT fairness as well as good
+	scalability. Under small congestion windows, binary search
+	increase provides TCP friendliness.
+	Default: 0
+
+tcp_bic_low_window - INTEGER
+	Sets the threshold window (in packets) where BIC TCP starts to
+	adjust the congestion window. Below this threshold BIC TCP behaves
+	the same as the default TCP Reno. 
+	Default: 14
+
+tcp_bic_fast_convergence - BOOLEAN
+	Forces BIC TCP to more quickly respond to changes in congestion
+	window. Allows two flows sharing the same connection to converge
+	more rapidly.
+	Default: 1
+
 ip_local_port_range - 2 INTEGERS
 	Defines the local port range that is used by TCP and UDP to
 	choose the local port. The first number is the first, the 
include/linux/sysctl.h +3 -0
diff -Nru a/include/linux/sysctl.h b/include/linux/sysctl.h
@@ -332,6 +332,9 @@
 	NET_TCP_VEGAS_ALPHA=99,
 	NET_TCP_VEGAS_BETA=100,
 	NET_TCP_VEGAS_GAMMA=101,
+ 	NET_TCP_BIC=102,
+ 	NET_TCP_BIC_FAST_CONVERGENCE=103,
+	NET_TCP_BIC_LOW_WINDOW=104,
 };
 
 enum {
include/linux/tcp.h +7 -0
diff -Nru a/include/linux/tcp.h b/include/linux/tcp.h
@@ -400,6 +400,13 @@
 		__u32	minRTT;		/* min of RTTs measured within last RTT (in usec) */
 		__u32	baseRTT;	/* the min of all Vegas RTT measurements seen (in usec) */
 	} vegas;
+
+	/* BI TCP Parameters */
+	struct {
+		__u32	cnt;		/* increase cwnd by 1 after this number of ACKs */
+		__u32 	last_max_cwnd;	/* last maximium snd_cwnd */
+		__u32	last_cwnd;	/* the last snd_cwnd */
+	} bictcp;
 };
 
 /* WARNING: don't change the layout of the members in tcp_sock! */
include/net/tcp.h +41 -0

64 lines not on this page · raw message

net/ipv4/sysctl_net_ipv4.c +24 -0
diff -Nru a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
@@ -641,6 +641,30 @@
 		.mode		= 0644,
 		.proc_handler	= &proc_dointvec,
 	},
+	{
+		.ctl_name	= NET_TCP_BIC,
+		.procname	= "tcp_bic",
+		.data		= &sysctl_tcp_bic,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec,
+	},
+	{
+		.ctl_name	= NET_TCP_BIC_FAST_CONVERGENCE,
+		.procname	= "tcp_bic_fast_convergence",
+		.data		= &sysctl_tcp_bic_fast_convergence,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec,
+	},
+	{
+		.ctl_name	= NET_TCP_BIC_LOW_WINDOW,
+		.procname	= "tcp_bic_low_window",
+		.data		= &sysctl_tcp_bic_low_window,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec,
+	},
 	{ .ctl_name = 0 }
 };
 
net/ipv4/tcp_input.c +66 -1

85 lines not on this page · raw message

net/ipv4/tcp_minisocks.c +3 -0
diff -Nru a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
@@ -766,6 +766,9 @@
 		newtp->snd_cwnd = 2;
 		newtp->snd_cwnd_cnt = 0;
 
+		newtp->bictcp.cnt = 0;
+		newtp->bictcp.last_max_cwnd = newtp->bictcp.last_cwnd = 0;
+
 		newtp->frto_counter = 0;
 		newtp->frto_highmark = 0;
 
#7 lore raw
Quoted 2 lines · On Fri, 7 May 2004 16:09:57 -0700 Stephen Hemminger <[email protected]> wrote:

This is a version of Binary Increase Control (BIC) TCP developed by NCSU.

Nice work everyone, I'm applying this.

Stephen, I guess the send buffer auto-tuning bits are next?