[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20150204.203658.613727873443508787.davem@davemloft.net>
Date: Wed, 04 Feb 2015 20:36:58 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: eric.dumazet@...il.com
Cc: netdev@...r.kernel.org, kennetkl@....uio.no
Subject: Re: [PATCH net-next] tcp: do not pace pure ack packets
From: Eric Dumazet <eric.dumazet@...il.com>
Date: Tue, 03 Feb 2015 18:31:53 -0800
> From: Eric Dumazet <edumazet@...gle.com>
>
> When we added pacing to TCP, we decided to let sch_fq take care
> of actual pacing.
>
> All TCP had to do was to compute sk->pacing_rate using simple formula:
>
> sk->pacing_rate = 2 * cwnd * mss / rtt
>
> It works well for senders (bulk flows), but not very well for receivers
> or even RPC :
>
> cwnd on the receiver can be less than 10, rtt can be around 100ms, so we
> can end up pacing ACK packets, slowing down the sender.
>
> Really, only the sender should pace, according to its own logic.
>
> Instead of adding a new bit in skb, or call yet another flow
> dissection, we tweak skb->truesize to a small value (2), and
> we instruct sch_fq to use new helper and not pace pure ack.
>
> Note this also helps TCP small queue, as ack packets present
> in qdisc/NIC do not prevent sending a data packet (RPC workload)
>
> This helps to reduce tx completion overhead, ack packets can use regular
> sock_wfree() instead of tcp_wfree() which is a bit more expensive.
>
> This has no impact in the case packets are sent to loopback interface,
> as we do not coalesce ack packets (were we would detect skb->truesize
> lie)
>
> In case netem (with a delay) is used, skb_orphan_partial() also sets
> skb->truesize to 1.
>
> This patch is a combination of two patches we used for about one year at
> Google.
>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
Applied, thanks Eric.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists