Re: Possible BUG in IPv4 TCP window handling, all recent 2.4.x/2.6.x kernels

2005-09-02 Thread Ion Badulescu
Hi Alexey, On Sat, 3 Sep 2005, Alexey Kuznetsov wrote: Well, take a look at the double acks for 84439343, 84440447 and 84441059, they seem pretty much identical to me. It is just a little tcpdump glitch. 19:34:54.532271 < 10.2.20.246.33060 > 65.171.224.182.8700: . 44:44(0) ack 84439343 win

Re: Possible BUG in IPv4 TCP window handling, all recent 2.4.x/2.6.x kernels

2005-09-02 Thread Alexey Kuznetsov
Hello! > Well, take a look at the double acks for 84439343, 84440447 and 84441059, > they seem pretty much identical to me. It is just a little tcpdump glitch. 19:34:54.532271 < 10.2.20.246.33060 > 65.171.224.182.8700: . 44:44(0) ack 84439343 win 24544 (DF) (ttl 64, id 60946) 19:34:54.532432

Re: Possible BUG in IPv4 TCP window handling, all recent 2.4.x/2.6.x kernels

2005-09-02 Thread Alexey Kuznetsov
Hello! > The server socket sockopt are all default, except for the > TCP_WINDOW_CLAMP which is set to 1400 (application specific). It is definitely not all. If you do not fiddle with SO_RCVBUF also, you will always have receiver advertising window of 1400. 11:15:00.922119 IP 10.10.10.3.1150 >

Re: Possible BUG in IPv4 TCP window handling, all recent 2.4.x/2.6.x kernels

2005-09-02 Thread Ion Badulescu
Hi Alexey, On Fri, 2 Sep 2005, Alexey Kuznetsov wrote: This is where things start going bad. The window starts shrinking from 15340 all the way down to 2355 over the course of 0.3 seconds. Notice the many duplicate acks that serve no purpose These are not duplicate, TCP_NODELAY sender just st

Re: Possible BUG in IPv4 TCP window handling, all recent 2.4.x/2.6.x kernels

2005-09-02 Thread Guillaume Autran
The server socket sockopt are all default, except for the TCP_WINDOW_CLAMP which is set to 1400 (application specific). Guillaume. Alexey Kuznetsov wrote: Hello! Do you think this will also fix Ion's issue with small window size never going back up ? I was wrong even about this on

Re: Possible BUG in IPv4 TCP window handling, all recent 2.4.x/2.6.x kernels

2005-09-02 Thread Alexey Kuznetsov
Hello! > This is where things start going bad. The window starts shrinking from > 15340 all the way down to 2355 over the course of 0.3 seconds. Notice the > many duplicate acks that serve no purpose These are not duplicate, TCP_NODELAY sender just starts flooding tiny segments, and those are n

Re: Possible BUG in IPv4 TCP window handling, all recent 2.4.x/2.6.x kernels

2005-09-02 Thread Alexey Kuznetsov
Hello! > Do you think this will also fix Ion's issue with small window size never > going back up ? I was wrong even about this one. That bad case, which I rememebered, is not triggered here. And even if packet lengths and windows were modified to trigger it, the effect would not be so pathologi

Re: Possible BUG in IPv4 TCP window handling, all recent 2.4.x/2.6.x kernels

2005-09-02 Thread Guillaume Autran
Hi Alexey, Do you think this will also fix Ion's issue with small window size never going back up ? Thanks Guillaume. Alexey Kuznetsov wrote: Hello! Here are the dumps... I see. It has nothing to do with clamping. Indeed this is a very old bug. Frankly speaking I even was aware

Re: Possible BUG in IPv4 TCP window handling, all recent 2.4.x/2.6.x kernels

2005-09-02 Thread Ion Badulescu
On Fri, 2 Sep 2005, John Heffner wrote: If it is window clamping, then you should be asymptotically approaching a ratio between receive buffer and window that corresponds (with a fudge factor) to the ratio between TCP segment data size and allocated packet size. If you make the receive buffer

Re: Possible BUG in IPv4 TCP window handling, all recent 2.4.x/2.6.x kernels

2005-09-02 Thread Alexey Kuznetsov
Hello! > I wonder if clamping the window though is too harsh. Maybe just > setting the rcv_ssthresh down is better? It is too harsh. This was invented before we learned how to collapse received data, that time tiny segments were fatal and clamping was the last weapon against misbehaving connec

Re: Possible BUG in IPv4 TCP window handling, all recent 2.4.x/2.6.x kernels

2005-09-02 Thread John Heffner
On Sep 2, 2005, at 10:33 AM, [EMAIL PROTECTED] wrote: On Fri, 2 Sep 2005, John Heffner wrote: Have you tried increasing the size of the receive buffer yet? Actually, I just did. I changed rmem_max and rmem_default to 4MB and tcp_rmem to "64k 4MB 4MB". It did seem to help, but I'm wondering

Re: Possible BUG in IPv4 TCP window handling, all recent 2.4.x/2.6.x kernels

2005-09-02 Thread lists
On Fri, 2 Sep 2005, John Heffner wrote: Have you tried increasing the size of the receive buffer yet? Actually, I just did. I changed rmem_max and rmem_default to 4MB and tcp_rmem to "64k 4MB 4MB". It did seem to help, but I'm wondering if that's simply because it has a _lot_ of memory now t

