Re: [iccrg] Will Fair Queuing change Congestion Control?

Sebastian Moeller <moeller0@gmx.de> Wed, 04 January 2023 08:55 UTC

Return-Path: <moeller0@gmx.de>
X-Original-To: iccrg@ietfa.amsl.com
Delivered-To: iccrg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A1D3CC14F747 for <iccrg@ietfa.amsl.com>; Wed, 4 Jan 2023 00:55:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.846
X-Spam-Level:
X-Spam-Status: No, score=-6.846 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmx.de
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D2kd7ba6n49G for <iccrg@ietfa.amsl.com>; Wed, 4 Jan 2023 00:55:36 -0800 (PST)
Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B536CC14F5E0 for <iccrg@irtf.org>; Wed, 4 Jan 2023 00:55:35 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1672822517; bh=n5gBtoJWYQ936y3OtBk26uE1MJoDcqMfutazT5thKaA=; h=X-UI-Sender-Class:Subject:From:In-Reply-To:Date:Cc:References:To; b=tQuH8Hf9RXM1WQaqcizvIPNyXVcm9fwII/dG9VeVBWetzQSNIEkXlOFNvgXk54oEl fqKLkOO3j56FAMJiSMaZ0OVQy6QR58aUg5GIuBtBEInOymOGtlvRH1+jBgb3XE11fI 5HEm8H0O9iGWRYaoQ5PTffkblYbijWj9VlIYEvPLN5l8GVTxrjnqFT4MZcrvY5bsLu UTX0/Nru6A22QJWK8+rfZ1Quhw5t+y0MYpGow8hG6DJnZ3QqAQfdwephJHPM6do+/C G1l2d19h7rohxbjWJTxmPiHENDgXIWADJHsW1G7QoY5BvTCqeE1q7I63kxqEFRXt0W vLWVvpyqxIcmA==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from smtpclient.apple ([134.76.241.253]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mlw3X-1oVN3u1iWx-00j3sB; Wed, 04 Jan 2023 09:55:17 +0100
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\))
From: Sebastian Moeller <moeller0@gmx.de>
In-Reply-To: <CAEXAmbtjjjwqApdeXKL30x5WKaJ7Fs1_tWvbBdFUScRmqM9cXA@mail.gmail.com>
Date: Wed, 04 Jan 2023 09:55:16 +0100
Cc: Vidhi Goel <vidhi_goel@apple.com>, iccrg@irtf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <C3C1EA84-E8E5-4DCB-9EB7-BDAABDC4BE11@gmx.de>
References: <CAEXAmbs1WwvJ7761eSkSeT_w1GfwnbPL9Tcja8K7fxZHxAiMWA@mail.gmail.com> <E8CE0E38-BC35-416D-8D56-FEA1416968D6@apple.com> <CAEXAmbtjjjwqApdeXKL30x5WKaJ7Fs1_tWvbBdFUScRmqM9cXA@mail.gmail.com>
To: Maximilian Bachl <maximilian.bachl@gmail.com>
X-Mailer: Apple Mail (2.3696.120.41.1.1)
X-Provags-ID: V03:K1:XNcRu0WcAFQ4P2T/67FLg95NtsfzRdzLr04cpveM9LdtkSDMhoJ kqVxjaUlLdMRUT+RqFsYQQ31zzM5FrdXyOoI3RK/VKLQFuQwi0+tX1eYWvBI4r8YqoQYvht kFlT80LLVFRt02fGG2hF930PIw3+vw63+yRVdA7HOnVm+ApLvtiqZ6ODpWEvJUMRN7ZGKfY qhsjEyKS1uSJoyvXfr5og==
UI-OutboundReport: notjunk:1;M01:P0:1Uy/itKII74=;nBhRxWs9Lbubbcl1ylOmxGMFmbA fMQpfdSXYuT6P9rLGpcoFHrhvwmzf24Baj+1av90dRLdbK9dDz7dCfD+hK4OFOM46jL4zZ02D YDQ3RdpZk0L7fU2YKuFQQZ7uQ76YamIQmJKPftYvlgulXjn329gi5xGdLgxjJUyBGw4DdY5cL ERgGZp59H9EAB8lJhnDidpL3beqTBpxwQREJqZ9lWEC3DY7QoYzE9i8YfQpQj7pVt3DGofjcP FTl9KlmLOKK5ZmGuTNCM4uPPekzIRDEuRnVjwNYWqRH6gXrWvtWOv9a0bZEh310U2vw0X2SOm cKkEKh9JtYRi3pEjCP/rMuzxnMlxLF2+MCOKMmnSMyxhzmXzwYFh706kZiP8EurAVOTFjP2A0 i8+/hoF8TMAuccQGPhbXjJY7IOR9nQqA355wlEbrm7gSnkA0g9J8u+4HtyJcY3chkolxHiDN7 IhNC1WQ157uEnN9Vna1Sg7OqyOwJK+3zqQonbJxKa8uvlJqEuxXtg9fOhR16rFUoVTJmWUJRg VDU45kz20o+dXreHP+2ETruf8pAQ2T1kTppKwD6NpIyW4C44xLi9nWrhYZes8mtsumxmZ1fgz KKgs53LRlJnQ1bcjgm7b5PTgFbAqcsW3ojN5mlWImtwOW1gJ4V2jtwyVYyLsGThQZDgAxRazi /bZ4682y3zdIX7s0xF+OBfq7tboqWyxCdAk0uBP3Oq378/WvGr//O3MwuBKEKBeH8WSRdB9fg Kd1pcFGDBcZ/5L2C9a1wmpXvoHmYwVFtP2l17rWTyejC4uHgSeNUhWGHUPCO8FC1nmsj1SMCU eXqVFm8RafOsu/rz8T2wBcYKrAaORXhwFzDstdUKEzV9/6qTbD0tm7HUDyDIiKJmLkhsWRyXZ O0Pvcsw0vDRYTc6V45JuExMrWq8LGxJkP2Hrh6mPBSV1KBnTnxI3/l0/2517FM9Y6UL/qoYUW bcbUyAB5swhdoLZBXldps8mVUqA=
Archived-At: <https://mailarchive.ietf.org/arch/msg/iccrg/VlGURMGqGsjjNjRDcCpDP9_56CI>
Subject: Re: [iccrg] Will Fair Queuing change Congestion Control?
X-BeenThere: iccrg@irtf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Discussions of Internet Congestion Control Research Group \(ICCRG\)" <iccrg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/iccrg>, <mailto:iccrg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/iccrg/>
List-Post: <mailto:iccrg@irtf.org>
List-Help: <mailto:iccrg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/iccrg>, <mailto:iccrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Jan 2023 08:55:40 -0000

