From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v7 net-next 2/2] tcp: switch rtt estimations to usec resolution Date: Wed, 26 Feb 2014 17:09:08 -0800 Message-ID: <20140226170908.5f028c88@nehalam.linuxnetplumber.net> References: <1393137487.2316.48.camel@edumazet-glaptop2.roam.corp.google.com> <1393178122.2316.50.camel@edumazet-glaptop2.roam.corp.google.com> <1393181458.2316.56.camel@edumazet-glaptop2.roam.corp.google.com> <1393216927.2316.62.camel@edumazet-glaptop2.roam.corp.google.com> <1393266251.2316.68.camel@edumazet-glaptop2.roam.corp.google.com> <1393280025.2316.76.camel@edumazet-glaptop2.roam.corp.google.com> <1393284682.2316.83.camel@edumazet-glaptop2.roam.corp.google.com> <20140224155130.4c286cca@samsung-9> <1393290667.2316.96.camel@edumazet-glaptop2.roam.corp.google.com> <1393292339.2316.98.camel@edumazet-glaptop2.roam.corp.google.com> <1393309341.2316.120.camel@edumazet-glaptop2.roam.corp.google.com> <1393452168.26794.8.camel@edumazet-glaptop2.roam.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: David Miller , Julian Anastasov , Yuchung Cheng , netdev , Neal Cardwell , Larry Brakmo To: Eric Dumazet Return-path: Received: from mail-pb0-f44.google.com ([209.85.160.44]:47701 "EHLO mail-pb0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751929AbaB0BJM (ORCPT ); Wed, 26 Feb 2014 20:09:12 -0500 Received: by mail-pb0-f44.google.com with SMTP id rp16so1785476pbb.3 for ; Wed, 26 Feb 2014 17:09:11 -0800 (PST) In-Reply-To: <1393452168.26794.8.camel@edumazet-glaptop2.roam.corp.google.com> Sender: netdev-owner@vger.kernel.org List-ID: On Wed, 26 Feb 2014 14:02:48 -0800 Eric Dumazet wrote: > From: Eric Dumazet > > Upcoming congestion controls for TCP require usec resolution for RTT > estimations. Millisecond resolution is simply not enough these days. > > FQ/pacing in DC environments also require this change for finer control > and removal of bimodal behavior due to the current hack in > tcp_update_pacing_rate() for 'small rtt' > > TCP_CONG_RTT_STAMP is no longer needed. > > As Julian Anastasov pointed out, we need to keep user compatibility : > tcp_metrics used to export RTT and RTTVAR in msec resolution, > so we added RTT_US and RTTVAR_US. An iproute2 patch is needed > to use the new attributes if provided by the kernel. > > In this example ss command displays a srtt of 32 usecs (10Gbit link) > > lpk51:~# ./ss -i dst lpk52 > Netid State Recv-Q Send-Q Local Address:Port Peer > Address:Port > tcp ESTAB 0 1 10.246.11.51:42959 > 10.246.11.52:64614 > cubic wscale:6,6 rto:201 rtt:0.032/0.001 ato:40 mss:1448 > cwnd:10 send > 3620.0Mbps pacing_rate 7240.0Mbps unacked:1 rcv_rtt:993 rcv_space:29559 > > Updated iproute2 ip command displays : > > lpk51:~# ./ip tcp_metrics | grep 10.246.11.52 > 10.246.11.52 age 561.914sec cwnd 10 rtt 274us rttvar 213us source > 10.246.11.51 > > Old binary displays : > > lpk51:~# ip tcp_metrics | grep 10.246.11.52 > 10.246.11.52 age 561.914sec cwnd 10 rtt 250us rttvar 125us source > 10.246.11.51 > > With help from Julian Anastasov, Stephen Hemminger and Yuchung Cheng > > Signed-off-by: Eric Dumazet > Acked-by: Neal Cardwell > Cc: Stephen Hemminger > Cc: Yuchung Cheng > Cc: Larry Brakmo > Cc: Julian Anastasov > --- Since srtt is scaled by 8 and is 32 bits, This does reduce the maximum possible RTT to 8 minutes or so. Which is fine, just wanted it to be noted.