From: Eric Dumazet <eric.dumazet@gmail.com>
To: Neal Cardwell <ncardwell@google.com>
Cc: netdev@vger.kernel.org, David Miller <davem@davemloft.net>
Subject: Re: limited network bandwidth with 3.2.x kernels
Date: Wed, 22 Feb 2012 08:36:35 +0100 [thread overview]
Message-ID: <1329896195.18384.83.camel@edumazet-laptop> (raw)
In-Reply-To: <20120222055139.GB8026@google.com>
Le mercredi 22 février 2012 à 00:51 -0500, Neal Cardwell a écrit :
> A few thoughts:
>
> (1) Currently __tcp_grow_window has a very large negative impact due
> to quantization. AFAICT from inspecting the code, the rcv_ssthresh
> converges to the following output values given the following input
> skb->truesize/skb->len input values:
>
> truesize/len rcv_ssthresh
> ------------ -------------
> <= 4/3 3/4 * tcp_space()
> <= 8/3 3/8 * sysctl_tcp_rmem[2]
> <= 16/3 3/16 * sysctl_tcp_rmem[2]
> <= 32/3 3/32 * sysctl_tcp_rmem[2]
> ...
>
> As a sanity-check of this table, note that in the report above where
> we got tcpdump traces for the beginning and end of the connection,
> the receive window converged to 338832, which was 2208 bytes above
> (3/8)*sysctl_tcp_rmem[2] for his configuration of sysctl_tcp_rmem[2]
> = 897664.
>
> It would be nice to get rid of this huge jump between truesize of
> 4/3*skb->len and 8/3*skb->len. Ideally we could make this
> continuous?
>
This skb->truesize/skb->len affair is suspect if you ask me.
We increase rcv_ssthresh if we receive a 'good skb', but we have no
guarantee of future skbs.
When we are close to the converged value, we might spend some time in
tcp_grow_window() and decide not to increase rcv_sshthresh
IMHO a better way would be to look at integration values
(sk->sk_rmem_alloc) to not increase rcv_sshthresh if socket receive
queue is full of 'bad skbs'
> (2) I don't think we want to scale the increment using truesize, but
> rather calculate a cap using the truesize/skb->len ratio.
>
> (3) We should use this cap to also cap the post-incremented value of
> rcv_ssthresh, so the increment itself does not take us over the
> target. (Again, note the example where the receive window ended up
> about 2MSS above the target.)
Thats the 'oh we receive a good skb, lets add 2*MSS to rcv_sshthresh'
syndrom
>
> (4) We should only request an ACK now if the rcv_ssthresh actually
> increases.
Note that with your patch and 'good skb', rcv_ssthresh increases slower
than before (MSS increases instead of 2*MSS)
next prev parent reply other threads:[~2012-02-22 7:36 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-13 20:04 limited network bandwidth with 3.2.x kernels alekcejk
2012-02-13 20:18 ` Eric Dumazet
2012-02-13 21:13 ` Eric Dumazet
2012-02-13 21:58 ` alekcejk
2012-02-13 22:44 ` Eric Dumazet
2012-02-13 22:51 ` Neal Cardwell
2012-02-13 23:09 ` alekcejk
2012-02-13 23:14 ` Eric Dumazet
2012-02-13 23:24 ` alekcejk
2012-02-13 23:49 ` alekcejk
2012-02-14 3:06 ` Neal Cardwell
2012-02-14 3:26 ` alekcejk
2012-02-14 5:55 ` Eric Dumazet
2012-02-14 14:09 ` alekcejk
2012-02-13 21:16 ` alekcejk
2012-02-21 4:21 ` alekcejk
2012-02-21 16:45 ` Eric Dumazet
2012-02-21 17:19 ` alekcejk
2012-02-21 17:31 ` Eric Dumazet
2012-02-21 18:53 ` alekcejk
2012-02-22 1:26 ` alekcejk
[not found] ` <1920135.kl3o7Tt79c@localhost.localdomain>
[not found] ` <1329228798.4818.0.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>
2012-02-14 14:28 ` alekcejk
2012-02-14 16:00 ` Eric Dumazet
2012-02-14 16:43 ` alekcejk
2012-02-15 4:43 ` Eric Dumazet
2012-02-15 6:03 ` Neal Cardwell
2012-02-15 6:06 ` Eric Dumazet
2012-02-15 7:52 ` Bill Fink
2012-02-15 8:00 ` Eric Dumazet
2012-02-15 8:18 ` Bill Fink
2012-02-15 8:31 ` Eric Dumazet
2012-02-15 13:44 ` alekcejk
2012-02-15 13:43 ` Re: Re: Re: Re: " alekcejk
2012-02-15 13:44 ` alekcejk
2012-02-15 13:49 ` Eric Dumazet
2012-02-15 13:53 ` Eric Dumazet
2012-02-15 14:11 ` alekcejk
2012-02-15 14:49 ` Neal Cardwell
2012-02-15 14:56 ` Eric Dumazet
2012-02-15 15:05 ` alekcejk
2012-02-15 15:08 ` Eric Dumazet
2012-02-15 19:44 ` Neal Cardwell
2012-02-16 7:29 ` Eric Dumazet
2012-02-16 13:40 ` Eric Dumazet
2012-02-16 13:51 ` Ben Hutchings
2012-02-16 15:09 ` Eric Dumazet
2012-02-16 16:37 ` Ben Hutchings
2012-02-16 17:01 ` David Miller
2012-02-16 17:22 ` Neal Cardwell
2012-02-16 17:54 ` alekcejk
2012-02-16 18:19 ` Neal Cardwell
2012-02-16 21:49 ` alekcejk
2012-02-16 21:59 ` Eric Dumazet
2012-02-16 22:08 ` alekcejk
2012-02-16 22:35 ` Eric Dumazet
2012-02-17 16:41 ` Neal Cardwell
2012-02-21 18:41 ` Eric Dumazet
2012-02-21 19:11 ` David Miller
2012-02-22 5:51 ` Neal Cardwell
2012-02-22 7:36 ` Eric Dumazet [this message]
2012-02-23 18:39 ` Neal Cardwell
2012-02-23 18:49 ` Eric Dumazet
2012-02-27 19:39 ` David Miller
2012-02-17 16:55 ` Re: " Neal Cardwell
2012-02-16 18:22 ` Eric Dumazet
2012-02-16 19:44 ` 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=1329896195.18384.83.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=ncardwell@google.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