netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: xiyou.wangcong@gmail.com, wei.liu2@citrix.com,
	netdev@vger.kernel.org, ycheng@google.com, ncardwell@google.com
Subject: Re: [PATCH] tcp: TSQ can use a dynamic limit
Date: Mon, 30 Sep 2013 20:52:02 -0700 (PDT)	[thread overview]
Message-ID: <20130930.205202.508440258411894005.davem@davemloft.net> (raw)
In-Reply-To: <1380277734.30872.25.camel@edumazet-glaptop.roam.corp.google.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 27 Sep 2013 03:28:54 -0700

> From: Eric Dumazet <edumazet@google.com>
> 
> When TCP Small Queues was added, we used a sysctl to limit amount of
> packets queues on Qdisc/device queues for a given TCP flow.
> 
> Problem is this limit is either too big for low rates, or too small
> for high rates.
> 
> Now TCP stack has rate estimation in sk->sk_pacing_rate, and TSO 
> auto sizing, it can better control number of packets in Qdisc/device
> queues.
> 
> New limit is two packets or at least 1 to 2 ms worth of packets.
> 
> Low rates flows benefit from this patch by having even smaller
> number of packets in queues, allowing for faster recovery,
> better RTT estimations.
> 
> High rates flows benefit from this patch by allowing more than 2 packets
> in flight as we had reports this was a limiting factor to reach line
> rate. [ In particular if TX completion is delayed because of coalescing
> parameters ]
> 
> Example for a single flow on 10Gbp link controlled by FQ/pacing
> 
> 14 packets in flight instead of 2
> 
> $ tc -s -d qd
> qdisc fq 8001: dev eth0 root refcnt 32 limit 10000p flow_limit 100p
> buckets 1024 quantum 3028 initial_quantum 15140 
>  Sent 1168459366606 bytes 771822841 pkt (dropped 0, overlimits 0
> requeues 6822476) 
>  rate 9346Mbit 771713pps backlog 953820b 14p requeues 6822476 
>   2047 flow, 2046 inactive, 1 throttled, delay 15673 ns
>   2372 gc, 0 highprio, 0 retrans, 9739249 throttled, 0 flows_plimit
> 
> Note that sk_pacing_rate is currently set to twice the actual rate, but
> this might be refined in the future when a flow is in congestion
> avoidance.
> 
> Additional change : skb->destructor should be set to tcp_wfree().
> 
> A future patch (for linux 3.13+) might remove tcp_limit_output_bytes
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied, thanks Eric.

  parent reply	other threads:[~2013-10-01  3:45 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-06 10:16 TSQ accounting skb->truesize degrades throughput for large packets Wei Liu
2013-09-06 12:57 ` Eric Dumazet
2013-09-06 13:12   ` Wei Liu
2013-09-06 16:36   ` Zoltan Kiss
2013-09-06 16:56     ` Eric Dumazet
2013-09-09  9:27       ` Jason Wang
2013-09-09 13:47         ` Eric Dumazet
2013-09-10  7:45           ` Jason Wang
2013-09-10 12:35             ` Eric Dumazet
2013-09-06 17:00     ` Eric Dumazet
2013-09-07 17:21       ` Eric Dumazet
2013-09-09 21:41         ` Zoltan Kiss
2013-09-09 21:56           ` Eric Dumazet
     [not found]             ` <loom.20130921T045654-573@post.gmane.org>
     [not found]               ` <20130921150327.GA9078@zion.uk.xensource.com>
2013-09-22  2:36                 ` [Xen-devel] " Cong Wang
2013-09-22 14:58                   ` Eric Dumazet
2013-09-27 10:28                     ` [PATCH] tcp: TSQ can use a dynamic limit Eric Dumazet
2013-09-27 15:08                       ` Neal Cardwell
2013-09-29 15:41                       ` Cong Wang
2013-10-01  3:52                       ` David Miller [this message]
2013-09-09  5:28       ` TSQ accounting skb->truesize degrades throughput for large packets Cong Wang

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=20130930.205202.508440258411894005.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=wei.liu2@citrix.com \
    --cc=xiyou.wangcong@gmail.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 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).