Re: tcp bw in 2.6

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Wayne Scott <wscott@...>
Cc: <lm@...>, <jheffner@...>, <herbert@...>, <davem@...>, <netdev@...>
Date: Tuesday, October 2, 2007 - 5:56 pm

On Tue, 2 Oct 2007, Wayne Scott wrote:

That sounds wrong. Larry claims the slow case is when the side that did 
"accept()" does the sending, the above has the listener just reading.


This one is guaranteed wrong too, since you have the listener reading 
(fine), but the sener now doesn't go over the network at all, but sends to 
itself.

That said, let's assume that only your description was bogus, the TCP 
dumps themselves are ok. 

I find the window scaling differences interesting. This is the opening of 
the fast sequence from the receiver:

	13:35:13.929349 IP 10.3.1.1.ddi-tcp-1 > 10.3.1.10.58415: S 2592471184:2592471184(0) ack 3363219397 win 5792 <mss 1460,sackOK,timestamp 174966955 3714830794,nop,wscale 7>
	13:35:13.929702 IP 10.3.1.1.ddi-tcp-1 > 10.3.1.10.58415: . ack 1449 win 68 <nop,nop,timestamp 174966955 3714830795>
	13:35:13.929712 IP 10.3.1.1.ddi-tcp-1 > 10.3.1.10.58415: . ack 2897 win 91 <nop,nop,timestamp 174966955 3714830795>
	13:35:13.929724 IP 10.3.1.1.ddi-tcp-1 > 10.3.1.10.58415: . ack 4345 win 114 <nop,nop,timestamp 174966955 3714830795>
	13:35:13.929941 IP 10.3.1.1.ddi-tcp-1 > 10.3.1.10.58415: . ack 5793 win 136 <nop,nop,timestamp 174966955 3714830795>
	13:35:13.929951 IP 10.3.1.1.ddi-tcp-1 > 10.3.1.10.58415: . ack 7241 win 159 <nop,nop,timestamp 174966955 3714830795>
	13:35:13.929960 IP 10.3.1.1.ddi-tcp-1 > 10.3.1.10.58415: . ack 8689 win 181 <nop,nop,timestamp 174966955 3714830795>
	13:35:13.929970 IP 10.3.1.1.ddi-tcp-1 > 10.3.1.10.58415: . ack 10137 win 204 <nop,nop,timestamp 174966955 3714830795>
	13:35:13.929981 IP 10.3.1.1.ddi-tcp-1 > 10.3.1.10.58415: . ack 11585 win 227 <nop,nop,timestamp 174966955 3714830795>
	13:35:13.929992 IP 10.3.1.1.ddi-tcp-1 > 10.3.1.10.58415: . ack 13033 win 249 <nop,nop,timestamp 174966955 3714830795>
	13:35:13.930331 IP 10.3.1.1.ddi-tcp-1 > 10.3.1.10.58415: . ack 14481 win 272 <nop,nop,timestamp 174966955 3714830795>
	 ...

ie we use a window scale of 7, and we started with a window of 5792 bytes, 
and after ten packets it has grown to 272<<7 (34816) bytes.