Hi Maximilian,

> On Jan 3, 2023, at 23:18, Maximilian Bachl <maximilian.bachl@gmail.com> wrote:
> 
> Hi Vidhi,
> 
> Thank you for your comments! 
> 
> Few things to note, FQ expands to Flow Queue (not fair queueing) which means every flow (4 tuple) has a different queue. Priorities are implemented based on service classes, for example. Also, Apple devices are not the most common bottleneck on an end to end path.
> I assumed "flow queuing" and "fair queueing" to be mostly synonymous, as for example the fq_codel manual page in Linux calls it “fair queuing” (https://man.archlinux.org/man/tc-fq_codel.8.en). To clarify, what I meant is “flow queuing”. 

	[SM] I would argue that both flow and fair are expansions of the Fi FQ that are commonly used, one could even argue for calling this flow-fair queueing ;). It just turns out that a number of folk seem to be allergic about the term "fair" hence a recent tendency to call this flow queueing (which admittedly is more precise anyway).


> 
> Even if we assume there is enough deployment of flow queueing in the network, flows can hurt themselves by not responding to growing latency. This problem has been addressed in L4S drafts and I highly recommend reading them. 
> Endpoints could use delay-minimizing congestion control if they could be certain that fair queuing is deployed at the bottleneck of a path. Thus, I think they wouldn’t necessarily hurt themselves. 

	[SM] Here is the rub, for delay based-CC to work flows need to be sure not to be in competition with "drop-based" CCs as otherwise they will loose. What L4S actually tries to deliver is a separation for "old" and "new" CCs so that new signaling and CC-response behavior can be used without getting into competition with old-style CC.
However while on principle this sounds like a viable way forward, the way this was designed and implemented again confounds old and new CC-signaling, as L4S in a hare-brined move worthy only of ridicule decided to re-use the exiting ECN signaling, and especially to re-define the meaning of what a CE mark means in a non-backward-compatible manner. IMHO this is not a sign of solid engineering, but what do I know, I am a wet-ware biologist... 


> 
> ECN combined with an immediate AQM combined with Prague congestion control is basically the idea of L4S.
> I think that L4S can improve how congestion control is done. However, from what I understand, it doesn't necessarily isolate flows.

	[SM] Indeed, in its default form it only classifies traffic into onl and new-style CC and schedules flows in one of two queues in which all packets of a class are essentially in a FIFO, so class-isolation, but no flow-separation. Historically the L4S drafts have been full of arguments why flow-queueing sucks* and needs to be avoided at all costs. These philippics have been excised in later versions and replaced with text that describes as FQ as one way to implement a L4S AQM. IMHO this is clearly an improvement over earlier drafts, but given my experience with SQM I would argue that L4S should heavily recommend FQ scheduling and only offer dual-queue scheduling as band-aid for situations where FQ is impossible for one way or the other. (My rationale for that change is that the most likely deployment of L4S schedulers is at the ISP to end-user edge, where as the SQM project has shown, FQ-scheduling is a viable option that actually works even when just using old-style "dropped-based" CC).



*) Mostly boiling down to that an attacker that can split its traffic in multiple flows can get more than his/her fair share of the capacity, a failure mode that FQ shares with a FIFO I would argue so, yes an attack surface FQ does not remedy, but hardly a novel attack surface... to be expolicit, this is IMHO not a convincing argument, but again as biologist I have apparently little insiight in what "engineers" find convincing.


> Thus a bad faith actor could get an unfairly large share of bandwidth, which couldn't happen when FQ were deployed.

	[SM] Mostly yes, except if the attacker can split his/he traffic into multiple different flows. Cake offers an elegant way around this dilemma by offering an additional layer of isolation, where it first splits capacity equitably between internal IP addresses, thereby restricting the flow-inflation problem to the traffic mix sent to individual computers.


> With FQ being deployed on a path, each flow could also choose its own congestion control and whether it wants to prioritize low delay or maximum throughput. That's why I think that exciting possibilities open up when more vendors deploy FQ like Apple did. 

	[SM] However Apple's fq_codel seems to differ from RFC fq_codel in several ways, so I am not sure (in that I personally do not know about the details) whether Apple's deployment actually helps.

Regards
	Sebastian

> 
> Regards,
> Max
> 
> On Tue 3. Jan 2023 at 20:45, Vidhi Goel <vidhi_goel@apple.com> wrote:
> Hello Max,
> 
> 
> Few things to note, FQ expands to Flow Queue (not fair queueing) which means every flow (4 tuple) has a different queue. Priorities are implemented based on service classes, for example. Also, Apple devices are not the most common bottleneck on an end to end path.
> 
> Even if we assume there is enough deployment of flow queueing in the network, flows can hurt themselves by not responding to growing latency. This problem has been addressed in L4S drafts and I highly recommend reading them. ECN combined with an immediate AQM combined with Prague congestion control is basically the idea of L4S.
> 
> Vidhi
> 
>> On Jan 3, 2023, at 9:20 AM, Maximilian Bachl <maximilian.bachl@gmail.com> wrote:
>> 
>> Apple introduced fair queuing (FQ) on more than a billion of devices in the last years (https://blog.cerowrt.org/post/state_of_fq_codel/). I wonder if this could have an impact on congestion control. When there’s fair queuing at the bottleneck link of a path, the endpoints can use delay-minimizing congestion control and don’t have to worry about more aggressive senders. 
>> 
>> However, currently, there’s no established mechanism for endpoints to know of the existence of fair queuing on a path. There are some possibilities, though, how endpoints can be made aware of the existence of fair queuing: 
>> 	• A dedicated bit in some packet header. For example, some ECN or DSCP bits could be repurposed to indicate the existence of fair queuing at the bottleneck. Drawback: It’s hard to convince people to repurpose/introduce new bits and switches/routers have to support it. 
>> 	• An end-host-based mechanism to detect fair queuing without the involvement of switches/routers. I created a proof-of-concept implementation of such a mechanism, which can detect the presence/absence of fair queuing with an accuracy of > 95% (https://arxiv.org/abs/2206.10561).
>> 	• Closed ecosystems in which all components are aware that there is fair queuing: As a hypothetical example, let’s assume a user plays a game on nvidia’s cloud-gaming platform on an iPhone. The phone is connected to T-Mobile’s 5G network. Both the client on the iPhone as well as the server in nvidia’s network know that there’s fair queuing on the path between the client and the server, since they have an agreement with T-Mobile, which controls the entire path. No extra bits in packet headers are needed, just mutual agreement between the user’s device, the cellular network provider as well as the server on the internet. 
>> 
>> If you have some opinions on whether fair queuing is going to change how we do congestion control, I’d be curious. 
>> 
>> Regards,
>> Max
>> _______________________________________________
>> iccrg mailing list
>> iccrg@irtf.org
>> https://www.irtf.org/mailman/listinfo/iccrg
> 
> _______________________________________________
> iccrg mailing list
> iccrg@irtf.org
> https://www.irtf.org/mailman/listinfo/iccrg