[aqm] Fwd: [PATCH net-next 2/2] tcp_cubic: refine Hystart delay threshold

Dave Taht <dave.taht@gmail.com> Fri, 05 December 2014 01:11 UTC

Return-Path: <dave.taht@gmail.com>
X-Original-To: aqm@ietfa.amsl.com
Delivered-To: aqm@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C79BA1A1BD1 for <aqm@ietfa.amsl.com>; Thu, 4 Dec 2014 17:11:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.101
X-Spam-Level:
X-Spam-Status: No, score=-0.101 tagged_above=-999 required=5 tests=[BAYES_40=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id flnRXZj7x9lw for <aqm@ietfa.amsl.com>; Thu, 4 Dec 2014 17:11:38 -0800 (PST)
Received: from mail-ob0-x22e.google.com (mail-ob0-x22e.google.com [IPv6:2607:f8b0:4003:c01::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 66EB01A00B7 for <aqm@ietf.org>; Thu, 4 Dec 2014 17:11:38 -0800 (PST)
Received: by mail-ob0-f174.google.com with SMTP id nt9so7482443obb.5 for <aqm@ietf.org>; Thu, 04 Dec 2014 17:11:37 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=eu+RhI80EmrkDQBNccO5kh9+/JKftFFbRlrtEMETXzY=; b=FYY0G7g9fpN8QGjztY+iMEzv4x5uQG23Fm2T3bJwQbkkL088X3gBAoDpdgCyqdlK77 OjhaxZwU+dEqFvaJb+5dlnJHIqgg3vuQ/6pvBF3h0JJKbtgTraRxZ7F+8HKtJsY+CF6M QZhGDLMMD2vG65n4esuQJu2AglakQ2PUSioRZPZz1xhdif1E4+g3hNS1I9Ti5bslbhRL mPOcWJWlgkS6yR8MAuZGzqEiExGSIHql44c8ksjM2DyjzhDtn7n4wYMehbs8jM1cBFa1 MfKsuPWQ4Z40tB1JPoeD+fQlgwtQu32jjm7mie8cQNq5IwC7fx/p1HQQqdZzHmInmQyy 15oA==
MIME-Version: 1.0
X-Received: by 10.202.171.85 with SMTP id u82mr8461169oie.24.1417741897620; Thu, 04 Dec 2014 17:11:37 -0800 (PST)
Received: by 10.202.227.77 with HTTP; Thu, 4 Dec 2014 17:11:37 -0800 (PST)
In-Reply-To: <1417738429.22424.29.camel@edumazet-glaptop2.roam.corp.google.com>
References: <1417738429.22424.29.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Thu, 04 Dec 2014 17:11:37 -0800
Message-ID: <CAA93jw5VXP7C21WA31+f4jOay_i5c6WGQKEGm3xUfGyRsm84fw@mail.gmail.com>
From: Dave Taht <dave.taht@gmail.com>
To: bloat <bloat@lists.bufferbloat.net>, "aqm@ietf.org" <aqm@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: http://mailarchive.ietf.org/arch/msg/aqm/ns_oYRRX7TfbmvHjUHWEB_9lfCE
Subject: [aqm] Fwd: [PATCH net-next 2/2] tcp_cubic: refine Hystart delay threshold
X-BeenThere: aqm@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "Discussion list for active queue management and flow isolation." <aqm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/aqm>, <mailto:aqm-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/aqm/>
List-Post: <mailto:aqm@ietf.org>
List-Help: <mailto:aqm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/aqm>, <mailto:aqm-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 05 Dec 2014 01:11:43 -0000

fixing hystart at longer rtts with fq + pacing...


---------- Forwarded message ----------
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, Dec 4, 2014 at 4:13 PM
Subject: [PATCH net-next 2/2] tcp_cubic: refine Hystart delay threshold
To: David Miller <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>, Nandita Dukkipati
<nanditad@google.com>, Neal Cardwell <ncardwell@google.com>, Yuchung
Cheng <ycheng@google.com>, Sangtae Ha <sangtae.ha@gmail.com>


From: Eric Dumazet <edumazet@google.com>

In commit 2b4636a5f8ca ("tcp_cubic: make the delay threshold of HyStart
less sensitive"), HYSTART_DELAY_MIN was changed to 4 ms.

The remaining problem is that using delay_min + (delay_min/16) as the
threshold is too sensitive.

6.25 % of variation is too small for rtt above 60 ms, which are not
uncommon.

Lets use 12.5 % instead (delay_min + (delay_min/8))

Tested:
 80 ms RTT between peers, FQ/pacing packet scheduler on sender.
 10 bulk transfers of 10 seconds :

nstat >/dev/null
for i in `seq 1 10`
 do
   netperf -H remote -- -k THROUGHPUT | grep THROUGHPUT
 done
nstat | grep Hystart

With the 6.25 % threshold :

THROUGHPUT=20.66
THROUGHPUT=249.38
THROUGHPUT=254.10
THROUGHPUT=14.94
THROUGHPUT=251.92
THROUGHPUT=237.73
THROUGHPUT=19.18
THROUGHPUT=252.89
THROUGHPUT=21.32
THROUGHPUT=15.58
TcpExtTCPHystartTrainDetect     2                  0.0
TcpExtTCPHystartTrainCwnd       4756               0.0
TcpExtTCPHystartDelayDetect     5                  0.0
TcpExtTCPHystartDelayCwnd       180                0.0

With the 12.5 % threshold
THROUGHPUT=251.09
THROUGHPUT=247.46
THROUGHPUT=250.92
THROUGHPUT=248.91
THROUGHPUT=250.88
THROUGHPUT=249.84
THROUGHPUT=250.51
THROUGHPUT=254.15
THROUGHPUT=250.62
THROUGHPUT=250.89
TcpExtTCPHystartTrainDetect     1                  0.0
TcpExtTCPHystartTrainCwnd       3175               0.0

Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 net/ipv4/tcp_cubic.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/tcp_cubic.c b/net/ipv4/tcp_cubic.c
index c1d07c7ed03d7d37fa28d1509093e686f78134d2..6b6002416a73950d493661ea1459870f49917efc
100644
--- a/net/ipv4/tcp_cubic.c
+++ b/net/ipv4/tcp_cubic.c
@@ -393,7 +393,7 @@ static void hystart_update(struct sock *sk, u32 delay)
                        ca->sample_cnt++;
                } else {
                        if (ca->curr_rtt > ca->delay_min +
-                           HYSTART_DELAY_THRESH(ca->delay_min>>4)) {
+                           HYSTART_DELAY_THRESH(ca->delay_min >> 3)) {
                                ca->found |= HYSTART_DELAY;
                                NET_INC_STATS_BH(sock_net(sk),

LINUX_MIB_TCPHYSTARTDELAYDETECT);


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


-- 
Dave Täht

thttp://www.bufferbloat.net/projects/bloat/wiki/Upcoming_Talks