The slow case is 

	13:34:16.761034 IP 10.3.1.10.ddi-tcp-1 > 10.3.1.1.49864: S 3299922549:3299922549(0) ack 2548837296 win 5792 <mss 1460,sackOK,timestamp 3714772254 174952667,nop,wscale 2>
	13:34:16.761533 IP 10.3.1.10.ddi-tcp-1 > 10.3.1.1.49864: . ack 1449 win 2172 <nop,nop,timestamp 3714772255 174952667>
	13:34:16.761553 IP 10.3.1.10.ddi-tcp-1 > 10.3.1.1.49864: . ack 2897 win 2896 <nop,nop,timestamp 3714772255 174952667>
	13:34:16.761782 IP 10.3.1.10.ddi-tcp-1 > 10.3.1.1.49864: . ack 4345 win 3620 <nop,nop,timestamp 3714772255 174952667>
	13:34:16.761908 IP 10.3.1.10.ddi-tcp-1 > 10.3.1.1.49864: . ack 5793 win 4344 <nop,nop,timestamp 3714772255 174952667>
	13:34:16.761916 IP 10.3.1.10.ddi-tcp-1 > 10.3.1.1.49864: . ack 7241 win 5068 <nop,nop,timestamp 3714772255 174952667>
	13:34:16.762157 IP 10.3.1.10.ddi-tcp-1 > 10.3.1.1.49864: . ack 8689 win 5792 <nop,nop,timestamp 3714772255 174952667>
	13:34:16.762164 IP 10.3.1.10.ddi-tcp-1 > 10.3.1.1.49864: . ack 10137 win 6516 <nop,nop,timestamp 3714772255 174952667>
	13:34:16.762283 IP 10.3.1.10.ddi-tcp-1 > 10.3.1.1.49864: . ack 11585 win 7240 <nop,nop,timestamp 3714772256 174952667>
	13:34:16.762290 IP 10.3.1.10.ddi-tcp-1 > 10.3.1.1.49864: . ack 13033 win 7964 <nop,nop,timestamp 3714772256 174952667>
	13:34:16.762303 IP 10.3.1.10.ddi-tcp-1 > 10.3.1.1.49864: . ack 14481 win 8688 <nop,nop,timestamp 3714772256 174952667>
	...

so after the same ten packets, it too has grown to about the same 
size (8688<<2 = 34752 bytes). 

But the slow case has a smaller window scale, and it actually stops 
opening the window at that point: the window stays at 8688<<2 for a long 
time (and eventually grows to 9412<<2 and then 16652<<2 in the steady 
case, and is basically limited at that 66kB window size).

But the fast one that had a window scale of 7 can keep growing, and will 
do so quite aggressively. It grows the window to (1442<<7 = 180kB) in the 
first fifty packets.

