From: Andi Kleen <andi@firstfloor.org>
To: David Miller <davem@davemloft.net>
Cc: md@bts.sk, netdev@vger.kernel.org
Subject: Re: TCP rx window autotuning harmful at LAN context
Date: Wed, 11 Mar 2009 11:03:35 +0100 [thread overview]
Message-ID: <87bps8fkaw.fsf@basil.nowhere.org> (raw)
In-Reply-To: <20090309.170927.130334650.davem@davemloft.net> (David Miller's message of "Mon, 09 Mar 2009 17:09:27 -0700 (PDT)")
David Miller <davem@davemloft.net> writes:
> From: Marian ÄurkoviÄ <md@bts.sk>
> Date: Mon, 9 Mar 2009 21:05:05 +0100
>
>> Well, in practice that was always limited by receive window size, which
>> was by default 64 kB on most operating systems. So this undesirable behavior
>> was limited to hosts where receive window was manually increased to huge
>> values.
>
> You say "was" as if this was a recent change. Linux has been doing
> receive buffer autotuning for at least 5 years if not longer.
I think his point was the only now does it become a visible problem
as >= 1GB of memory is wide spread, which leads to 4MB rx buffer sizes.
Perhaps this points to the default buffer sizing heuristics to
be too aggressive for >= 1GB?
Perhaps something like this patch? Marian, does that help?
-Andi
TCP: Lower per socket RX buffer sizing threshold
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
net/ipv4/tcp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: linux-2.6.28-test/net/ipv4/tcp.c
===================================================================
--- linux-2.6.28-test.orig/net/ipv4/tcp.c 2009-02-09 11:06:52.000000000 +0100
+++ linux-2.6.28-test/net/ipv4/tcp.c 2009-03-11 11:01:53.000000000 +0100
@@ -2757,9 +2757,9 @@
sysctl_tcp_mem[1] = limit;
sysctl_tcp_mem[2] = sysctl_tcp_mem[0] * 2;
- /* Set per-socket limits to no more than 1/128 the pressure threshold */
- limit = ((unsigned long)sysctl_tcp_mem[1]) << (PAGE_SHIFT - 7);
- max_share = min(4UL*1024*1024, limit);
+ /* Set per-socket limits to no more than 1/256 the pressure threshold */
+ limit = ((unsigned long)sysctl_tcp_mem[1]) << (PAGE_SHIFT - 8);
+ max_share = min(2UL*1024*1024, limit);
sysctl_tcp_wmem[0] = SK_MEM_QUANTUM;
sysctl_tcp_wmem[1] = 16*1024;
--
ak@linux.intel.com -- Speaking for myself only.
next prev parent reply other threads:[~2009-03-11 10:05 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-09 11:25 TCP rx window autotuning harmful at LAN context Marian Ďurkovič
2009-03-09 18:01 ` John Heffner
2009-03-09 20:05 ` Marian Ďurkovič
2009-03-09 20:24 ` Stephen Hemminger
2009-03-10 0:09 ` David Miller
2009-03-10 0:34 ` Rick Jones
2009-03-10 3:55 ` John Heffner
2009-03-10 17:20 ` Rick Jones
2009-03-11 10:03 ` Andi Kleen [this message]
2009-03-11 11:03 ` Marian Ďurkovič
2009-03-11 13:30 ` David Miller
2009-03-11 15:01 ` Andi Kleen
2009-03-11 14:56 ` Marian Ďurkovič
2009-03-11 15:34 ` John Heffner
[not found] ` <20090309195906.M50328@bts.sk>
2009-03-09 20:23 ` John Heffner
2009-03-09 20:33 ` Stephen Hemminger
2009-03-09 23:52 ` David Miller
2009-03-10 0:09 ` John Heffner
2009-03-10 5:19 ` Eric Dumazet
[not found] ` <20090310104956.GA81181@bts.sk>
2009-03-10 11:30 ` David Miller
2009-03-10 11:46 ` Marian Ďurkovič
2009-03-10 15:23 ` John Heffner
2009-03-10 16:00 ` Marian Ďurkovič
2009-03-10 16:18 ` David Miller
2009-03-11 8:29 ` Marian Ďurkovič
2009-03-11 8:41 ` David Miller
2009-03-11 9:05 ` Marian Ďurkovič
2009-03-11 9:11 ` Eric Dumazet
2009-03-11 13:25 ` David Miller
2009-03-11 9:02 ` Rémi Denis-Courmont
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=87bps8fkaw.fsf@basil.nowhere.org \
--to=andi@firstfloor.org \
--cc=davem@davemloft.net \
--cc=md@bts.sk \
--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).