All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Rick Jones <rick.jones2@hp.com>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@helsinki.fi>,
	"Neal Cardwell" <ncardwell@google.com>,
	"David Miller" <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	"Tom Herbert" <therbert@google.com>,
	"Maciej Żenczykowski" <maze@google.com>,
	"Yuchung Cheng" <ycheng@google.com>
Subject: Re: [PATCH v2 net-next] tcp: avoid expensive pskb_expand_head() calls
Date: Thu, 19 Apr 2012 20:00:36 +0200	[thread overview]
Message-ID: <1334858436.2395.212.camel@edumazet-glaptop> (raw)
In-Reply-To: <4F904FFE.60703@hp.com>

On Thu, 2012-04-19 at 10:48 -0700, Rick Jones wrote:
> On 04/19/2012 10:25 AM, Eric Dumazet wrote:
> > On Thu, 2012-04-19 at 10:20 -0700, Rick Jones wrote:
> >
> >> By copying them to smaller buffers? Or just by altering truesize?
> >> Wasn't the whole point of fixing all the broken truesize settings to
> >> accurately account for memory consumed?
> >
> > I checked, their truesize are OK (1024+256) for ixgbe driver.
> > They could be little smaller, but not that much. (512 + 256)
> >
> > No, its only the sk_rcvbuf is small for a tcp sender,
> > and sk_add_backlog() makes sure we dont queue more than sk_rcvbuf
> > bytes in backlog.
> 
> Sounds like a variation on the theme of wildly divergent 
> inbound/outbound bandwidth and constraining ACKs constraining throughput 
> - only with buffer sizes.
> 
> 87380 is the default SO_RCVBUF right?  That should have allowed 
> 87380/1280 or 68 ACKs to be queued.  Without ACK stretching from GRO 
> that should have covered 68 * 2896 or 196928 bytes.  Based on your 
> previous 54 usec to transmit 64 KB that would be 162+ usecs to 
> accumulate those ACKs, so I guess a question becomes if TCP can be 
> held-off processing ACKs for > 162 usecs, and if so and that cannot be 
> changed, the autotuning will have to start increasing SO_SNDBUF 
> alongside so_sndbuf even if the endpoint is not receiving.  As a 
> handwave, since TCP does not know the buffer size(s) used by the driver, 
> by 1 MSS for every 2 MSS it adds to SO_SNDBUF.  Or find some way to do 
> it "on demand" in the about to drop path.
> 
> That or bare ACKs have to be excluded from the overhead checks somehow I 
> guess, or there be more aggressive copying into smaller buffers.
> 

Nope, we need a limit or risk OOM if a malicious peer send ACK flood ;)

To be clear, if I change the tcp_rmem[1] from 87380 to big value, I no
longer have ACK drops, but still poor performance, I am still
investigating.

  reply	other threads:[~2012-04-19 18:00 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-17  9:06 [BUG] ixgbe: something wrong with queue selection ? Eric Dumazet
2012-04-17  9:16 ` Jeff Kirsher
2012-04-17 16:01   ` Alexander Duyck
2012-04-17 16:38     ` John Fastabend
2012-04-17 17:07       ` Ben Hutchings
2012-04-17 16:46     ` Eric Dumazet
2012-04-17 21:38       ` TSO not 10G friendly if peer is close enough Eric Dumazet
2012-04-17 21:47         ` David Miller
2012-04-18  3:00           ` Eric Dumazet
2012-04-18 15:49         ` [PATCH net-next] tcp: avoid expensive pskb_expand_head() calls Eric Dumazet
     [not found]           ` <4F8EF317.10504@hp.com>
2012-04-18 17:16             ` Eric Dumazet
2012-04-18 17:30               ` Rick Jones
2012-04-18 17:40                 ` Eric Dumazet
2012-04-18 18:40           ` Neal Cardwell
2012-04-18 19:18             ` Eric Dumazet
2012-04-18 19:51               ` [PATCH v2 " Eric Dumazet
2012-04-19 11:10                 ` Ilpo Järvinen
2012-04-19 11:30                   ` Eric Dumazet
2012-04-19 11:40                     ` Eric Dumazet
2012-04-19 11:57                       ` Ilpo Järvinen
2012-04-19 12:44                         ` Eric Dumazet
2012-04-20 12:27                           ` Ilpo Järvinen
2012-04-19 13:18                     ` Eric Dumazet
2012-04-19 13:52                       ` Eric Dumazet
2012-04-19 14:10                         ` Eric Dumazet
2012-04-19 17:20                           ` Rick Jones
2012-04-19 17:25                             ` Eric Dumazet
2012-04-19 17:48                               ` Rick Jones
2012-04-19 18:00                                 ` Eric Dumazet [this message]
2012-04-19 18:05                                   ` Rick Jones
2012-04-18 19:41           ` [PATCH " Vijay Subramanian
2012-04-18 19:49             ` Eric Dumazet

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=1334858436.2395.212.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=ilpo.jarvinen@helsinki.fi \
    --cc=maze@google.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=rick.jones2@hp.com \
    --cc=therbert@google.com \
    --cc=ycheng@google.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.