From: Guillaume Autran <gautran@mrv.com>
To: John Heffner <jheffner@psc.edu>
Cc: Ion Badulescu <lists@limebrokerage.com>,
"David S. Miller" <davem@davemloft.net>,
linux-net@vger.kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: Possible BUG in IPv4 TCP window handling, all recent 2.4.x/2.6.x kernels
Date: Fri, 02 Sep 2005 09:02:49 -0400 [thread overview]
Message-ID: <43184D79.6040009@mrv.com> (raw)
In-Reply-To: <2d02c76a84655d212634a91002b3eccd@psc.edu>
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 regards,
Guillaume.
John Heffner wrote:
> 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 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 (there are no
>> lost packets and the tcpdump is taken on the receiver so there is no
>> packets/acks crossed in flight).
>
>
> 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
> beginning of a connection to make a guess at how best to advertise its
> window so as not to overflow the socket's memory bounds. Since you
> start out with big segments then go to small ones, this is defeating
> that mechanism. It's actually documented in the comments in
> tcp_input.c. :)
>
> * The scheme does not work when sender sends good segments opening
> * window and then starts to feed us spagetti. But it should work
> * in common situations. Otherwise, we have to rely on queue collapsing.
>
> 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.) If the receiving
> application doesn't fall too far behind, it might help you to set a
> much larger receiver buffer.
>
> -John
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-net" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
=======================================
Guillaume Autran
Senior Software Engineer
MRV Communications, Inc.
Tel: (978) 952-4932 office
E-mail: gautran@mrv.com
=======================================
next prev parent reply other threads:[~2005-09-02 13:02 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.61.0509011713240.6083@guppy.limebrokerage.com>
[not found] ` <20050901.154300.118239765.davem@davemloft.net>
2005-09-01 22:53 ` Possible BUG in IPv4 TCP window handling, all recent 2.4.x/2.6.x kernels Ion Badulescu
2005-09-01 23:37 ` Jesper Juhl
2005-09-02 2:51 ` John Heffner
2005-09-02 6:28 ` David S. Miller
2005-09-02 14:05 ` lists
2005-09-02 14:10 ` John Heffner
2005-09-02 14:33 ` lists
2005-09-02 14:48 ` John Heffner
2005-09-02 15:43 ` Ion Badulescu
2005-09-02 13:02 ` Guillaume Autran [this message]
2005-09-02 13:48 ` Ion Badulescu
2005-09-02 13:52 ` Alexey Kuznetsov
2005-09-02 14:11 ` John Heffner
[not found] ` <43185E81.2070300@mrv.com>
[not found] ` <20050902154424.GA15060@yakov.inr.ac.ru>
2005-09-02 16:18 ` Guillaume Autran
[not found] ` <431877EE.6010101@mrv.com>
2005-09-02 17:32 ` Alexey Kuznetsov
2005-09-02 18:56 ` Guillaume Autran
2005-09-02 21:08 ` Alexey Kuznetsov
2005-09-02 13:48 ` Alexey Kuznetsov
2005-09-02 14:16 ` John Heffner
2005-09-02 15:11 ` Alexey Kuznetsov
2005-09-02 18:36 ` Alexey Kuznetsov
2005-09-02 20:57 ` Ion Badulescu
2005-09-02 21:18 ` Alexey Kuznetsov
2005-09-02 23:09 ` Ion Badulescu
2005-09-28 16:31 ` Ion Badulescu
2005-09-29 15:17 ` Alexey Kuznetsov
2005-09-29 15:34 ` Guillaume Autran
2005-09-29 16:04 ` John Heffner
2005-09-29 18:16 ` David S. Miller
2005-09-30 0:29 ` David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43184D79.6040009@mrv.com \
--to=gautran@mrv.com \
--cc=davem@davemloft.net \
--cc=jheffner@psc.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-net@vger.kernel.org \
--cc=lists@limebrokerage.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).