Re: [tcpm] ECN++

"Scheffenegger, Richard" <Richard.Scheffenegger@netapp.com> Fri, 14 February 2020 19:06 UTC

Return-Path: <Richard.Scheffenegger@netapp.com>
X-Original-To: tcpm@ietfa.amsl.com
Delivered-To: tcpm@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 195B1120B6B; Fri, 14 Feb 2020 11:06:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.902
X-Spam-Level:
X-Spam-Status: No, score=-1.902 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=netapp.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 XWKYRH590kJW; Fri, 14 Feb 2020 11:06:29 -0800 (PST)
Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2064.outbound.protection.outlook.com [40.107.94.64]) (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 7658F120B49; Fri, 14 Feb 2020 11:06:29 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZmRixYn3MdTZWFxueKjTtrhc+yTHtjqdRtmU3pbqJenvjVilqL17JKvceCtR99adYudMShTnnpwjXdREVEhp8f18gH1lo7XTaT8PVwUNLCc1bTljsoKLhzvicTWNPv8aqJo++69rqyB4MOtSSu2RBLP3DvI1po+jxQJZqpfiG0XDtKJZX9TeSW3pUZ3v6zsb633vuMKw5E4SPnWXHk9WUgdfISj5xmJ7oX2O907/jK6XEOk+Mkhx5bLy5z89jnLFwhPyCKX43znaYF4UjTAQXDOr89oAQH7JXK1kowwoAXZrGegsnrFinVjJAhjiAZZ86/QuSiBZerePNs3s3rM/UQ==
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=Vrvzrfzlu6omdFLh/V0MOtzGu8rZ/csfHb7xDV0KSlk=; b=atedNZwaZYv/yAMr9YA80R55WWaakuoB8Of+Mxe9D/o7qBytvPaFxgyiQD24ItuDPgEhqC/vi/FsHKk0DZbC3ksZPcgoO0YSV0dmgRvi0NswRcCF1GCEzT3Qiw8yAcmhcNr2h13WSHr7EgNtl5b7QgbiH4jw+wRDEHgfCWNAslQLsAgLWz/PZVXmj28LRtRIVTy3MIsE+VRS5EVsYxuMQdqhOd/FeXaWx6YHvCkUAkZttDqZAvQHlIHmax6gPzNysHv1JCU41/MBKAEVgy1K87kHb9HEH7de4xfSXM/HSclHjFTM1gR65TjrnzcQcbYYBlHcF8YMFWTg6dWCWCcpcQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=netapp.com; dmarc=pass action=none header.from=netapp.com; dkim=pass header.d=netapp.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netapp.onmicrosoft.com; s=selector1-netapp-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Vrvzrfzlu6omdFLh/V0MOtzGu8rZ/csfHb7xDV0KSlk=; b=eNvOHJS3mNlWOG7++OhA3fCU+fmqSWRNwWFVjq77BFph2i2M8hAcP4WA9y5cmy29g6HtR240v4/vfa64disR6qFjngSQdos0kle5s4DmXSvpnfbzLjshDOMYfDrq5H51rI7Y0BymML8I7d2+A1UlzCEyPTz/4wdtrOPFGEGdPR4=
Received: from SN4PR0601MB3728.namprd06.prod.outlook.com (10.167.151.152) by SN4PR0601MB3741.namprd06.prod.outlook.com (10.167.129.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.25; Fri, 14 Feb 2020 19:06:28 +0000
Received: from SN4PR0601MB3728.namprd06.prod.outlook.com ([fe80::3d15:42e8:38bb:2cdd]) by SN4PR0601MB3728.namprd06.prod.outlook.com ([fe80::3d15:42e8:38bb:2cdd%7]) with mapi id 15.20.2729.025; Fri, 14 Feb 2020 19:06:28 +0000
From: "Scheffenegger, Richard" <Richard.Scheffenegger@netapp.com>
To: Bob Briscoe <in@bobbriscoe.net>, "Scheffenegger, Richard" <rs.ietf@gmx.at>, "tcpm@ietf.org" <tcpm@ietf.org>, "draft-ietf-tcpm-generalized-ecn@ietf.org" <draft-ietf-tcpm-generalized-ecn@ietf.org>, FreeBSD Transport <freebsd-transport@freebsd.org>, Neal Cardwell <ncardwell@google.com>, Christoph Paasch <cpaasch@apple.com>, Vidhi Goel <vidhi_goel@apple.com>, Rodney Grimes <rgrimes@freebsd.org>, Michael Tuexen <tuexen@freebsd.org>
Thread-Topic: [tcpm] ECN++
Thread-Index: AQHV2bRfByuos9fgzkKP2BkJR9Ecy6f7JIgAgB5nMoCAAYmhwA==
Date: Fri, 14 Feb 2020 19:06:27 +0000
Message-ID: <SN4PR0601MB3728C2D89FCF6B0543EA367786150@SN4PR0601MB3728.namprd06.prod.outlook.com>
References: <6f6f4c2f-b72f-b7fb-55aa-c6985862d061@gmx.at> <3cd59a2f-d926-769c-175e-91938b962463@gmx.at> <bb340dfe-d957-6675-81a4-dc00a1c71bca@gmx.at> <80dd5b8c-c45c-8777-da61-812a563d4b9f@bobbriscoe.net>
In-Reply-To: <80dd5b8c-c45c-8777-da61-812a563d4b9f@bobbriscoe.net>
Accept-Language: de-AT, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=Richard.Scheffenegger@netapp.com;
x-originating-ip: [217.70.211.15]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 55ce9b09-2af5-4c6a-efb4-08d7b180fe84
x-ms-traffictypediagnostic: SN4PR0601MB3741:
x-microsoft-antispam-prvs: <SN4PR0601MB3741FD85B92510E758789CD486150@SN4PR0601MB3741.namprd06.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 03137AC81E
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(366004)(39860400002)(376002)(346002)(396003)(199004)(189003)(7416002)(5660300002)(2906002)(8936002)(55016002)(52536014)(81156014)(9686003)(8676002)(81166006)(478600001)(64756008)(66446008)(76116006)(66556008)(86362001)(66476007)(7696005)(53546011)(110136005)(6506007)(26005)(186003)(33656002)(66946007)(71200400001)(316002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN4PR0601MB3741; H:SN4PR0601MB3728.namprd06.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: netapp.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: Z3O5GCdTdOc3F/DH5LURJtEGhFbYVDmTPetagTbwmVXV7KoNbvQbVcWj/MmvN/3NfsXriF2BBkUUT/2HX/E5rjCuNJMlG2iSXwtfFXpHkIc0kLyCRBQkMFrTdygq23JuisGn1DAUsejRmRXlo+vJ/3M1U06jwfBE2OvNiFprFU2kKLedYxKgMnlpWhHUPartN6V7UA1rK8eq2A/8V8Ydhwi9iMP8RDWRMUh49Vps70qkSKQEplcbjT4FX5CXInXShDIeIe7dMUrUq4o3NoDdhteWz0Vc+nWrsj778MKzfVy2cALEpOfD/uK6vDItCidvLSXWzBxv8TlzsYilWDKq4/oXcFsN13KbN1+BIxmOrhTFgWLXDBx095OM5LLl0YDp1TayiU6hcZIcXmPqada2sEGWBT7lE0e2CG1Jb7d5hBDW2v1tmOMseZiQWw4jDuc4gqhbf3nsXAdD2vUBUSRV5fB39MkOwjL7fpWXF8fl8Z2meJglFCW4bSKKfl3rckFN
x-ms-exchange-antispam-messagedata: x3sfS544XvDR3+bte8NpvJJzYNr6V0R+dU09iJFgqeIzBO52y3LzFMIi2XYZ1KoCq2F1oAta3Uxsf0Okxet6zkCWgaRAWsSKBkdSYonSiKGgzyWDLn4sWZlGj2XQ0N16VnrFU59Rz3a4a9g5g2q7yA==
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: netapp.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 55ce9b09-2af5-4c6a-efb4-08d7b180fe84
X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Feb 2020 19:06:27.9340 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4b0911a0-929b-4715-944b-c03745165b3a
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: S6SlJKkFedrKKYBR/DL7hce1Js7dcnepXew0MqvEaw9SKZ69z5RnJf53KGs3IDSDBBYUEFfTf34Oipwj8ypqSg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR0601MB3741
Archived-At: <https://mailarchive.ietf.org/arch/msg/tcpm/YrI9R-Y3IYZhXffuGHKY33395is>
X-Mailman-Approved-At: Sat, 15 Feb 2020 08:15:37 -0800
Subject: Re: [tcpm] ECN++
X-BeenThere: tcpm@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: TCP Maintenance and Minor Extensions Working Group <tcpm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tcpm>, <mailto:tcpm-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tcpm/>
List-Post: <mailto:tcpm@ietf.org>
List-Help: <mailto:tcpm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tcpm>, <mailto:tcpm-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 14 Feb 2020 19:06:41 -0000

Hi Bob,


> Interesting.
> See inline tagged [BB]...
>
>> On 25/01/2020 10:41, Scheffenegger, Richard wrote:
>> Hi Group, Marcelo, Bob,
>>
>>
>> Another update in this context, which IMHO may be discussed as an 
>> actual change of mechanism with ECN++.
>>
>> I was looking into the very poor interaction of ECN between a Linux 
>> client and a BSD server, with request-response workload. That is, 
>> where each side sends out less than MSS data, before the application 
>> waits for the other side to respond to this.
>>
>> Neal pointed out this statement in RFC3168:
>>
>>    ...the TCP sender sets the CWR flag in
>>    the TCP header of the first new data packet sent after the window
>>    reduction.  ...
>>    When the TCP data sender is ready to set the CWR bit after reducing
>>    the congestion window, it SHOULD set the CWR bit only on the first
>>    new data packet that it transmits.
>>
>> However, BSD is sending out the CWR as soon as possible - while Linux 
>> interprets the SHOULD overly strictly (IMHO) and ignores CWR unless it 
>> is received with (new) data.
>
> [BB] Assuming the word '(new)' is optional, I think you're implying that 
> BSD would set CWR on a pure ACK if that were its first packet after it 
> received ECE feedback. Does BSD also set CWR on the first data packet
> after that (if any)?

Currently, FBSD is sending CWR with the next packet (pure ACK, Window 
Probe, Retransmission or New Data). But this should be fixed soon(ish).

I used the bracket because RFC3168 is very clear, that CWR should *only* 
be sent with new data, but Linux would also accept it on any packet with 
data (this includes retransmissions and window probes).


> I think RFC3168 expects CWR only on data packets - so that the sender 
> of the CWR can distinguish between ECE that the receiver sends before 
> vs after the receiver got the CWR (by whether the ackno of the ECE 
> covers the CWR data packet or not).

Yes, effectively, CWR is bound to snd_max+1 in the sequence space on 
the first transmission with RFC3168. Unfortunately, it's not stated that 
clearly.

> Consider 4 data packet exchanges of A>B, B>A, B>A, A>B with CWR 
> on pure ACKs.
>
>     A>>>B Data#1 <CE in transit>
>     A<<<B ACK#1 ECE
>                             ...potentially quiet for a time...
>     A<<<B Data#101 ECE ACK#1
>     A>>>B ACK#101 *CWR*
>                             ...potentially quiet for a time...
>     A<<<B Data#102 ECE ACK#1
>     A>>>B ACK#102
>                             ...potentially quiet for a time...
>     A>>>B Data#2 *CWR* ACK#102
>     A<<<B ACK#2
>
> 'A' doesn't know whether the ECE on Data#102 was sent before or 
> after B received the CWR on A's pure ACK, so 'A' doesn't know 
> whether to reduce its window again or not.
>
> I can't find anything in RFC3168 that explicitly spells out when the sender 
> considers ECE to be in a new round. It jumps straight to describing the 
> exceptional case of a CWR packet being dropped, and omits the 'normal' 
> case of it being delivered.

Well, if the ECE do not stop with the ACK covering the (former) snd_max+1,
the CWR may have been lost (or delivered with a CE mark). In either case, 
another congestion response is appropriate.

> This seems to be missing - perhaps it ought to be added by an erratum.
>
>>
>> But binding the CWR flag to a new data segment delays the ECN 
>> signaling loop artificially (for long runs of unidirectional 
>> transmitted data), and it is not clear what the benefit there would 
>> be, as the CWR flag is not retransmitted anyway (thus not bound to a 
>> point in the sequence number space).
>
> [BB] Surely long runs of unidirectional transmitted data don't exhibit 
> this problem, 'cos there's plenty of new data to carry the CWR. Or 
> have I misunderstood?

Transactional data has frequent changes in data direction. But that behavior
(delaying CWR to only send it with new data) IMHO makes ECN unusable for Ack
Moderation (AckCC). Just wondering, if a different way of tracking the packets
In flight during a window would allow the immediate transmission of CWR 
with ECN++, to make ECN useful for Ack Moderation or other future purposes.

> In fact, the problem I see with RFC3168 is the opposite case. It seems
> there was an assumption that a data sender would be continually sending
> data, so that, once ECE feedback appeared at the sender, it would conveniently
> always have some data to send, on which CWR could be carried.

Correct. With transactional data, this assumption breaks and long flights of 
Packets will continuously have ECE set.

> For instance, in the sequence above, host A might not send Data#2 for ages 
> or perhaps never (a typical case if 'A' is a client requesting a large object). In
> the intervening time, B might send far more than the two packets shown. If 'A'
> does not set CWR on pure ACKs, all B's data packets would have to carry ECE, 
> perhaps for many hours, until A has some more data to send (if ever).
>
> Nontheless, I think ECE continuing for hours is fine within the logic of RFC3168. 
> While A isn't sending anything, it only reduces cwnd once, and it's not 
> measuring any round trips, so it's not increasing cwnd either.
>
> Can you describe your case more precisely, so I can understand what caused 
> the performance hit?

The problem comes from FBSD sending CWR (typically) on pure ACKs - where
Linux ignores the CWR and keeps ECE set; Thus FBSD observes "new" ECE in the 
Following window, resulting in another congestion response - while no further
CE mark was actually present.

This leads to a race to the bottom for FBSD, where cwnd contionously shrinks 
(due to another bug, down to a size of 0 [zero]). Eventually, FBSD clocks out
1 byte every 4 seconds with a timer normally used for Window Probes (but
Unlike Window Probes, that one byte is actually new data).

Eventually CWR may be sent with a data packet (that 1-byte probe), accepted
By Linux, ECE unlatched, and cwnd can start growing again. But that event may
Happen only many minutes into entering this situation (got a trace, where this 
effect lasted nearly 10 minutes).

Obviously, the reverse data direction doesn’t suffer the same problem, nor does
a typical FBSD-FBSD ECN session suffer that fate (even though CWR are sent mostly
on pure ACKs)

>>
>> I therefore propose a change in the Generalized ECN draft, to lift the 
>> above restriction (while it is "only" a SHOULD, this is one more 
>> example of an overly strict receiving-side implementation), and no 
>> longer artificially delay the CWR signal - to become also more useful 
>> for passive measurements.
>
> [BB] I'm not yet convinced that this CWR behaviour is anything to do with 
> the ECN++ draft. But that might be because I've misunderstood your 
> description. As I said above, it might be possible to rectify omissions 
> with an erratum to RFC3168.

In RFC3168, both ECT-codepoints and the CWR flag are defined to only be set on
new data segments.

Thus setting both can be simplified into a single branch; Getting the CWR indication
Slightly faster (not binding it to snd_max+1), that is, even with the next pure ack, probe
Or retransmission, would possibly provide a faster feedback (passive measurement
Of the window), and could enable the use of ECN signals for ACK moderation.

The drawback would be additional congestion responses, if the packet carrying the CWR
Is dropped (congestion on the path carrying the pure ACKs). But IIRC, reacting to congestion
On the (relatively) low bandwidth reverse direction by moderating the transmission speed 
(or asking for fewer ACKs) may be not too inappropriate...


>more...

>> For those interested: The effect of ignoring the CWR on non-new-data 
>> segments by Linux is, that the ECE flag is left latched. Thus BSD 
>> continues window-after-window with cwnd reductions,
>
> [BB] If it's not sending new data, how does the BSD host consider that 
> windows are starting or completing?

It still tracks snd_recover (snd_max when the first ECE is received). I have not
Looked into this in detail yet, though. It may even reduce cwnd while being
The passive receiver...

> Bob