netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next] tcp: auto corking
Date: Fri, 06 Dec 2013 12:54:17 -0500 (EST)	[thread overview]
Message-ID: <20131206.125417.1287943279062327392.davem@davemloft.net> (raw)
In-Reply-To: <1386311765.30495.246.camel@edumazet-glaptop2.roam.corp.google.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 05 Dec 2013 22:36:05 -0800

> From: Eric Dumazet <edumazet@google.com>
> 
> With the introduction of TCP Small Queues, TSO auto sizing, and TCP
> pacing, we can implement Automatic Corking in the kernel, to help
> applications doing small write()/sendmsg() to TCP sockets.
> 
> Idea is to change tcp_push() to check if the current skb payload is
> under skb optimal size (a multiple of MSS bytes)
> 
> If under 'size_goal', and at least one packet is still in Qdisc or
> NIC TX queues, set the TCP Small Queue Throttled bit, so that the push
> will be delayed up to TX completion time.
> 
> This delay might allow the application to coalesce more bytes
> in the skb in following write()/sendmsg()/sendfile() system calls.
> 
> The exact duration of the delay is depending on the dynamics
> of the system, and might be zero if no packet for this flow
> is actually held in Qdisc or NIC TX ring.
> 
> Using FQ/pacing is a way to increase the probability of
> autocorking being triggered.
> 
> Add a new sysctl (/proc/sys/net/ipv4/tcp_autocorking) to control
> this feature and default it to 1 (enabled)
> 
> Add a new SNMP counter : nstat -a | grep TcpExtTCPAutoCorking
> This counter is incremented every time we detected skb was under used
> and its flush was deferred.
> 
> Tested:
 ...
> Signed-off-by: Eric Dumazet <edumazet@google.com>

This looks fantastic, applied, thanks!

      parent reply	other threads:[~2013-12-06 17:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-06  6:36 [PATCH net-next] tcp: auto corking Eric Dumazet
2013-12-06 10:30 ` David Laight
2013-12-06 16:06   ` Rick Jones
2013-12-06 16:30     ` David Laight
2013-12-06 17:46     ` Eric Dumazet
2013-12-06 17:57       ` David Laight
2013-12-06 18:02       ` Rick Jones
2013-12-06 18:36         ` Eric Dumazet
2013-12-06 21:34     ` Rick Jones
2013-12-06 17:54 ` David Miller [this message]

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=20131206.125417.1287943279062327392.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.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).