But in your dump, it doesn't seem to be about who is listening and who is 
connecting. It seems to be about the fact that your machine 10.3.1.10 uses 
a window scale of 2, while 10.3.1.1 uses a scale of 7.

			Linus
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: tcp bw in 2.6, Larry McVoy, (Mon Oct 1, 8:59 pm)
Re: tcp bw in 2.6, Herbert Xu, (Tue Oct 2, 6:52 am)
Re: tcp bw in 2.6, Larry McVoy, (Tue Oct 2, 11:09 am)
Re: tcp bw in 2.6, Linus Torvalds, (Tue Oct 2, 3:27 pm)
Re: tcp bw in 2.6, Rick Jones, (Tue Oct 2, 3:53 pm)
Re: tcp bw in 2.6, David Miller, (Tue Oct 2, 4:33 pm)
Re: tcp bw in 2.6, Roland Dreier, (Tue Oct 2, 4:44 pm)
Re: tcp bw in 2.6, Larry McVoy, (Tue Oct 2, 5:21 pm)
Re: tcp bw in 2.6, Pekka Pietikainen, (Wed Oct 3, 5:13 pm)
Re: tcp bw in 2.6, Larry McVoy, (Wed Oct 3, 5:23 pm)
Re: tcp bw in 2.6, Pekka Pietikainen, (Wed Oct 3, 5:50 pm)
Re: tcp bw in 2.6, John Heffner, (Tue Oct 2, 2:29 pm)
Re: tcp bw in 2.6, Larry McVoy, (Tue Oct 2, 3:07 pm)
Re: tcp bw in 2.6, Linus Torvalds, (Tue Oct 2, 3:29 pm)
Re: tcp bw in 2.6, David Miller, (Tue Oct 2, 4:31 pm)
Re: tcp bw in 2.6, Larry McVoy, (Tue Oct 2, 3:33 pm)
Re: tcp bw in 2.6, John Heffner, (Tue Oct 2, 3:53 pm)
Re: tcp bw in 2.6, Larry McVoy, (Tue Oct 2, 4:14 pm)
Re: tcp bw in 2.6, Rick Jones, (Tue Oct 2, 4:40 pm)
Re: tcp bw in 2.6, Wayne Scott, (Tue Oct 2, 4:42 pm)
Re: tcp bw in 2.6, Linus Torvalds, (Tue Oct 2, 5:56 pm)
Re: tcp bw in 2.6, Larry McVoy, (Tue Oct 2, 11:41 am)
Re: tcp bw in 2.6, Linus Torvalds, (Tue Oct 2, 12:34 pm)
Re: tcp bw in 2.6, Larry McVoy, (Tue Oct 2, 12:48 pm)
Re: tcp bw in 2.6, David Miller, (Tue Oct 2, 5:16 pm)
Re: tcp bw in 2.6, Larry McVoy, (Tue Oct 2, 5:26 pm)
Re: tcp bw in 2.6, David Miller, (Tue Oct 2, 5:47 pm)
Re: tcp bw in 2.6, Rick Jones, (Tue Oct 2, 6:17 pm)
Re: tcp bw in 2.6, David Miller, (Tue Oct 2, 6:32 pm)
Re: tcp bw in 2.6, Larry McVoy, (Tue Oct 2, 6:36 pm)
Re: tcp bw in 2.6, Rick Jones, (Tue Oct 2, 6:59 pm)
Re: tcp bw in 2.6, David Miller, (Wed Oct 3, 4:02 am)
Re: tcp bw in 2.6, Ben Greear, (Tue Oct 2, 12:48 pm)
Re: tcp bw in 2.6, Larry McVoy, (Tue Oct 2, 1:11 pm)
Re: tcp bw in 2.6, Ben Greear, (Tue Oct 2, 1:18 pm)
Re: tcp bw in 2.6, Larry McVoy, (Tue Oct 2, 1:21 pm)
Re: tcp bw in 2.6, Stephen Hemminger, (Tue Oct 2, 1:54 pm)
Re: tcp bw in 2.6, Larry McVoy, (Tue Oct 2, 2:35 pm)
Re: tcp bw in 2.6, Larry McVoy, (Tue Oct 2, 12:25 pm)
Re: tcp bw in 2.6, Stephen Hemminger, (Tue Oct 2, 12:47 pm)
Re: tcp bw in 2.6, Daniel Schaffrath, (Mon Oct 15, 8:40 am)
Re: tcp bw in 2.6, Stephen Hemminger, (Mon Oct 15, 11:49 am)
Re: tcp bw in 2.6, Larry McVoy, (Tue Oct 2, 12:49 pm)
Re: tcp bw in 2.6, Stephen Hemminger, (Tue Oct 2, 1:10 pm)
Re: tcp bw in 2.6, Linus Torvalds, (Mon Oct 1, 10:14 pm)
Re: tcp bw in 2.6, Larry McVoy, (Mon Oct 1, 10:20 pm)
Re: tcp bw in 2.6, Rick Jones, (Tue Oct 2, 1:14 pm)
Re: tcp bw in 2.6, Bill Fink, (Wed Oct 3, 3:19 am)
Re: tcp bw in 2.6, Larry McVoy, (Tue Oct 2, 1:20 pm)
Re: tcp bw in 2.6, Rick Jones, (Tue Oct 2, 2:01 pm)
Re: tcp bw in 2.6, Larry McVoy, (Tue Oct 2, 2:40 pm)
Re: tcp bw in 2.6, Rick Jones, (Tue Oct 2, 3:47 pm)
Re: tcp bw in 2.6, David Miller, (Tue Oct 2, 5:32 pm)
Re: tcp bw in 2.6, John Heffner, (Tue Oct 2, 11:06 am)
Re: tcp bw in 2.6, David Miller, (Mon Oct 1, 11:50 pm)
Re: tcp bw in 2.6, Larry McVoy, (Tue Oct 2, 12:23 am)