Re: [tcpPrague] Pacing IW

"Tilmans, Olivier (Nokia - BE/Antwerp)" <olivier.tilmans@nokia-bell-labs.com> Tue, 02 February 2021 13:07 UTC

Return-Path: <olivier.tilmans@nokia-bell-labs.com>
X-Original-To: tcpprague@ietfa.amsl.com
Delivered-To: tcpprague@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 559D13A1AA3 for <tcpprague@ietfa.amsl.com>; Tue, 2 Feb 2021 05:07:54 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.151
X-Spam-Level:
X-Spam-Status: No, score=-2.151 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nokia.onmicrosoft.com
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 hGaYtB92KmBJ for <tcpprague@ietfa.amsl.com>; Tue, 2 Feb 2021 05:07:53 -0800 (PST)
Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60101.outbound.protection.outlook.com [40.107.6.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D676D3A1AA2 for <tcpPrague@ietf.org>; Tue, 2 Feb 2021 05:07:52 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UNNUy7RIh09iLhjB3KrM+kzjhFKeUB5MfFJqN7r9YAZwTk8xTv/GDDOw9aY51BQRomxZAIHfDAnRUMPdCadiKdBDtUArQj8sGibcMQ1Oh55r7dhazZclNqxX1/9ZTE32kHNsH3RBKvvL7QiFhJOo3Nb4bRq2KMoTbKrnx/QkUD2bMxv3EukELQ263dsRGFXm7MWAVhOLKU59Vm6sXdDFXqcLof18w1qqs9H0hU79CJi7aR6uQF7Rn1mJNZ9zLbtl12PtlRaf8iUVECel/cuaYiKd3PAgduTbuC9vlJKso8S4fXcqbjwj96N9iJFjrz+1w23b4MLNJGceotwyiEF/Hg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LC41VkjuQGBLdCQiAgAaomZKpvKjphq5yzeMc5/kzjw=; b=X9BVdtmseKN7At0P98X3eAf+MT9JzVQOPaGZevFjI0//TRqYzJtF9W1/jR+lFjHA+llf9Opnk2xy2vOP/6+or+nxphppGHN1gIK/ydUKz7LMARu7zhZb2pw1NzbulLJ8FHS7LVbO+QreJDy4ilLPF+j7bVcD6uUbk0uCaoFiChAvMvozrDEap2k5KPV848bfDBvPUmaiGAYGDhDRYbwJme/EZQVPpMuSZ+xUcja0M2NOjvVOzwig91Nk8xgcmoEAAkUr8W0bq2gxmMN/N/8oZQOdyIrBTzArokYsz90ujdFb5pnok/yxQtxj6lpqvTW8HGHdZmXa8+27CY2HSC0G4g==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nokia-bell-labs.com; dmarc=pass action=none header.from=nokia-bell-labs.com; dkim=pass header.d=nokia-bell-labs.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LC41VkjuQGBLdCQiAgAaomZKpvKjphq5yzeMc5/kzjw=; b=AclvojvycmTc9bObwflMuf4ErxWazeznz5pdXbKQD4oB9aQkRliXzrAOLTNaQ+3fO4p+Kg8oCN5pWM46++X48gniPpyLWPCtZU7Z76R8PIQyw1gwz6hdFefxzPDqxctpNEN6G2IrMSuzJbugaF1ML1nWDZnW0ucNV745xUylHgY=
Received: from (2603:10a6:20b:24c::5) by AM9PR07MB7282.eurprd07.prod.outlook.com (2603:10a6:20b:2c6::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.8; Tue, 2 Feb 2021 13:07:48 +0000
Received: from AM8PR07MB7521.eurprd07.prod.outlook.com ([fe80::95c9:a55b:5f52:1260]) by AM8PR07MB7521.eurprd07.prod.outlook.com ([fe80::95c9:a55b:5f52:1260%7]) with mapi id 15.20.3825.013; Tue, 2 Feb 2021 13:07:48 +0000
From: "Tilmans, Olivier (Nokia - BE/Antwerp)" <olivier.tilmans@nokia-bell-labs.com>
To: Bob Briscoe <research@bobbriscoe.net>
CC: TCP Prague List <tcpPrague@ietf.org>
Thread-Topic: Pacing IW
Thread-Index: AQHW+V2JFweiH7ZHME6bivIt0mTC/apE0Vvw
Date: Tue, 02 Feb 2021 13:07:48 +0000
Message-ID: <AM8PR07MB7521C068DC045E27A99C0022E0B59@AM8PR07MB7521.eurprd07.prod.outlook.com>
References: <1ddb42c7-596b-031c-6215-84e675d08b7d@bobbriscoe.net>
In-Reply-To: <1ddb42c7-596b-031c-6215-84e675d08b7d@bobbriscoe.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: bobbriscoe.net; dkim=none (message not signed) header.d=none;bobbriscoe.net; dmarc=none action=none header.from=nokia-bell-labs.com;
x-originating-ip: [2a02:a03f:636b:f600:dcd3:e0c3:2103:a4a4]
x-ms-publictraffictype: Email
x-ms-office365-filtering-ht: Tenant
x-ms-office365-filtering-correlation-id: 4f3a5866-cfd5-44a3-28cc-08d8c77b8a46
x-ms-traffictypediagnostic: AM9PR07MB7282:
x-microsoft-antispam-prvs: <AM9PR07MB7282C9610A78CB182F1E1446E0B59@AM9PR07MB7282.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: euPb1/QuTny+wx8fx4AuoxoNviQvKAiiADBHxX44BM7lNNTs55/kguseN2AQ1sbcsNy0MbxNSU492x0TOqWdIzIOgV+b2pG0mCdshGPEer7YdKRmA53C7gSZgpFjXx/bTxZK/qk4cwuzyudLOaowTJF0iWaciZ5k0KQzwb2q1ChPBhjpJj3G14xSjaNs9a23XZHp/tmHYiKTOc+oZpGHCHDAbfnw0fdJEfBgM+khHUlXJJ3yB7oIh7/deVPfDfQyDFWyhIWm5QEMAZI6m9e3Uk5EXRHLbQUWglO66svDrhc38/67PybukN0N0bpaAVD7Ji5nSlLms5L9hnoabPpNMmME2MuS85nUYj1O6a4Yaff4erJqykkQmqtU358R/p0L3fFJ+j6NWrIuf3SIvZMGV3ggUuEr5YDwL15EIvm1sXZ6PbgKbRfoSqhSzpDW0Nz90XkOJrFeWIxE5IlVnOdrYOy+ofqkbQ/C0pQI0q+pbP6NmGJt0lxHkpFuP5zknsB0KwuphMt/uj/6WbHBp+LIWiN8kF6fTT83STIMSukXSJDYVCRbEvCWXXwoDiuyHss8m24fT9skr3514Eyi1tqAbeg80t86PGw/+JH/yaWvRpiPDcxYyeDZfbIiYY12WXLgAHFkEZ+UiamX4qhaEvo8r69KMcIJz10fM7m/bQgO0BIdxG5UxopeEJnxKfyxEO1i
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM8PR07MB7521.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(366004)(376002)(396003)(136003)(39860400002)(8676002)(316002)(55016002)(4326008)(8936002)(7116003)(2906002)(86362001)(6916009)(186003)(76116006)(966005)(7696005)(64756008)(52536014)(71200400001)(5660300002)(33656002)(66446008)(6506007)(83380400001)(9686003)(3480700007)(478600001)(66476007)(66556008)(66946007)(336755003)(18886065003); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata: SryshjOnl9jg+G3kky9lZdPU6Kbn6/MpGD2barjJzj+TniZJMuVaKkAdQ/26UNc5qtylUR293mnKwPjONCwahUUjZn6bVFA4mibsekwP5di3UmgNbASOUMvxHLqocjnwtseNO0dkNc2o21vNgyU4BrN/JCKPNxNNMswe6XjhOsQ8Q9akOsoKtfi0+52e102t2SoY0370FVzT8mv53nO3bxneG8BBLfJ/175zyPRzGK4VGNdJMnob2BYUA3sLFbe5czxx4yfyADdUGIH3U3jAuFH3IqW0QmjUi3fAugvALsqhtA6pCu1P3cwgoRe8bdveseaPo1yBs4Y3Iiy+MyCQlMWO/1iheJpQ1UTaK3BrtGkCmAUbwVBsK0yWZ5fxZ7RJQl/QqHJhg8tbpxRK/d8cyzx4PONOurSL09J5z3we0gcN7sHvWlndansvCTOwHrTv3TE5avwwsU8OWFstrpA0XNWcY9F7KkjpqOlwLa/UN8S4dg1ZJSZFnIBekDjOAQG8EOyo1tUA5Pdx5+vS695n9EgpRsqYOz5V3kSGzMy9hH5sgvtEwQdk8ADyk8vOLa57cksNd1cCmeOrWdF+4XacldFdZ+wVbkQ29gMdyYRVoQmWURhvXKlo82C1omtYdI8pZ0z1r6sxhMPMgDuNvphd5pbVaqWbeZQe9Me90xxbSk/UDu0fvdB1xhlfonRnuZ8kDVDqTsU5rELwpQxxhUCyIZ5P6siBwlwoucC3uptDReOzvLW7oqAgKLjq74jXbphmoC3bSPNFyqTTfRaYTCZ8zhI22CwL1VbFxpMkKS/MBB+BAPmou9AMpaeTbe0coyrRa7yaqTKWTdZZWWEmuRGJ7GqX5Lm3aNRrZrxBdzuXhV1JZd5dup5Ji+wji9cKH4XUkw7z78cfmraoWEWh1XNw4UmplscPwpOL6iC4UM/iX2z0aN5f05Q4cDUxcPp554T10IAuO6HWlvSBlCnskNcv9kuUVMuq8J+xqyFgu7oah3wAUmc+zCiApYJsETkbyQkvwB/W84Isnjf2Ko2nxaF29hBLATS+eLO3O0xpmSz0TFG2yar2vjrytsEIE0i7QPT7DJ2HNGxL8Qbs0F58aOLYPhXqXnYJ5zmPmxe05S2UjrZY/LT3hsbR30E1YWpSo8Eb
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: nokia-bell-labs.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: AM8PR07MB7521.eurprd07.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 4f3a5866-cfd5-44a3-28cc-08d8c77b8a46
X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Feb 2021 13:07:48.6508 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: CUpYUR8INXEwSPhPBdJ68k0UmiRHPPpcnm6nIAOi0BdszRLn6itZ31kp1a7di13dYBpPpKdtndEzc8ZmO2mMJyAOTZYIgtkDdjWtM9VomBmSKnf6fT8QdKvJfghW2oif
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR07MB7282
Archived-At: <https://mailarchive.ietf.org/arch/msg/tcpprague/8bQxGXU4M8F4CFmFVc4LEOLsvWQ>
Subject: Re: [tcpPrague] Pacing IW
X-BeenThere: tcpprague@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "To coordinate implementation and standardisation of TCP Prague across platforms. TCP Prague will be an evolution of DCTCP designed to live alongside other TCP variants and derivatives." <tcpprague.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tcpprague>, <mailto:tcpprague-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tcpprague/>
List-Post: <mailto:tcpprague@ietf.org>
List-Help: <mailto:tcpprague-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tcpprague>, <mailto:tcpprague-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 02 Feb 2021 13:07:54 -0000

Hi Bob,

 > I notice you've pushed code to TCP Prague, to optionally pace out IW over
 > the estimated rtt (srtt).
 > https://github.com/L4STeam/linux/commit/aea3ff36380bec82804eba8e3f99e5f14
 > 342978c

Note that this is disabled by default: this approach is quite fragile as
you rightfully point later on; it enables quick experimentation. I'd expect
someone willing to use this in production to have a finer-grained approach,
e.g., using the destination cache to get recent srtt/cwnd values.

 > [...]
 > - If the initial srtt estimate is too low, there will be a queuing delay
 > spike, but it will never be worse than just sending IW at line rate.

Agreed--I would expect this to happen, e.g., with PEPS terminating a
connection.

 > - If srtt is too high, a short flow would take longer to complete because
 > the first ACK will return before the IW has finished sending.

Agreed. More generally, that tradeoff is extremely application dependent,
so applications sensitive to this extra delay would either not use this or
control the pacing rate used themselves by overwriting the socket max pacing
rate.

 > [...]
 > So, possible solutions (either or both):
 > 
 > 1. In tcp_prague.c, multiply the rate returned from
 > prague_update_pacing_rate() by N (where N=2, say). So IW is at least
 > paced over the first half of the RTT on average. Then, if the initial
 > srtt estimate is longer than reality, the error has to be 2x before IW
 > will be delayed more than a whole round.

This is already the case, given the connection is seen as in slowstart (
ssthresh=infinity), the pacing rate will be (2 * IW/srtt)
https://github.com/L4STeam/linux/blob/testing/net/ipv4/tcp_prague.c#L306

 > 2. Introduce a third sysctl option (tcp_pace_iw = 2) that only paces IW
 > if srtt was initialized using the destination cache?
 
I'd happily merge any addition or better ways to do this.

 > Altho this is in TCP Prague now, I guess eventually it could be taken up
 > by any transport with any CC.

Indeed, this was the quickest way to get it to work. It can definitely be
altered to use the destination cache, and/or to use sk_max_pacing_rate in a
smarter way (e.g.,!= infinity indicates the application explicitly
requested it before queuing data for its IW, which could/should be preferred
to any generic in-kernel computation/assumption), and/or to be CCA
independent.


Best,
Olivier

 > 
 > Cheers
 > 
 > 
 > Bob
 > 
 > PS. Defensive coding nit: In tcp_output.c, I noticed you've kept the
 > condition
 >     if ( ... || tp->data_segs_out >= 10 )
 > Surely this shouldn't have been a hard-coded '10' in the first place?
 > 
 > 
 > --
 > ________________________________________________________________
 > Bob Briscoe                               http://bobbriscoe.net/