Re: Possible BUG in IPv4 TCP window handling, all recent 2.4.x/2.6.x kernels

2005-09-02 Thread John Heffner
On Sep 2, 2005, at 9:48 AM, Alexey Kuznetsov wrote: Hello! If you overflow the socket's memory bound, it ends up calling tcp_clamp_window(). (I'm not sure this is really the right thing to do here before trying to collapse the queue.) Collapsing is too expensive procedure, it is rather an

Re: Possible BUG in IPv4 TCP window handling, all recent 2.4.x/2.6.x kernels

2005-09-02 Thread John Heffner
On Sep 2, 2005, at 9:52 AM, Alexey Kuznetsov wrote: Hello! I experienced the very same problem but with window size going all the way down to just a few bytes (14 bytes). dump files available upon requests :) I do request. TCP is not allowed to reduce window to a value less than 2*MSS no m

Re: Possible BUG in IPv4 TCP window handling, all recent 2.4.x/2.6.x kernels

2005-09-02 Thread John Heffner
On Sep 2, 2005, at 10:05 AM, [EMAIL PROTECTED] wrote: This particular Win2k sender sends _only_ real-time data, it's not capable of rewinding. So it's always sending small packets, from start to finish, yet the problem still occurs. Note that even real-time data can end up generating a stream

Re: Possible BUG in IPv4 TCP window handling, all recent 2.4.x/2.6.x kernels

2005-09-02 Thread lists
Hi David, On Thu, 1 Sep 2005, David S. Miller wrote: From: John Heffner <[EMAIL PROTECTED]> Date: Thu, 1 Sep 2005 22:51:48 -0400 I have an idea why this is going on. Packets are pre-allocated by the driver to be a max packet size, so when you send small packets, it wastes a lot of memory. C

Re: Possible BUG in IPv4 TCP window handling, all recent 2.4.x/2.6.x kernels

2005-09-02 Thread Alexey Kuznetsov
Hello! > I experienced the very same problem but with window size going all the > way down to just a few bytes (14 bytes). dump files available upon > requests :) I do request. TCP is not allowed to reduce window to a value less than 2*MSS no matter how hard network device or peer try to confu

Re: Possible BUG in IPv4 TCP window handling, all recent 2.4.x/2.6.x kernels

2005-09-02 Thread Alexey Kuznetsov
Hello! > If you overflow the socket's memory bound, it ends up calling > tcp_clamp_window(). (I'm not sure this is really the right thing to do > here before trying to collapse the queue.) Collapsing is too expensive procedure, it is rather an emergency measure. So, tcp collapses queue, when i

Re: Possible BUG in IPv4 TCP window handling, all recent 2.4.x/2.6.x kernels

2005-09-02 Thread Ion Badulescu
On Fri, 2 Sep 2005, Guillaume Autran wrote: I experienced the very same problem but with window size going all the way down to just a few bytes (14 bytes). dump files available upon requests :) Ion, how were you able to reproduce the issue ? Can the same type of traffice always reproduce the is

Re: Possible BUG in IPv4 TCP window handling, all recent 2.4.x/2.6.x kernels

2005-09-02 Thread Guillaume Autran
I experienced the very same problem but with window size going all the way down to just a few bytes (14 bytes). dump files available upon requests :) Ion, how were you able to reproduce the issue ? Can the same type of traffice always reproduce the issue or is it more intermittent ? Best regar

Re: Possible BUG in IPv4 TCP window handling, all recent 2.4.x/2.6.x kernels

2005-09-01 Thread David S. Miller
From: John Heffner <[EMAIL PROTECTED]> Date: Thu, 1 Sep 2005 22:51:48 -0400 > I have an idea why this is going on. Packets are pre-allocated by the > driver to be a max packet size, so when you send small packets, it > wastes a lot of memory. Currently Linux uses the packets at the > beginnin

Re: Possible BUG in IPv4 TCP window handling, all recent 2.4.x/2.6.x kernels

2005-09-01 Thread John Heffner
On Sep 1, 2005, at 6:53 PM, Ion Badulescu wrote: A few minutes later it has finally caught up to present time and it starts receiving smaller packets containing real-time data. The TCP window is still 16534 at this point. [tcpdump output removed] This is where things start going bad. The wi

Re: Possible BUG in IPv4 TCP window handling, all recent 2.4.x/2.6.x kernels

2005-09-01 Thread Jesper Juhl
On 9/2/05, Ion Badulescu <[EMAIL PROTECTED]> wrote: > Hi David, > > On Thu, 1 Sep 2005, David S. Miller wrote: > > > Thanks for the empty posting. Please provide the content you > > intended to post, and furthermore please post it to the network > > developer mailing list, netdev@vger.kernel.org

Re: Possible BUG in IPv4 TCP window handling, all recent 2.4.x/2.6.x kernels

2005-09-01 Thread Ion Badulescu
Hi David, On Thu, 1 Sep 2005, David S. Miller wrote: Thanks for the empty posting. Please provide the content you intended to post, and furthermore please post it to the network developer mailing list, netdev@vger.kernel.org First of all, thanks for the reply (even to an empty posting :). T