idnits 2.17.1 draft-ietf-tsvwg-aqm-dualq-coupled-17.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == There are 2 instances of lines with non-ascii characters in the document. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (4 October 2021) is 936 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- -- Looks like a reference, but probably isn't: '0' on line 2447 -- Looks like a reference, but probably isn't: '1' on line 2447 == Outdated reference: A later version (-29) exists of draft-ietf-tsvwg-ecn-l4s-id-19 == Outdated reference: A later version (-02) exists of draft-cardwell-iccrg-bbr-congestion-control-00 == Outdated reference: A later version (-07) exists of draft-briscoe-docsis-q-protection-00 == Outdated reference: A later version (-03) exists of draft-briscoe-iccrg-prague-congestion-control-00 == Outdated reference: A later version (-02) exists of draft-cardwell-iccrg-bbr-congestion-control-00 -- Duplicate reference: draft-cardwell-iccrg-bbr-congestion-control, mentioned in 'I-D.cardwell-iccrg-bbr-congestion-control', was also mentioned in 'BBRv1'. == Outdated reference: A later version (-20) exists of draft-ietf-tsvwg-l4s-arch-10 == Outdated reference: A later version (-22) exists of draft-ietf-tsvwg-nqb-07 -- Obsolete informational reference (is this intentional?): RFC 2309 (Obsoleted by RFC 7567) -- Obsolete informational reference (is this intentional?): RFC 8312 (Obsoleted by RFC 9438) Summary: 0 errors (**), 0 flaws (~~), 9 warnings (==), 6 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Transport Area working group (tsvwg) K. De Schepper 3 Internet-Draft Nokia Bell Labs 4 Intended status: Experimental B. Briscoe, Ed. 5 Expires: 7 April 2022 Independent 6 G. White 7 CableLabs 8 4 October 2021 10 DualQ Coupled AQMs for Low Latency, Low Loss and Scalable Throughput 11 (L4S) 12 draft-ietf-tsvwg-aqm-dualq-coupled-17 14 Abstract 16 The Low Latency Low Loss Scalable Throughput (L4S) architecture 17 allows data flows over the public Internet to achieve consistent low 18 queuing latency, generally zero congestion loss and scaling of per- 19 flow throughput without the scaling problems of standard TCP Reno- 20 friendly congestion controls. To achieve this, L4S data flows have 21 to use one of the family of 'Scalable' congestion controls (TCP 22 Prague and Data Center TCP are examples) and a form of Explicit 23 Congestion Notification (ECN) with modified behaviour. However, 24 until now, Scalable congestion controls did not co-exist with 25 existing Reno/Cubic traffic --- Scalable controls are so aggressive 26 that 'Classic' (e.g. Reno-friendly) algorithms sharing an ECN-capable 27 queue would drive themselves to a small capacity share. Therefore, 28 until now, L4S controls could only be deployed where a clean-slate 29 environment could be arranged, such as in private data centres (hence 30 the name DCTCP). This specification defines `DualQ Coupled Active 31 Queue Management (AQM)', which enables Scalable congestion controls 32 that comply with the Prague L4S requirements to co-exist safely with 33 Classic Internet traffic. 35 Analytical study and implementation testing of the Coupled AQM have 36 shown that Scalable and Classic flows competing under similar 37 conditions run at roughly the same rate. It achieves this 38 indirectly, without having to inspect transport layer flow 39 identifiers. When tested in a residential broadband setting, DCTCP 40 also achieves sub-millisecond average queuing delay and zero 41 congestion loss under a wide range of mixes of DCTCP and `Classic' 42 broadband Internet traffic, without compromising the performance of 43 the Classic traffic. The solution has low complexity and requires no 44 configuration for the public Internet. 46 Status of This Memo 48 This Internet-Draft is submitted in full conformance with the 49 provisions of BCP 78 and BCP 79. 51 Internet-Drafts are working documents of the Internet Engineering 52 Task Force (IETF). Note that other groups may also distribute 53 working documents as Internet-Drafts. The list of current Internet- 54 Drafts is at https://datatracker.ietf.org/drafts/current/. 56 Internet-Drafts are draft documents valid for a maximum of six months 57 and may be updated, replaced, or obsoleted by other documents at any 58 time. It is inappropriate to use Internet-Drafts as reference 59 material or to cite them other than as "work in progress." 61 This Internet-Draft will expire on 7 April 2022. 63 Copyright Notice 65 Copyright (c) 2021 IETF Trust and the persons identified as the 66 document authors. All rights reserved. 68 This document is subject to BCP 78 and the IETF Trust's Legal 69 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 70 license-info) in effect on the date of publication of this document. 71 Please review these documents carefully, as they describe your rights 72 and restrictions with respect to this document. Code Components 73 extracted from this document must include Simplified BSD License text 74 as described in Section 4.e of the Trust Legal Provisions and are 75 provided without warranty as described in the Simplified BSD License. 77 Table of Contents 79 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 80 1.1. Outline of the Problem . . . . . . . . . . . . . . . . . 4 81 1.2. Scope . . . . . . . . . . . . . . . . . . . . . . . . . . 6 82 1.3. Terminology . . . . . . . . . . . . . . . . . . . . . . . 8 83 1.4. Features . . . . . . . . . . . . . . . . . . . . . . . . 9 84 2. DualQ Coupled AQM . . . . . . . . . . . . . . . . . . . . . . 11 85 2.1. Coupled AQM . . . . . . . . . . . . . . . . . . . . . . . 11 86 2.2. Dual Queue . . . . . . . . . . . . . . . . . . . . . . . 12 87 2.3. Traffic Classification . . . . . . . . . . . . . . . . . 13 88 2.4. Overall DualQ Coupled AQM Structure . . . . . . . . . . . 13 89 2.5. Normative Requirements for a DualQ Coupled AQM . . . . . 17 90 2.5.1. Functional Requirements . . . . . . . . . . . . . . . 17 91 2.5.1.1. Requirements in Unexpected Cases . . . . . . . . 18 92 2.5.2. Management Requirements . . . . . . . . . . . . . . . 19 93 2.5.2.1. Configuration . . . . . . . . . . . . . . . . . . 19 94 2.5.2.2. Monitoring . . . . . . . . . . . . . . . . . . . 21 95 2.5.2.3. Anomaly Detection . . . . . . . . . . . . . . . . 21 96 2.5.2.4. Deployment, Coexistence and Scaling . . . . . . . 22 97 3. IANA Considerations (to be removed by RFC Editor) . . . . . . 22 98 4. Security Considerations . . . . . . . . . . . . . . . . . . . 22 99 4.1. Overload Handling . . . . . . . . . . . . . . . . . . . . 22 100 4.1.1. Avoiding Classic Starvation: Sacrifice L4S Throughput 101 or Delay? . . . . . . . . . . . . . . . . . . . . . . 23 102 4.1.2. Congestion Signal Saturation: Introduce L4S Drop or 103 Delay? . . . . . . . . . . . . . . . . . . . . . . . 24 104 4.1.3. Protecting against Unresponsive ECN-Capable 105 Traffic . . . . . . . . . . . . . . . . . . . . . . . 25 106 5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 26 107 6. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 26 108 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 26 109 7.1. Normative References . . . . . . . . . . . . . . . . . . 26 110 7.2. Informative References . . . . . . . . . . . . . . . . . 27 111 Appendix A. Example DualQ Coupled PI2 Algorithm . . . . . . . . 32 112 A.1. Pass #1: Core Concepts . . . . . . . . . . . . . . . . . 33 113 A.2. Pass #2: Overload Details . . . . . . . . . . . . . . . . 43 114 Appendix B. Example DualQ Coupled Curvy RED Algorithm . . . . . 47 115 B.1. Curvy RED in Pseudocode . . . . . . . . . . . . . . . . . 47 116 B.2. Efficient Implementation of Curvy RED . . . . . . . . . . 53 117 Appendix C. Choice of Coupling Factor, k . . . . . . . . . . . . 55 118 C.1. RTT-Dependence . . . . . . . . . . . . . . . . . . . . . 55 119 C.2. Guidance on Controlling Throughput Equivalence . . . . . 56 120 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 57 122 1. Introduction 124 This document specifies a framework for DualQ Coupled AQMs, which is 125 the network part of the L4S architecture [I-D.ietf-tsvwg-l4s-arch]. 126 L4S enables both very low queuing latency (sub-millisecond on 127 average) and high throughput at the same time, for ad hoc numbers of 128 capacity-seeking applications all sharing the same capacity. 130 1.1. Outline of the Problem 132 Latency is becoming the critical performance factor for many (most?) 133 applications on the public Internet, e.g. interactive Web, Web 134 services, voice, conversational video, interactive video, interactive 135 remote presence, instant messaging, online gaming, remote desktop, 136 cloud-based applications, and video-assisted remote control of 137 machinery and industrial processes. In the developed world, further 138 increases in access network bit-rate offer diminishing returns, 139 whereas latency is still a multi-faceted problem. In the last decade 140 or so, much has been done to reduce propagation time by placing 141 caches or servers closer to users. However, queuing remains a major 142 intermittent component of latency. 144 Traditionally very low latency has only been available for a few 145 selected low rate applications, that confine their sending rate 146 within a specially carved-off portion of capacity, which is 147 prioritized over other traffic, e.g. Diffserv EF [RFC3246]. Up to 148 now it has not been possible to allow any number of low latency, high 149 throughput applications to seek to fully utilize available capacity, 150 because the capacity-seeking process itself causes too much queuing 151 delay. 153 To reduce this queuing delay caused by the capacity seeking process, 154 changes either to the network alone or to end-systems alone are in 155 progress. L4S involves a recognition that both approaches are 156 yielding diminishing returns: 158 * Recent state-of-the-art active queue management (AQM) in the 159 network, e.g. FQ-CoDel [RFC8290], PIE [RFC8033], Adaptive 160 RED [ARED01] ) has reduced queuing delay for all traffic, not just 161 a select few applications. However, no matter how good the AQM, 162 the capacity-seeking (sawtoothing) rate of TCP-like congestion 163 controls represents a lower limit that will either cause queuing 164 delay to vary or cause the link to be under-utilized. These AQMs 165 are tuned to allow a typical capacity-seeking Reno-friendly flow 166 to induce an average queue that roughly doubles the base RTT, 167 adding 5-15 ms of queuing on average (cf. 500 microseconds with 168 L4S for the same mix of long-running and web traffic). However, 169 for many applications low delay is not useful unless it is 170 consistently low. With these AQMs, 99th percentile queuing delay 171 is 20-30 ms (cf. 2 ms with the same traffic over L4S). 173 * Similarly, recent research into using e2e congestion control 174 without needing an AQM in the network (e.g.BBR [BBRv1], 175 [I-D.cardwell-iccrg-bbr-congestion-control]) seems to have hit a 176 similar lower limit to queuing delay of about 20ms on average (and 177 any additional BBRv1 flow adds another 20ms of queuing) but there 178 are also regular 25ms delay spikes due to bandwidth probes and 179 60ms spikes due to flow-starts. 181 L4S learns from the experience of Data Center TCP [RFC8257], which 182 shows the power of complementary changes both in the network and on 183 end-systems. DCTCP teaches us that two small but radical changes to 184 congestion control are needed to cut the two major outstanding causes 185 of queuing delay variability: 187 1. Far smaller rate variations (sawteeth) than Reno-friendly 188 congestion controls; 190 2. A shift of smoothing and hence smoothing delay from network to 191 sender. 193 Without the former, a 'Classic' (e.g. Reno-friendly) flow's round 194 trip time (RTT) varies between roughly 1 and 2 times the base RTT 195 between the machines in question. Without the latter a 'Classic' 196 flow's response to changing events is delayed by a worst-case 197 (transcontinental) RTT, which could be hundreds of times the actual 198 smoothing delay needed for the RTT of typical traffic from localized 199 CDNs. 201 These changes are the two main features of the family of so-called 202 'Scalable' congestion controls (which includes DCTCP). Both these 203 changes only reduce delay in combination with a complementary change 204 in the network and they are both only feasible with ECN, not drop, 205 for the signalling: 207 1. The smaller sawteeth allow an extremely shallow ECN packet- 208 marking threshold in the queue. 210 2. And no smoothing in the network means that every fluctuation of 211 the queue is signalled immediately. 213 Without ECN, either of these would lead to very high loss levels. 214 But, with ECN, the resulting high marking levels are just signals, 215 not impairments. 217 However, until now, Scalable congestion controls (like DCTCP) did not 218 co-exist well in a shared ECN-capable queue with existing ECN-capable 219 TCP Reno [RFC5681] or Cubic [RFC8312] congestion controls --- 220 Scalable controls are so aggressive that these 'Classic' algorithms 221 would drive themselves to a small capacity share. Therefore, until 222 now, L4S controls could only be deployed where a clean-slate 223 environment could be arranged, such as in private data centres (hence 224 the name DCTCP). 226 This document specifies a `DualQ Coupled AQM' extension that solves 227 the problem of coexistence between Scalable and Classic flows, 228 without having to inspect flow identifiers. It is not like flow- 229 queuing approaches [RFC8290] that classify packets by flow identifier 230 into separate queues in order to isolate sparse flows from the higher 231 latency in the queues assigned to heavier flows. If a flow needs 232 both low delay and high throughput, having a queue to itself does not 233 isolate it from the harm it causes to itself. In contrast, DualQ 234 Coupled AQMs addresses the root cause of the latency problem --- they 235 are an enabler for the smooth low latency scalable behaviour of 236 Scalable congestion controls, so that every packet in every flow can 237 enjoy very low latency, then there is no need to isolate each flow 238 into a separate queue. 240 1.2. Scope 242 L4S involves complementary changes in the network and on end-systems: 244 Network: A DualQ Coupled AQM (defined in the present document) or a 245 modification to flow-queue AQMs (described in section 4.2.b of 246 [I-D.ietf-tsvwg-l4s-arch]); 248 End-system: A Scalable congestion control (defined in section 4 of 249 [I-D.ietf-tsvwg-ecn-l4s-id]). 251 Packet identifier: The network and end-system parts of L4S can be 252 deployed incrementally, because they both identify L4S packets 253 using the experimentally assigned explicit congestion notification 254 (ECN) codepoints in the IP header: ECT(1) and CE [RFC8311] 255 [I-D.ietf-tsvwg-ecn-l4s-id]. 257 Data Center TCP (DCTCP [RFC8257]) is an example of a Scalable 258 congestion control for controlled environments that has been deployed 259 for some time in Linux, Windows and FreeBSD operating systems. 260 During the progress of this document through the IETF a number of 261 other Scalable congestion controls were implemented, e.g. TCP 262 Prague [I-D.briscoe-iccrg-prague-congestion-control] [PragueLinux], 263 BBRv2 [BBRv2], QUIC Prague and the L4S variant of SCREAM for real- 264 time media [RFC8298]. 266 The focus of this specification is to enable deployment of the 267 network part of the L4S service. Then, without any management 268 intervention, applications can exploit this new network capability as 269 their operating systems migrate to Scalable congestion controls, 270 which can then evolve _while_ their benefits are being enjoyed by 271 everyone on the Internet. 273 The DualQ Coupled AQM framework can incorporate any AQM designed for 274 a single queue that generates a statistical or deterministic mark/ 275 drop probability driven by the queue dynamics. Pseudocode examples 276 of two different DualQ Coupled AQMs are given in the appendices. In 277 many cases the framework simplifies the basic control algorithm, and 278 requires little extra processing. Therefore it is believed the 279 Coupled AQM would be applicable and easy to deploy in all types of 280 buffers; buffers in cost-reduced mass-market residential equipment; 281 buffers in end-system stacks; buffers in carrier-scale equipment 282 including remote access servers, routers, firewalls and Ethernet 283 switches; buffers in network interface cards, buffers in virtualized 284 network appliances, hypervisors, and so on. 286 For the public Internet, nearly all the benefit will typically be 287 achieved by deploying the Coupled AQM into either end of the access 288 link between a 'site' and the Internet, which is invariably the 289 bottleneck (see section 6.4 of[I-D.ietf-tsvwg-l4s-arch] about 290 deployment, which also defines the term 'site' to mean a home, an 291 office, a campus or mobile user equipment). 293 Latency is not the only concern of L4S: 295 * The 'Low Loss" part of the name denotes that L4S generally 296 achieves zero congestion loss (which would otherwise cause 297 retransmission delays), due to its use of ECN. 299 * The "Scalable throughput" part of the name denotes that the per- 300 flow throughput of Scalable congestion controls should scale 301 indefinitely, avoiding the imminent scaling problems with 'TCP- 302 Friendly' congestion control algorithms [RFC3649]. 304 The former is clearly in scope of this AQM document. However, the 305 latter is an outcome of the end-system behaviour, and therefore 306 outside the scope of this AQM document, even though the AQM is an 307 enabler. 309 The overall L4S architecture [I-D.ietf-tsvwg-l4s-arch] gives more 310 detail, including on wider deployment aspects such as backwards 311 compatibility of Scalable congestion controls in bottlenecks where a 312 DualQ Coupled AQM has not been deployed. The supporting papers 313 [DualPI2Linux], [PI2] and [DCttH15] give the full rationale for the 314 AQM's design, both discursively and in more precise mathematical 315 form, as well as the results of performance evaluations. 317 1.3. Terminology 319 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 320 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 321 document are to be interpreted as described in [RFC2119] when, and 322 only when, they appear in all capitals, as shown here. 324 The DualQ Coupled AQM uses two queues for two services. Each of the 325 following terms identifies both the service and the queue that 326 provides the service: 328 Classic service/queue: The Classic service is intended for all the 329 congestion control behaviours that co-exist with Reno [RFC5681] 330 (e.g. Reno itself, Cubic [RFC8312], TFRC [RFC5348]). 332 Low-Latency, Low-Loss Scalable throughput (L4S) service/queue: The 333 'L4S' service is intended for traffic from scalable congestion 334 control algorithms, such as TCP Prague 335 [I-D.briscoe-iccrg-prague-congestion-control], which was derived 336 from Data Center TCP [RFC8257]. The L4S service is for more 337 general traffic than just TCP Prague--it allows the set of 338 congestion controls with similar scaling properties to Prague to 339 evolve, such as the examples listed earlier (Relentless, SCReAM, 340 etc.). 342 Classic Congestion Control: A congestion control behaviour that can 343 co-exist with standard TCP Reno [RFC5681] without causing 344 significantly negative impact on its flow rate [RFC5033]. With 345 Classic congestion controls, such as Reno or Cubic, because flow 346 rate has scaled since TCP congestion control was first designed in 347 1988, it now takes hundreds of round trips (and growing) to 348 recover after a congestion signal (whether a loss or an ECN mark) 349 as shown in the examples in section 5.1 of 350 [I-D.ietf-tsvwg-l4s-arch] and in [RFC3649]. Therefore control of 351 queuing and utilization becomes very slack, and the slightest 352 disturbances (e.g. from new flows starting) prevent a high rate 353 from being attained. 355 Scalable Congestion Control: A congestion control where the average 356 time from one congestion signal to the next (the recovery time) 357 remains invariant as the flow rate scales, all other factors being 358 equal. This maintains the same degree of control over queueing 359 and utilization whatever the flow rate, as well as ensuring that 360 high throughput is robust to disturbances. For instance, DCTCP 361 averages 2 congestion signals per round-trip whatever the flow 362 rate, as do other recently developed scalable congestion controls, 363 e.g. Relentless TCP [Mathis09], TCP Prague 364 [I-D.briscoe-iccrg-prague-congestion-control], [PragueLinux], 365 BBRv2 [BBRv2] and the L4S variant of SCREAM for real-time 366 media [SCReAM], [RFC8298]). For the public Internet a Scalable 367 transport has to comply with the requirements in Section 4 of 368 [I-D.ietf-tsvwg-ecn-l4s-id] (aka. the 'Prague L4S requirements'). 370 C: Abbreviation for Classic, e.g. when used as a subscript. 372 L: Abbreviation for L4S, e.g. when used as a subscript. 374 The terms Classic or L4S can also qualify other nouns, such as 375 'codepoint', 'identifier', 'classification', 'packet', 'flow'. 376 For example: an L4S packet means a packet with an L4S identifier 377 sent from an L4S congestion control. 379 Both Classic and L4S services can cope with a proportion of 380 unresponsive or less-responsive traffic as well, but in the L4S 381 case its rate has to be smooth enough or low enough not to build a 382 queue (e.g. DNS, VoIP, game sync datagrams, etc). The DualQ 383 Coupled AQM behaviour is defined to be similar to a single FIFO 384 queue with respect to unresponsive and overload traffic. 386 Reno-friendly: The subset of Classic traffic that is friendly to the 387 standard Reno congestion control defined for TCP in [RFC5681]. 388 Reno-friendly is used in place of 'TCP-friendly', given the latter 389 has become imprecise, because the TCP protocol is now used with so 390 many different congestion control behaviours, and Reno is used in 391 non-TCP transports such as QUIC. 393 Classic ECN: The original Explicit Congestion Notification (ECN) 394 protocol [RFC3168], which requires ECN signals to be treated the 395 same as drops, both when generated in the network and when 396 responded to by the sender. 398 For L4S, the names used for the four codepoints of the 2-bit IP- 399 ECN field are unchanged from those defined in [RFC3168]: Not ECT, 400 ECT(0), ECT(1) and CE, where ECT stands for ECN-Capable Transport 401 and CE stands for Congestion Experienced. A packet marked with 402 the CE codepoint is termed 'ECN-marked' or sometimes just 'marked' 403 where the context makes ECN obvious. 405 1.4. Features 407 The AQM couples marking and/or dropping from the Classic queue to the 408 L4S queue in such a way that a flow will get roughly the same 409 throughput whichever it uses. Therefore both queues can feed into 410 the full capacity of a link and no rates need to be configured for 411 the queues. The L4S queue enables Scalable congestion controls like 412 DCTCP or TCP Prague to give very low and predictably low latency, 413 without compromising the performance of competing 'Classic' Internet 414 traffic. 416 Thousands of tests have been conducted in a typical fixed residential 417 broadband setting. Experiments used a range of base round trip 418 delays up to 100ms and link rates up to 200 Mb/s between the data 419 centre and home network, with varying amounts of background traffic 420 in both queues. For every L4S packet, the AQM kept the average 421 queuing delay below 1ms (or 2 packets where serialization delay 422 exceeded 1ms on slower links), with 99th percentile no worse than 423 2ms. No losses at all were introduced by the L4S AQM. Details of 424 the extensive experiments are available [DualPI2Linux], [PI2], 425 [DCttH15]. 427 Subjective testing was also conducted by multiple people all 428 simultaneously using very demanding high bandwidth low latency 429 applications over a single shared access link [L4Sdemo16]. In one 430 application, each user could use finger gestures to pan or zoom their 431 own high definition (HD) sub-window of a larger video scene generated 432 on the fly in 'the cloud' from a football match. Another user 433 wearing VR goggles was remotely receiving a feed from a 360-degree 434 camera in a racing car, again with the sub-window in their field of 435 vision generated on the fly in 'the cloud' dependent on their head 436 movements. Even though other users were also downloading large 437 amounts of L4S and Classic data, playing a gaming benchmark and 438 watchings videos over the same 40Mb/s downstream broadband link, 439 latency was so low that the football picture appeared to stick to the 440 user's finger on the touch pad and the experience fed from the remote 441 camera did not noticeably lag head movements. All the L4S data (even 442 including the downloads) achieved the same very low latency. With an 443 alternative AQM, the video noticeably lagged behind the finger 444 gestures and head movements. 446 Unlike Diffserv Expedited Forwarding, the L4S queue does not have to 447 be limited to a small proportion of the link capacity in order to 448 achieve low delay. The L4S queue can be filled with a heavy load of 449 capacity-seeking flows (TCP Prague etc.) and still achieve low delay. 450 The L4S queue does not rely on the presence of other traffic in the 451 Classic queue that can be 'overtaken'. It gives low latency to L4S 452 traffic whether or not there is Classic traffic, and the latency of 453 Classic traffic does not suffer when a proportion of the traffic is 454 L4S. 456 The two queues are only necessary because: 458 * the large variations (sawteeth) of Classic flows need roughly a 459 base RTT of queuing delay to ensure full utilization 461 * Scalable flows do not need a queue to keep utilization high, but 462 they cannot keep latency predictably low if they are mixed with 463 Classic traffic, 465 The L4S queue has latency priority within sub-round trip timescales, 466 but over longer periods the coupling from the Classic to the L4S AQM 467 (explained below) ensures that it does not have bandwidth priority 468 over the Classic queue. 470 2. DualQ Coupled AQM 472 There are two main aspects to the approach: 474 * The Coupled AQM that addresses throughput equivalence between 475 Classic (e.g. Reno, Cubic) flows and L4S flows (that satisfy the 476 Prague L4S requirements). 478 * The Dual Queue structure that provides latency separation for L4S 479 flows to isolate them from the typically large Classic queue. 481 2.1. Coupled AQM 483 In the 1990s, the `TCP formula' was derived for the relationship 484 between the steady-state congestion window, cwnd, and the drop 485 probability, p of standard Reno congestion control [RFC5681] . To a 486 first order approximation, the steady-state cwnd of Reno is inversely 487 proportional to the square root of p. 489 The design focuses on Reno as the worst case, because if it does no 490 harm to Reno, it will not harm Cubic or any traffic designed to be 491 friendly to Reno. TCP Cubic implements a Reno-compatibility mode, 492 which is relevant for typical RTTs under 20ms as long as the 493 throughput of a single flow is less than about 700Mb/s. In such 494 cases it can be assumed that Cubic traffic behaves similarly to Reno 495 (but with a slightly different constant of proportionality). The 496 term 'Classic' will be used for the collection of Reno-friendly 497 traffic including Cubic and potentially other experimental congestion 498 controls intended not to significantly impact the flow rate of Reno. 500 A supporting paper [PI2] includes the derivation of the equivalent 501 rate equation for DCTCP, for which cwnd is inversely proportional to 502 p (not the square root), where in this case p is the ECN marking 503 probability. DCTCP is not the only congestion control that behaves 504 like this, so the term 'Scalable' will be used for all similar 505 congestion control behaviours (see examples in Section 1.2). The 506 term 'L4S' is used for traffic driven by a Scalable congestion 507 control that also complies with the additional 'Prague L4S' 508 requirements [I-D.ietf-tsvwg-ecn-l4s-id]. 510 For safe co-existence, under stationary conditions, a Scalable flow 511 has to run at roughly the same rate as a Reno TCP flow (all other 512 factors being equal). So the drop or marking probability for Classic 513 traffic, p_C has to be distinct from the marking probability for L4S 514 traffic, p_L. The original ECN specification [RFC3168] required 515 these probabilities to be the same, but [RFC8311] updates RFC 3168 to 516 enable experiments in which these probabilities are different. 518 Also, to remain stable, Classic sources need the network to smooth 519 p_C so it changes relatively slowly. It is hard for a network node 520 to know the RTTs of all the flows, so a Classic AQM adds a _worst- 521 case_ RTT of smoothing delay (about 100-200 ms). In contrast, L4S 522 shifts responsibility for smoothing ECN feedback to the sender, which 523 only delays its response by its _own_ RTT, as well as allowing a more 524 immediate response if necessary. 526 The Coupled AQM achieves safe coexistence by making the Classic drop 527 probability p_C proportional to the square of the coupled L4S 528 probability p_CL. p_CL is an input to the instantaneous L4S marking 529 probability p_L but it changes as slowly as p_C. This makes the Reno 530 flow rate roughly equal the DCTCP flow rate, because the squaring of 531 p_CL counterbalances the square root of p_C in the 'TCP formula' of 532 Classic Reno congestion control. 534 Stating this as a formula, the relation between Classic drop 535 probability, p_C, and the coupled L4S probability p_CL needs to take 536 the form: 538 p_C = ( p_CL / k )^2 (1) 540 where k is the constant of proportionality, which is termed the 541 coupling factor. 543 2.2. Dual Queue 545 Classic traffic needs to build a large queue to prevent under- 546 utilization. Therefore a separate queue is provided for L4S traffic, 547 and it is scheduled with priority over the Classic queue. Priority 548 is conditional to prevent starvation of Classic traffic. 550 Nonetheless, coupled marking ensures that giving priority to L4S 551 traffic still leaves the right amount of spare scheduling time for 552 Classic flows to each get equivalent throughput to DCTCP flows (all 553 other factors such as RTT being equal). 555 2.3. Traffic Classification 557 Both the Coupled AQM and DualQ mechanisms need an identifier to 558 distinguish L4S (L) and Classic (C) packets. Then the coupling 559 algorithm can achieve coexistence without having to inspect flow 560 identifiers, because it can apply the appropriate marking or dropping 561 probability to all flows of each type. A separate 562 specification [I-D.ietf-tsvwg-ecn-l4s-id] requires the network to 563 treat the ECT(1) and CE codepoints of the ECN field as this 564 identifier. An additional process document has proved necessary to 565 make the ECT(1) codepoint available for experimentation [RFC8311]. 567 For policy reasons, an operator might choose to steer certain packets 568 (e.g. from certain flows or with certain addresses) out of the L 569 queue, even though they identify themselves as L4S by their ECN 570 codepoints. In such cases, [I-D.ietf-tsvwg-ecn-l4s-id] says that the 571 device "MUST NOT alter the end-to-end L4S ECN identifier", so that it 572 is preserved end-to-end. The aim is that each operator can choose 573 how it treats L4S traffic locally, but an individual operator does 574 not alter the identification of L4S packets, which would prevent 575 other operators downstream from making their own choices on how to 576 treat L4S traffic. 578 In addition, an operator could use other identifiers to classify 579 certain additional packet types into the L queue that it deems will 580 not risk harm to the L4S service. For instance addresses of specific 581 applications or hosts (see [I-D.ietf-tsvwg-ecn-l4s-id]), specific 582 Diffserv codepoints such as EF (Expedited Forwarding) and Voice-Admit 583 service classes (see [I-D.briscoe-tsvwg-l4s-diffserv]), the Non- 584 Queue-Building (NQB) per-hop behaviour [I-D.ietf-tsvwg-nqb] or 585 certain protocols (e.g. ARP, DNS). Note that the mechanism only 586 reads these identifiers. [I-D.ietf-tsvwg-ecn-l4s-id] says it "MUST 587 NOT alter these non-ECN identifiers". Thus, the L queue is not 588 solely an L4S queue, it can be consider more generally as a low 589 latency queue. 591 2.4. Overall DualQ Coupled AQM Structure 593 Figure 1 shows the overall structure that any DualQ Coupled AQM is 594 likely to have. This schematic is intended to aid understanding of 595 the current designs of DualQ Coupled AQMs. However, it is not 596 intended to preclude other innovative ways of satisfying the 597 normative requirements in Section 2.5 that minimally define a DualQ 598 Coupled AQM. 600 The classifier on the left separates incoming traffic between the two 601 queues (L and C). Each queue has its own AQM that determines the 602 likelihood of marking or dropping (p_L and p_C). It has been 603 proved [PI2] that it is preferable to control load with a linear 604 controller, then square the output before applying it as a drop 605 probability to Reno-friendly traffic (because Reno congestion control 606 decreases its load proportional to the square-root of the increase in 607 drop). So, the AQM for Classic traffic needs to be implemented in 608 two stages: i) a base stage that outputs an internal probability p' 609 (pronounced p-prime); and ii) a squaring stage that outputs p_C, 610 where 612 p_C = (p')^2. (2) 614 Substituting for p_C in Eqn (1) gives: 616 p' = p_CL / k 618 So the slow-moving input to ECN marking in the L queue (the coupled 619 L4S probability) is: 621 p_CL = k*p'. (3) 623 The actual ECN marking probability p_L that is applied to the L queue 624 needs to track the immediate L queue delay under L-only congestion 625 conditions, as well as track p_CL under coupled congestion 626 conditions. So the L queue uses a native AQM that calculates a 627 probability p'_L as a function of the instantaneous L queue delay. 628 And, given the L queue has conditional priority over the C queue, 629 whenever the L queue grows, the AQM ought to apply marking 630 probability p'_L, but p_L ought not to fall below p_CL. This 631 suggests: 633 p_L = max(p'_L, p_CL), (4) 635 which has also been found to work very well in practice. 637 The two transformations of p' in equations (2) and (3) implement the 638 required coupling given in equation (1) earlier. 640 The constant of proportionality or coupling factor, k, in equation 641 (1) determines the ratio between the congestion probabilities (loss 642 or marking) experienced by L4S and Classic traffic. Thus k 643 indirectly determines the ratio between L4S and Classic flow rates, 644 because flows (assuming they are responsive) adjust their rate in 645 response to congestion probability. Appendix C.2 gives guidance on 646 the choice of k and its effect on relative flow rates. 648 _________ 649 | | ,------. 650 L4S queue | |===>| ECN | 651 ,'| _______|_| |marker|\ 652 <' | | `------'\\ 653 //`' v ^ p_L \\ 654 // ,-------. | \\ 655 // |Native |p'_L | \\,. 656 // | L4S |--->(MAX) < | ___ 657 ,----------.// | AQM | ^ p_CL `\|.'Cond-`. 658 | IP-ECN |/ `-------' | / itional \ 659 ==>|Classifier| ,-------. (k*p') [ priority]==> 660 | |\ | Base | | \scheduler/ 661 `----------'\\ | AQM |---->: ,'|`-.___.-' 662 \\ | |p' | <' | 663 \\ `-------' (p'^2) //`' 664 \\ ^ | // 665 \\,. | v p_C // 666 < | _________ .------.// 667 `\| | | | Drop |/ 668 Classic |queue |===>|/mark | 669 __|______| `------' 671 Figure 1: DualQ Coupled AQM Schematic 673 Legend: ===> traffic flow; ---> control dependency. 675 After the AQMs have applied their dropping or marking, the scheduler 676 forwards their packets to the link. Even though the scheduler gives 677 priority to the L queue, it is not as strong as the coupling from the 678 C queue. This is because, as the C queue grows, the base AQM applies 679 more congestion signals to L traffic (as well as C). As L flows 680 reduce their rate in response, they use less than the scheduling 681 share for L traffic. So, because the scheduler is work preserving, 682 it schedules any C traffic in the gaps. 684 Giving priority to the L queue has the benefit of very low L queue 685 delay, because the L queue is kept empty whenever L traffic is 686 controlled by the coupling. Also there only has to be a coupling in 687 one direction - from Classic to L4S. Priority has to be conditional 688 in some way to prevent the C queue starving under overload conditions 689 (see Section 4.1). With normal responsive traffic simple strict 690 priority would work, but it would make new Classic traffic wait until 691 its queue activated the coupling and L4S flows had in turn reduced 692 their rate enough to drain the L queue so that Classic traffic could 693 be scheduled. Giving a small weight or limited waiting time for C 694 traffic improves response times for short Classic messages, such as 695 DNS requests and improves Classic flow startup because immediate 696 capacity is available. 698 Example DualQ Coupled AQM algorithms called DualPI2 and Curvy RED are 699 given in Appendix A and Appendix B. Either example AQM can be used 700 to couple packet marking and dropping across a dual Q. 702 DualPI2 uses a Proportional-Integral (PI) controller as the Base AQM. 703 Indeed, this Base AQM with just the squared output and no L4S queue 704 can be used as a drop-in replacement for PIE [RFC8033], in which case 705 it is just called PI2 [PI2]. PI2 is a principled simplification of 706 PIE that is both more responsive and more stable in the face of 707 dynamically varying load. 709 Curvy RED is derived from RED [RFC2309], but its configuration 710 parameters are insensitive to link rate and it requires less 711 operations per packet. However, DualPI2 is more responsive and 712 stable over a wider range of RTTs than Curvy RED. As a consequence, 713 at the time of writing, DualPI2 has attracted more development and 714 evaluation attention than Curvy RED, leaving the Curvy RED design 715 incomplete and not so fully evaluated. 717 Both AQMs regulate their queue in units of time rather than bytes. 718 As already explained, this ensures configuration can be invariant for 719 different drain rates. With AQMs in a dualQ structure this is 720 particularly important because the drain rate of each queue can vary 721 rapidly as flows for the two queues arrive and depart, even if the 722 combined link rate is constant. 724 It would be possible to control the queues with other alternative 725 AQMs, as long as the normative requirements (those expressed in 726 capitals) in Section 2.5 are observed. 728 2.5. Normative Requirements for a DualQ Coupled AQM 730 The following requirements are intended to capture only the essential 731 aspects of a DualQ Coupled AQM. They are intended to be independent 732 of the particular AQMs used for each queue. 734 2.5.1. Functional Requirements 736 A Dual Queue Coupled AQM implementation MUST comply with the 737 prerequisite L4S behaviours for any L4S network node (not just a 738 DualQ) as specified in section 5 of [I-D.ietf-tsvwg-ecn-l4s-id]. 739 These primarily concern classification and remarking as briefly 740 summarized in Section 2.3 earlier. But there is also a subsection 741 (5.5) giving guidance on reducing the burstiness of the link 742 technology underlying any L4S AQM. 744 A Dual Queue Coupled AQM implementation MUST utilize two queues, each 745 with an AQM algorithm. The two queues can be part of a larger 746 queuing hierarchy [I-D.briscoe-tsvwg-l4s-diffserv]. 748 The AQM algorithm for the low latency (L) queue MUST be able to apply 749 ECN marking to ECN-capable packets. 751 The scheduler draining the two queues MUST give L4S packets priority 752 over Classic, although priority MUST be bounded in order not to 753 starve Classic traffic. The scheduler SHOULD be work-conserving. 755 [I-D.ietf-tsvwg-ecn-l4s-id] defines the meaning of an ECN marking on 756 L4S traffic, relative to drop of Classic traffic. In order to ensure 757 coexistence of Classic and Scalable L4S traffic, it says, "The 758 likelihood that an AQM drops a Not-ECT Classic packet (p_C) MUST be 759 roughly proportional to the square of the likelihood that it would 760 have marked it if it had been an L4S packet (p_L)." The term 761 'likelihood' is used to allow for marking and dropping to be either 762 probabilistic or deterministic. 764 For the current specification, this translates into the following 765 requirement. A DualQ Coupled AQM MUST apply ECN marking to traffic 766 in the L queue that is no lower than that derived from the likelihood 767 of drop (or ECN marking) in the Classic queue using Eqn. (1). 769 The constant of proportionality, k, in Eqn (1) determines the 770 relative flow rates of Classic and L4S flows when the AQM concerned 771 is the bottleneck (all other factors being equal). 772 [I-D.ietf-tsvwg-ecn-l4s-id] says, "The constant of proportionality 773 (k) does not have to be standardised for interoperability, but a 774 value of 2 is RECOMMENDED." 775 Assuming Scalable congestion controls for the Internet will be as 776 aggressive as DCTCP, this will ensure their congestion window will be 777 roughly the same as that of a standards track TCP Reno congestion 778 control (Reno) [RFC5681] and other Reno-friendly controls, such as 779 TCP Cubic in its Reno-compatibility mode. 781 The choice of k is a matter of operator policy, and operators MAY 782 choose a different value using Table 1 and the guidelines in 783 Appendix C.2. 785 If multiple customers or users share capacity at a bottleneck 786 (e.g. in the Internet access link of a campus network), the 787 operator's choice of k will determine capacity sharing between the 788 flows of different customers. However, on the public Internet, 789 access network operators typically isolate customers from each other 790 with some form of layer-2 multiplexing (OFDM(A) in DOCSIS3.1, CDMA in 791 3G, SC-FDMA in LTE) or L3 scheduling (WRR in DSL), rather than 792 relying on host congestion controls to share capacity between 793 customers [RFC0970]. In such cases, the choice of k will solely 794 affect relative flow rates within each customer's access capacity, 795 not between customers. Also, k will not affect relative flow rates 796 at any times when all flows are Classic or all flows are L4S, and it 797 will not affect the relative throughput of small flows. 799 2.5.1.1. Requirements in Unexpected Cases 801 The flexibility to allow operator-specific classifiers (Section 2.3) 802 leads to the need to specify what the AQM in each queue ought to do 803 with packets that do not carry the ECN field expected for that queue. 804 It is expected that the AQM in each queue will inspect the ECN field 805 to determine what sort of congestion notification to signal, then it 806 will decide whether to apply congestion notification to this 807 particular packet, as follows: 809 * If a packet that does not carry an ECT(1) or CE codepoint is 810 classified into the L queue: 812 - if the packet is ECT(0), the L AQM SHOULD apply CE-marking 813 using a probability appropriate to Classic congestion control 814 and appropriate to the target delay in the L queue 816 - if the packet is Not-ECT, the appropriate action depends on 817 whether some other function is protecting the L queue from 818 misbehaving flows (e.g. per-flow queue 819 protection [I-D.briscoe-docsis-q-protection] or latency 820 policing): 822 o If separate queue protection is provided, the L AQM SHOULD 823 ignore the packet and forward it unchanged, meaning it 824 should not calculate whether to apply congestion 825 notification and it should neither drop nor CE-mark the 826 packet (for instance, the operator might classify EF traffic 827 that is unresponsive to drop into the L queue, alongside 828 responsive L4S-ECN traffic) 830 o if separate queue protection is not provided, the L AQM 831 SHOULD apply drop using a drop probability appropriate to 832 Classic congestion control and appropriate to the target 833 delay in the L queue 835 * If a packet that carries an ECT(1) codepoint is classified into 836 the C queue: 838 - the C AQM SHOULD apply CE-marking using the coupled AQM 839 probability p_CL (= k*p'). 841 The above requirements are worded as "SHOULDs", because operator- 842 specific classifiers are for flexibility, by definition. Therefore, 843 alternative actions might be appropriate in the operator's specific 844 circumstances. An example would be where the operator knows that 845 certain legacy traffic marked with one codepoint actually has a 846 congestion response associated with another codepoint. 848 If the DualQ Coupled AQM has detected overload, it MUST begin using 849 Classic drop, and continue until the overload episode has subsided. 850 Switching to drop if ECN marking is persistently high is required by 851 Section 7 of [RFC3168] and Section 4.2.1 of [RFC7567]. 853 2.5.2. Management Requirements 855 2.5.2.1. Configuration 857 By default, a DualQ Coupled AQM SHOULD NOT need any configuration for 858 use at a bottleneck on the public Internet [RFC7567]. The following 859 parameters MAY be operator-configurable, e.g. to tune for non- 860 Internet settings: 862 * Optional packet classifier(s) to use in addition to the ECN field 863 (see Section 2.3); 865 * Expected typical RTT, which can be used to determine the queuing 866 delay of the Classic AQM at its operating point, in order to 867 prevent typical lone flows from under-utilizing capacity. For 868 example: 870 - for the PI2 algorithm (Appendix A) the queuing delay target is 871 dependent on the typical RTT; 873 - for the Curvy RED algorithm (Appendix B) the queuing delay at 874 the desired operating point of the curvy ramp is configured to 875 encompass a typical RTT; 877 - if another Classic AQM was used, it would be likely to need an 878 operating point for the queue based on the typical RTT, and if 879 so it SHOULD be expressed in units of time. 881 An operating point that is manually calculated might be directly 882 configurable instead, e.g. for links with large numbers of flows 883 where under-utilization by a single flow would be unlikely. 885 * Expected maximum RTT, which can be used to set the stability 886 parameter(s) of the Classic AQM. For example: 888 - for the PI2 algorithm (Appendix A), the gain parameters of the 889 PI algorithm depend on the maximum RTT. 891 - for the Curvy RED algorithm (Appendix B) the smoothing 892 parameter is chosen to filter out transients in the queue 893 within a maximum RTT. 895 Stability parameter(s) that are manually calculated assuming a 896 maximum RTT might be directly configurable instead. 898 * Coupling factor, k (see Appendix C.2); 900 * A limit to the conditional priority of L4S. This is scheduler- 901 dependent, but it SHOULD be expressed as a relation between the 902 max delay of a C packet and an L packet. For example: 904 - for a WRR scheduler a weight ratio between L and C of w:1 means 905 that the maximum delay to a C packet is w times that of an L 906 packet. 908 - for a time-shifted FIFO (TS-FIFO) scheduler (see Section 4.1.1) 909 a time-shift of tshift means that the maximum delay to a C 910 packet is tshift greater than that of an L packet. tshift could 911 be expressed as a multiple of the typical RTT rather than as an 912 absolute delay. 914 * The maximum Classic ECN marking probability, p_Cmax, before 915 switching over to drop. 917 2.5.2.2. Monitoring 919 An experimental DualQ Coupled AQM SHOULD allow the operator to 920 monitor each of the following operational statistics on demand, per 921 queue and per configurable sample interval, for performance 922 monitoring and perhaps also for accounting in some cases: 924 * Bits forwarded, from which utilization can be calculated; 926 * Total packets in the three categories: arrived, presented to the 927 AQM, and forwarded. The difference between the first two will 928 measure any non-AQM tail discard. The difference between the last 929 two will measure proactive AQM discard; 931 * ECN packets marked, non-ECN packets dropped, ECN packets dropped, 932 which can be combined with the three total packet counts above to 933 calculate marking and dropping probabilities; 935 * Queue delay (not including serialization delay of the head packet 936 or medium acquisition delay) - see further notes below. 938 Unlike the other statistics, queue delay cannot be captured in a 939 simple accumulating counter. Therefore the type of queue delay 940 statistics produced (mean, percentiles, etc.) will depend on 941 implementation constraints. To facilitate comparative evaluation 942 of different implementations and approaches, an implementation 943 SHOULD allow mean and 99th percentile queue delay to be derived 944 (per queue per sample interval). A relatively simple way to do 945 this would be to store a coarse-grained histogram of queue delay. 946 This could be done with a small number of bins with configurable 947 edges that represent contiguous ranges of queue delay. Then, over 948 a sample interval, each bin would accumulate a count of the number 949 of packets that had fallen within each range. The maximum queue 950 delay per queue per interval MAY also be recorded. 952 2.5.2.3. Anomaly Detection 954 An experimental DualQ Coupled AQM SHOULD asynchronously report the 955 following data about anomalous conditions: 957 * Start-time and duration of overload state. 959 A hysteresis mechanism SHOULD be used to prevent flapping in and 960 out of overload causing an event storm. For instance, exit from 961 overload state could trigger one report, but also latch a timer. 962 Then, during that time, if the AQM enters and exits overload state 963 any number of times, the duration in overload state is accumulated 964 but no new report is generated until the first time the AQM is out 965 of overload once the timer has expired. 967 2.5.2.4. Deployment, Coexistence and Scaling 969 [RFC5706] suggests that deployment, coexistence and scaling should 970 also be covered as management requirements. The raison d'etre of the 971 DualQ Coupled AQM is to enable deployment and coexistence of Scalable 972 congestion controls - as incremental replacements for today's Reno- 973 friendly controls that do not scale with bandwidth-delay product. 974 Therefore there is no need to repeat these motivating issues here 975 given they are already explained in the Introduction and detailed in 976 the L4S architecture [I-D.ietf-tsvwg-l4s-arch]. 978 The descriptions of specific DualQ Coupled AQM algorithms in the 979 appendices cover scaling of their configuration parameters, e.g. with 980 respect to RTT and sampling frequency. 982 3. IANA Considerations (to be removed by RFC Editor) 984 This specification contains no IANA considerations. 986 4. Security Considerations 988 4.1. Overload Handling 990 Where the interests of users or flows might conflict, it could be 991 necessary to police traffic to isolate any harm to the performance of 992 individual flows. However it is hard to avoid unintended side- 993 effects with policing, and in a trusted environment policing is not 994 necessary. Therefore per-flow policing 995 (e.g. [I-D.briscoe-docsis-q-protection]) needs to be separable from a 996 basic AQM, as an option under policy control. 998 However, a basic DualQ AQM does at least need to handle overload. A 999 useful objective would be for the overload behaviour of the DualQ AQM 1000 to be at least no worse than a single queue AQM. However, a trade- 1001 off needs to be made between complexity and the risk of either 1002 traffic class harming the other. In each of the following three 1003 subsections, an overload issue specific to the DualQ is described, 1004 followed by proposed solution(s). 1006 Under overload the higher priority L4S service will have to sacrifice 1007 some aspect of its performance. Alternative solutions are provided 1008 below that each relax a different factor: e.g. throughput, delay, 1009 drop. These choices need to be made either by the developer or by 1010 operator policy, rather than by the IETF. 1012 4.1.1. Avoiding Classic Starvation: Sacrifice L4S Throughput or Delay? 1014 Priority of L4S is required to be conditional to avoid total 1015 starvation of Classic by heavy L4S traffic. This raises the question 1016 of whether to sacrifice L4S throughput or L4S delay (or some other 1017 policy) to mitigate starvation of Classic: 1019 Sacrifice L4S throughput: By using weighted round robin as the 1020 conditional priority scheduler, the L4S service can sacrifice some 1021 throughput during overload. This can either be thought of as 1022 guaranteeing a minimum throughput service for Classic traffic, or 1023 as guaranteeing a maximum delay for a packet at the head of the 1024 Classic queue. 1026 The scheduling weight of the Classic queue should be small 1027 (e.g. 1/16). Then, in most traffic scenarios the scheduler will 1028 not interfere and it will not need to - the coupling mechanism and 1029 the end-systems will share out the capacity across both queues as 1030 if it were a single pool. However, because the congestion 1031 coupling only applies in one direction (from C to L), if L4S 1032 traffic is over-aggressive or unresponsive, the scheduler weight 1033 for Classic traffic will at least be large enough to ensure it 1034 does not starve. 1036 In cases where the ratio of L4S to Classic flows (e.g. 19:1) is 1037 greater than the ratio of their scheduler weights (e.g. 15:1), the 1038 L4S flows will get less than an equal share of the capacity, but 1039 only slightly. For instance, with the example numbers given, each 1040 L4S flow will get (15/16)/19 = 4.9% when ideally each would get 1041 1/20=5%. In the rather specific case of an unresponsive flow 1042 taking up just less than the capacity set aside for L4S 1043 (e.g. 14/16 in the above example), using WRR could significantly 1044 reduce the capacity left for any responsive L4S flows. 1046 The scheduling weight of the Classic queue should not be too 1047 small, otherwise a C packet at the head of the queue could be 1048 excessively delayed by a continually busy L queue. For instance 1049 if the Classic weight is 1/16, the maximum that a Classic packet 1050 at the head of the queue can be delayed by L traffic is the 1051 serialization delay of 15 MTU-sized packets. 1053 Sacrifice L4S Delay: To control milder overload of responsive 1054 traffic, particularly when close to the maximum congestion signal, 1055 the operator could choose to control overload of the Classic queue 1056 by allowing some delay to 'leak' across to the L4S queue. The 1057 scheduler can be made to behave like a single First-In First-Out 1058 (FIFO) queue with different service times by implementing a very 1059 simple conditional priority scheduler that could be called a 1060 "time-shifted FIFO" (see the Modifier Earliest Deadline First 1061 (MEDF) scheduler of [MEDF]). This scheduler adds tshift to the 1062 queue delay of the next L4S packet, before comparing it with the 1063 queue delay of the next Classic packet, then it selects the packet 1064 with the greater adjusted queue delay. Under regular conditions, 1065 this time-shifted FIFO scheduler behaves just like a strict 1066 priority scheduler. But under moderate or high overload it 1067 prevents starvation of the Classic queue, because the time-shift 1068 (tshift) defines the maximum extra queuing delay of Classic 1069 packets relative to L4S. 1071 The example implementations in Appendix A and Appendix B could both 1072 be implemented with either policy. 1074 4.1.2. Congestion Signal Saturation: Introduce L4S Drop or Delay? 1076 To keep the throughput of both L4S and Classic flows roughly equal 1077 over the full load range, a different control strategy needs to be 1078 defined above the point where one AQM first saturates to a 1079 probability of 100% leaving no room to push back the load any harder. 1080 If k>1, L4S will saturate first, even though saturation could be 1081 caused by unresponsive traffic in either queue. 1083 The term 'unresponsive' includes cases where a flow becomes 1084 temporarily unresponsive, for instance, a real-time flow that takes a 1085 while to adapt its rate in response to congestion, or a standard Reno 1086 flow that is normally responsive, but above a certain congestion 1087 level it will not be able to reduce its congestion window below the 1088 allowed minimum of 2 segments [RFC5681], effectively becoming 1089 unresponsive. (Note that L4S traffic ought to remain responsive 1090 below a window of 2 segments (see [I-D.ietf-tsvwg-ecn-l4s-id]). 1092 Saturation raises the question of whether to relieve congestion by 1093 introducing some drop into the L4S queue or by allowing delay to grow 1094 in both queues (which could eventually lead to tail drop too): 1096 Drop on Saturation: Saturation can be avoided by setting a maximum 1097 threshold for L4S ECN marking (assuming k>1) before saturation 1098 starts to make the flow rates of the different traffic types 1099 diverge. Above that the drop probability of Classic traffic is 1100 applied to all packets of all traffic types. Then experiments 1101 have shown that queueing delay can be kept at the target in any 1102 overload situation, including with unresponsive traffic, and no 1103 further measures are required [DualQ-Test]. 1105 Delay on Saturation: When L4S marking saturates, instead of 1106 switching to drop, the drop and marking probabilities could be 1107 capped. Beyond that, delay will grow either solely in the queue 1108 with unresponsive traffic (if WRR is used), or in both queues (if 1109 time-shifted FIFO is used). In either case, the higher delay 1110 ought to control temporary high congestion. If the overload is 1111 more persistent, eventually the combined DualQ will overflow and 1112 tail drop will control congestion. 1114 The example implementation in Appendix A solely applies the "drop on 1115 saturation" policy. The DOCSIS specification of a DualQ Coupled 1116 AQM [DOCSIS3.1] also implements the 'drop on saturation' policy with 1117 a very shallow L buffer. However, the addition of DOCSIS per-flow 1118 Queue Protection [I-D.briscoe-docsis-q-protection] turns this into 1119 'delay on saturation' by redirecting some packets of the flow(s) most 1120 responsible for L queue overload into the C queue, which has a higher 1121 delay target. If overload continues, this again becomes 'drop on 1122 saturation' as the level of drop in the C queue rises to maintain the 1123 target delay of the C queue. 1125 4.1.3. Protecting against Unresponsive ECN-Capable Traffic 1127 Unresponsive traffic has a greater advantage if it is also ECN- 1128 capable. The advantage is undetectable at normal low levels of drop/ 1129 marking, but it becomes significant with the higher levels of drop/ 1130 marking typical during overload. This is an issue whether the ECN- 1131 capable traffic is L4S or Classic. 1133 This raises the question of whether and when to switch off ECN 1134 marking and use solely drop instead, as required by both Section 7 of 1135 [RFC3168] and Section 4.2.1 of [RFC7567]. 1137 Experiments with the DualPI2 AQM (Appendix A) have shown that 1138 introducing 'drop on saturation' at 100% L4S marking addresses this 1139 problem with unresponsive ECN as well as addressing the saturation 1140 problem. It leaves only a small range of congestion levels where 1141 unresponsive traffic gains any advantage from using the ECN 1142 capability, and the advantage is hardly detectable [DualQ-Test]. 1144 5. Acknowledgements 1146 Thanks to Anil Agarwal, Sowmini Varadhan's, Gabi Bracha, Nicolas 1147 Kuhn, Greg Skinner, Tom Henderson and David Pullen for detailed 1148 review comments particularly of the appendices and suggestions on how 1149 to make the explanations clearer. Thanks also to Tom Henderson for 1150 insights on the choice of schedulers and queue delay measurement 1151 techniques. 1153 The early contributions of Koen De Schepper, Bob Briscoe, Olga 1154 Bondarenko and Inton Tsang were part-funded by the European Community 1155 under its Seventh Framework Programme through the Reducing Internet 1156 Transport Latency (RITE) project (ICT-317700). Bob Briscoe's 1157 contribution was also part-funded by the Comcast Innovation Fund and 1158 the Research Council of Norway through the TimeIn project. The views 1159 expressed here are solely those of the authors. 1161 6. Contributors 1163 The following contributed implementations and evaluations that 1164 validated and helped to improve this specification: 1166 Olga Albisser of Simula Research Lab, Norway 1167 (Olga Bondarenko during early drafts) implemented the prototype 1168 DualPI2 AQM for Linux with Koen De Schepper and conducted 1169 extensive evaluations as well as implementing the live performance 1170 visualization GUI [L4Sdemo16]. 1172 Olivier Tilmans of Nokia 1173 Bell Labs, Belgium prepared and maintains the Linux implementation 1174 of DualPI2 for upstreaming. 1176 Shravya K.S. wrote a model for the ns-3 simulator based on the -01 1177 version of this Internet-Draft. Based on this initial work, Tom 1178 Henderson updated that earlier model and created a 1179 model for the DualQ variant specified as part of the Low Latency 1180 DOCSIS specification, as well as conducting extensive evaluations. 1182 Ing Jyh (Inton) Tsang of Nokia, Belgium built the End-to-End Data 1183 Centre to the Home broadband testbed on which DualQ Coupled AQM 1184 implementations were tested. 1186 7. References 1188 7.1. Normative References 1190 [I-D.ietf-tsvwg-ecn-l4s-id] 1191 Schepper, K. D. and B. Briscoe, "Explicit Congestion 1192 Notification (ECN) Protocol for Very Low Queuing Delay 1193 (L4S)", Work in Progress, Internet-Draft, draft-ietf- 1194 tsvwg-ecn-l4s-id-19, 26 July 2021, 1195 . 1198 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1199 Requirement Levels", BCP 14, RFC 2119, 1200 DOI 10.17487/RFC2119, March 1997, 1201 . 1203 [RFC3168] Ramakrishnan, K., Floyd, S., and D. Black, "The Addition 1204 of Explicit Congestion Notification (ECN) to IP", 1205 RFC 3168, DOI 10.17487/RFC3168, September 2001, 1206 . 1208 [RFC8311] Black, D., "Relaxing Restrictions on Explicit Congestion 1209 Notification (ECN) Experimentation", RFC 8311, 1210 DOI 10.17487/RFC8311, January 2018, 1211 . 1213 7.2. Informative References 1215 [Alizadeh-stability] 1216 Alizadeh, M., Javanmard, A., and B. Prabhakar, "Analysis 1217 of DCTCP: Stability, Convergence, and Fairness", ACM 1218 SIGMETRICS 2011 , June 2011, 1219 . 1221 [AQMmetrics] 1222 Kwon, M. and S. Fahmy, "A Comparison of Load-based and 1223 Queue- based Active Queue Management Algorithms", Proc. 1224 Int'l Soc. for Optical Engineering (SPIE) 4866:35--46 DOI: 1225 10.1117/12.473021, 2002, 1226 . 1228 [ARED01] Floyd, S., Gummadi, R., and S. Shenker, "Adaptive RED: An 1229 Algorithm for Increasing the Robustness of RED's Active 1230 Queue Management", ACIRI Technical Report , August 2001, 1231 . 1233 [BBRv1] Cardwell, N., Cheng, Y., Hassas Yeganeh, S., and V. 1234 Jacobson, "BBR Congestion Control", Internet Draft draft- 1235 cardwell-iccrg-bbr-congestion-control-00, July 2017, 1236 . 1239 [BBRv2] Cardwell, N., "BRTCP BBR v2 Alpha/Preview Release", github 1240 repository; Linux congestion control module, 1241 . 1243 [CCcensus19] 1244 Mishra, A., Sun, X., Jain, A., Pande, S., Joshi, R., and 1245 B. Leong, "The Great Internet TCP Congestion Control 1246 Census", Proc. ACM on Measurement and Analysis of 1247 Computing Systems 3(3), December 2019, 1248 . 1250 [CoDel] Nichols, K. and V. Jacobson, "Controlling Queue Delay", 1251 ACM Queue 10(5), May 2012, 1252 . 1254 [CRED_Insights] 1255 Briscoe, B., "Insights from Curvy RED (Random Early 1256 Detection)", BT Technical Report TR-TUB8-2015-003 1257 arXiv:1904.07339 [cs.NI], July 2015, 1258 . 1260 [DCttH15] De Schepper, K., Bondarenko, O., Briscoe, B., and I. 1261 Tsang, "`Data Centre to the Home': Ultra-Low Latency for 1262 All", RITE project Technical Report , 2015, 1263 . 1265 [DOCSIS3.1] 1266 CableLabs, "MAC and Upper Layer Protocols Interface 1267 (MULPI) Specification, CM-SP-MULPIv3.1", Data-Over-Cable 1268 Service Interface Specifications DOCSIS® 3.1 Version i17 1269 or later, 21 January 2019, . 1272 [DualPI2Linux] 1273 Albisser, O., De Schepper, K., Briscoe, B., Tilmans, O., 1274 and H. Steen, "DUALPI2 - Low Latency, Low Loss and 1275 Scalable (L4S) AQM", Proc. Linux Netdev 0x13 , March 2019, 1276 . 1279 [DualQ-Test] 1280 Steen, H., "Destruction Testing: Ultra-Low Delay using 1281 Dual Queue Coupled Active Queue Management", Masters 1282 Thesis, Dept of Informatics, Uni Oslo , May 2017, 1283 . 1286 [I-D.briscoe-docsis-q-protection] 1287 Briscoe, B. and G. White, "Queue Protection to Preserve 1288 Low Latency", Work in Progress, Internet-Draft, draft- 1289 briscoe-docsis-q-protection-00, 8 July 2019, 1290 . 1293 [I-D.briscoe-iccrg-prague-congestion-control] 1294 Schepper, K. D., Tilmans, O., and B. Briscoe, "Prague 1295 Congestion Control", Work in Progress, Internet-Draft, 1296 draft-briscoe-iccrg-prague-congestion-control-00, 9 March 1297 2021, . 1300 [I-D.briscoe-tsvwg-l4s-diffserv] 1301 Briscoe, B., "Interactions between Low Latency, Low Loss, 1302 Scalable Throughput (L4S) and Differentiated Services", 1303 Work in Progress, Internet-Draft, draft-briscoe-tsvwg-l4s- 1304 diffserv-02, 4 November 2018, 1305 . 1308 [I-D.cardwell-iccrg-bbr-congestion-control] 1309 Cardwell, N., Cheng, Y., Yeganeh, S. H., and V. Jacobson, 1310 "BBR Congestion Control", Work in Progress, Internet- 1311 Draft, draft-cardwell-iccrg-bbr-congestion-control-00, 3 1312 July 2017, . 1315 [I-D.ietf-tsvwg-l4s-arch] 1316 Briscoe, B., Schepper, K. D., Bagnulo, M., and G. White, 1317 "Low Latency, Low Loss, Scalable Throughput (L4S) Internet 1318 Service: Architecture", Work in Progress, Internet-Draft, 1319 draft-ietf-tsvwg-l4s-arch-10, 1 July 2021, 1320 . 1323 [I-D.ietf-tsvwg-nqb] 1324 White, G. and T. Fossati, "A Non-Queue-Building Per-Hop 1325 Behavior (NQB PHB) for Differentiated Services", Work in 1326 Progress, Internet-Draft, draft-ietf-tsvwg-nqb-07, 28 July 1327 2021, . 1330 [L4Sdemo16] 1331 Bondarenko, O., De Schepper, K., Tsang, I., and B. 1332 Briscoe, "Ultra-Low Delay for All: Live Experience, Live 1333 Analysis", Proc. MMSYS'16 pp33:1--33:4, May 2016, 1334 . 1338 [Labovitz10] 1339 Labovitz, C., Iekel-Johnson, S., McPherson, D., Oberheide, 1340 J., and F. Jahanian, "Internet Inter-Domain Traffic", Proc 1341 ACM SIGCOMM; ACM CCR 40(4):75--86, August 2010, 1342 . 1344 [LLD] White, G., Sundaresan, K., and B. Briscoe, "Low Latency 1345 DOCSIS: Technology Overview", CableLabs White Paper , 1346 February 2019, . 1349 [Mathis09] Mathis, M., "Relentless Congestion Control", PFLDNeT'09 , 1350 May 2009, . 1353 [MEDF] Menth, M., Schmid, M., Heiss, H., and T. Reim, "MEDF - a 1354 simple scheduling algorithm for two real-time transport 1355 service classes with application in the UTRAN", Proc. IEEE 1356 Conference on Computer Communications (INFOCOM'03) Vol.2 1357 pp.1116-1122, March 2003, 1358 . 1360 [PI2] De Schepper, K., Bondarenko, O., Briscoe, B., and I. 1361 Tsang, "PI2: A Linearized AQM for both Classic and 1362 Scalable TCP", ACM CoNEXT'16 , December 2016, 1363 . 1366 [PI2param] Briscoe, B., "PI2 Parameters", Technical Report TR-BB- 1367 2021-001 arXiv:2107.01003 [cs.NI], July 2021, 1368 . 1370 [PragueLinux] 1371 Briscoe, B., De Schepper, K., Albisser, O., Misund, J., 1372 Tilmans, O., Kühlewind, M., and A.S. Ahmed, "Implementing 1373 the `TCP Prague' Requirements for Low Latency Low Loss 1374 Scalable Throughput (L4S)", Proc. Linux Netdev 0x13 , 1375 March 2019, . 1378 [RFC0970] Nagle, J., "On Packet Switches With Infinite Storage", 1379 RFC 970, DOI 10.17487/RFC0970, December 1985, 1380 . 1382 [RFC2309] Braden, B., Clark, D., Crowcroft, J., Davie, B., Deering, 1383 S., Estrin, D., Floyd, S., Jacobson, V., Minshall, G., 1384 Partridge, C., Peterson, L., Ramakrishnan, K., Shenker, 1385 S., Wroclawski, J., and L. Zhang, "Recommendations on 1386 Queue Management and Congestion Avoidance in the 1387 Internet", RFC 2309, DOI 10.17487/RFC2309, April 1998, 1388 . 1390 [RFC3246] Davie, B., Charny, A., Bennet, J.C.R., Benson, K., Le 1391 Boudec, J.Y., Courtney, W., Davari, S., Firoiu, V., and D. 1392 Stiliadis, "An Expedited Forwarding PHB (Per-Hop 1393 Behavior)", RFC 3246, DOI 10.17487/RFC3246, March 2002, 1394 . 1396 [RFC3649] Floyd, S., "HighSpeed TCP for Large Congestion Windows", 1397 RFC 3649, DOI 10.17487/RFC3649, December 2003, 1398 . 1400 [RFC5033] Floyd, S. and M. Allman, "Specifying New Congestion 1401 Control Algorithms", BCP 133, RFC 5033, 1402 DOI 10.17487/RFC5033, August 2007, 1403 . 1405 [RFC5348] Floyd, S., Handley, M., Padhye, J., and J. Widmer, "TCP 1406 Friendly Rate Control (TFRC): Protocol Specification", 1407 RFC 5348, DOI 10.17487/RFC5348, September 2008, 1408 . 1410 [RFC5681] Allman, M., Paxson, V., and E. Blanton, "TCP Congestion 1411 Control", RFC 5681, DOI 10.17487/RFC5681, September 2009, 1412 . 1414 [RFC5706] Harrington, D., "Guidelines for Considering Operations and 1415 Management of New Protocols and Protocol Extensions", 1416 RFC 5706, DOI 10.17487/RFC5706, November 2009, 1417 . 1419 [RFC7567] Baker, F., Ed. and G. Fairhurst, Ed., "IETF 1420 Recommendations Regarding Active Queue Management", 1421 BCP 197, RFC 7567, DOI 10.17487/RFC7567, July 2015, 1422 . 1424 [RFC8033] Pan, R., Natarajan, P., Baker, F., and G. White, 1425 "Proportional Integral Controller Enhanced (PIE): A 1426 Lightweight Control Scheme to Address the Bufferbloat 1427 Problem", RFC 8033, DOI 10.17487/RFC8033, February 2017, 1428 . 1430 [RFC8034] White, G. and R. Pan, "Active Queue Management (AQM) Based 1431 on Proportional Integral Controller Enhanced PIE) for 1432 Data-Over-Cable Service Interface Specifications (DOCSIS) 1433 Cable Modems", RFC 8034, DOI 10.17487/RFC8034, February 1434 2017, . 1436 [RFC8257] Bensley, S., Thaler, D., Balasubramanian, P., Eggert, L., 1437 and G. Judd, "Data Center TCP (DCTCP): TCP Congestion 1438 Control for Data Centers", RFC 8257, DOI 10.17487/RFC8257, 1439 October 2017, . 1441 [RFC8290] Hoeiland-Joergensen, T., McKenney, P., Taht, D., Gettys, 1442 J., and E. Dumazet, "The Flow Queue CoDel Packet Scheduler 1443 and Active Queue Management Algorithm", RFC 8290, 1444 DOI 10.17487/RFC8290, January 2018, 1445 . 1447 [RFC8298] Johansson, I. and Z. Sarker, "Self-Clocked Rate Adaptation 1448 for Multimedia", RFC 8298, DOI 10.17487/RFC8298, December 1449 2017, . 1451 [RFC8312] Rhee, I., Xu, L., Ha, S., Zimmermann, A., Eggert, L., and 1452 R. Scheffenegger, "CUBIC for Fast Long-Distance Networks", 1453 RFC 8312, DOI 10.17487/RFC8312, February 2018, 1454 . 1456 [SCReAM] Johansson, I., "SCReAM", github repository; , 1457 . 1460 [SigQ-Dyn] Briscoe, B., "Rapid Signalling of Queue Dynamics", 1461 Technical Report TR-BB-2017-001 arXiv:1904.07044 [cs.NI], 1462 September 2017, . 1464 Appendix A. Example DualQ Coupled PI2 Algorithm 1466 As a first concrete example, the pseudocode below gives the DualPI2 1467 algorithm. DualPI2 follows the structure of the DualQ Coupled AQM 1468 framework in Figure 1. A simple ramp function (configured in units 1469 of queuing time) with unsmoothed ECN marking is used for the Native 1470 L4S AQM. The ramp can also be configured as a step function. The 1471 PI2 algorithm [PI2] is used for the Classic AQM. PI2 is an improved 1472 variant of the PIE AQM [RFC8033]. 1474 The pseudocode will be introduced in two passes. The first pass 1475 explains the core concepts, deferring handling of overload to the 1476 second pass. To aid comparison, line numbers are kept in step 1477 between the two passes by using letter suffixes where the longer code 1478 needs extra lines. 1480 All variables are assumed to be floating point in their basic units 1481 (size in bytes, time in seconds, rates in bytes/second, alpha and 1482 beta in Hz, and probabilities from 0 to 1. Constants expressed in k 1483 (kilo), M (mega), G (giga), u (micro), m (milli) , %, ... are assumed 1484 to be converted to their appropriate multiple or fraction to 1485 represent the basic units. A real implementation that wants to use 1486 integer values needs to handle appropriate scaling factors and allow 1487 accordingly appropriate resolution of its integer types (including 1488 temporary internal values during calculations). 1490 A full open source implementation for Linux is available at: 1491 https://github.com/L4STeam/sch_dualpi2_upstream and explained in 1492 [DualPI2Linux]. The specification of the DualQ Coupled AQM for 1493 DOCSIS cable modems and CMTSs is available in [DOCSIS3.1] and 1494 explained in [LLD]. 1496 A.1. Pass #1: Core Concepts 1498 The pseudocode manipulates three main structures of variables: the 1499 packet (pkt), the L4S queue (lq) and the Classic queue (cq). The 1500 pseudocode consists of the following six functions: 1502 * The initialization function dualpi2_params_init(...) (Figure 2) 1503 that sets parameter defaults (the API for setting non-default 1504 values is omitted for brevity) 1506 * The enqueue function dualpi2_enqueue(lq, cq, pkt) (Figure 3) 1508 * The dequeue function dualpi2_dequeue(lq, cq, pkt) (Figure 4) 1510 * The recurrence function recur(q, likelihood) for de-randomized ECN 1511 marking (shown at the end of Figure 4). 1513 * The L4S AQM function laqm(qdelay) (Figure 5) used to calculate the 1514 ECN-marking probability for the L4S queue 1516 * The base AQM function that implements the PI algorithm 1517 dualpi2_update(lq, cq) (Figure 6) used to regularly update the 1518 base probability (p'), which is squared for the Classic AQM as 1519 well as being coupled across to the L4S queue. 1521 It also uses the following functions that are not shown in full here: 1523 * scheduler(), which selects between the head packets of the two 1524 queues; the choice of scheduler technology is discussed later; 1526 * cq.len() or lq.len() returns the current length (aka. backlog) of 1527 the relevant queue in bytes; 1529 * cq.time() or lq.time() returns the current queuing delay 1530 (aka. sojourn time or service time) of the relevant queue in units 1531 of time (see Note a); 1533 * mark(pkt) and drop(pkt) for ECN-marking and dropping a packet; 1535 In experiments so far (building on experiments with PIE) on broadband 1536 access links ranging from 4 Mb/s to 200 Mb/s with base RTTs from 5 ms 1537 to 100 ms, DualPI2 achieves good results with the default parameters 1538 in Figure 2. The parameters are categorised by whether they relate 1539 to the Base PI2 AQM, the L4S AQM or the framework coupling them 1540 together. Constants and variables derived from these parameters are 1541 also included at the end of each category. Each parameter is 1542 explained as it is encountered in the walk-through of the pseudocode 1543 below, and the rationale for the chosen defaults are given so that 1544 sensible values can be used in scenarios other than the regular 1545 public Internet. 1547 1: dualpi2_params_init(...) { % Set input parameter defaults 1548 2: % DualQ Coupled framework parameters 1549 5: limit = MAX_LINK_RATE * 250 ms % Dual buffer size 1550 3: k = 2 % Coupling factor 1551 4: % NOT SHOWN % scheduler-dependent weight or equival't parameter 1552 6: 1553 7: % PI2 Classic AQM parameters 1554 8: % Typical RTT, RTT_typ = 34 ms 1555 9: target = 15 ms % Queue delay target = RTT_typ * 0.22 * 2 1556 10: RTT_max = 100 ms % Worst case RTT expected 1557 11: % PI2 constants derived from above PI2 parameters 1558 12: p_Cmax = min(1/k^2, 1) % Max Classic drop/mark prob 1559 13: Tupdate = min(target, RTT_max/3) % PI sampling interval 1560 14: alpha = 0.1 * Tupdate / RTT_max^2 % PI integral gain in Hz 1561 15: beta = 0.3 / RTT_max % PI proportional gain in Hz 1562 16: 1563 17: % L4S ramp AQM parameters 1564 18: minTh = 800 us % L4S min marking threshold in time units 1565 19: range = 400 us % Range of L4S ramp in time units 1566 20: Th_len = 2 * MTU % Min L4S marking threshold in bytes 1567 21: % L4S constants incl. those derived from other parameters 1568 22: p_Lmax = 1 % Max L4S marking prob 1569 23: floor = Th_len / MIN_LINK_RATE 1570 24: if (minTh < floor) { 1571 25: % Shift ramp so minTh >= serialization time of 2 MTU 1572 26: minTh = floor 1573 27: } 1574 28: maxTh = minTh+range % L4S max marking threshold in time units 1575 29: } 1577 Figure 2: Example Header Pseudocode for DualQ Coupled PI2 AQM 1579 The overall goal of the code is to maintain the base probability (p', 1580 p-prime as in Section 2.4), which is an internal variable from which 1581 the marking and dropping probabilities for L4S and Classic traffic 1582 (p_L and p_C) are derived, with p_L in turn being derived from p_CL. 1583 The probabilities p_CL and p_C are derived in lines 4 and 5 of the 1584 dualpi2_update() function (Figure 6) then used in the 1585 dualpi2_dequeue() function where p_L is also derived from p_CL at 1586 line 6 (Figure 4). The code walk-through below builds up to 1587 explaining that part of the code eventually, but it starts from 1588 packet arrival. 1590 1: dualpi2_enqueue(lq, cq, pkt) { % Test limit and classify lq or cq 1591 2: if ( lq.len() + cq.len() + MTU > limit) 1592 3: drop(pkt) % drop packet if buffer is full 1593 4: timestamp(pkt) % attach arrival time to packet 1594 5: % Packet classifier 1595 6: if ( ecn(pkt) modulo 2 == 1 ) % ECN bits = ECT(1) or CE 1596 7: lq.enqueue(pkt) 1597 8: else % ECN bits = not-ECT or ECT(0) 1598 9: cq.enqueue(pkt) 1599 10: } 1601 Figure 3: Example Enqueue Pseudocode for DualQ Coupled PI2 AQM 1603 1: dualpi2_dequeue(lq, cq, pkt) { % Couples L4S & Classic queues 1604 2: while ( lq.len() + cq.len() > 0 ) { 1605 3: if ( scheduler() == lq ) { 1606 4: lq.dequeue(pkt) % Scheduler chooses lq 1607 5: p'_L = laqm(lq.time()) % Native L4S AQM 1608 6: p_L = max(p'_L, p_CL) % Combining function 1609 7: if ( recur(lq, p_L) ) % Linear marking 1610 8: mark(pkt) 1611 9: } else { 1612 10: cq.dequeue(pkt) % Scheduler chooses cq 1613 11: if ( recur(cq, p_C) ) { % probability p_C = p'^2 1614 12: if ( ecn(pkt) == 0 ) { % if ECN field = not-ECT 1615 13: drop(pkt) % squared drop 1616 14: continue % continue to the top of the while loop 1617 15: } 1618 16: mark(pkt) % squared mark 1619 17: } 1620 18: } 1621 19: return(pkt) % return the packet and stop 1622 20: } 1623 21: return(NULL) % no packet to dequeue 1624 22: } 1626 23: recur(q, likelihood) { % Returns TRUE with a certain likelihood 1627 24: q.count += likelihood 1628 25: if (q.count > 1) { 1629 26: q.count -= 1 1630 27: return TRUE 1631 28: } 1632 29: return FALSE 1633 30: } 1635 Figure 4: Example Dequeue Pseudocode for DualQ Coupled PI2 AQM 1637 When packets arrive, first a common queue limit is checked as shown 1638 in line 2 of the enqueuing pseudocode in Figure 3. This assumes a 1639 shared buffer for the two queues (Note b discusses the merits of 1640 separate buffers). In order to avoid any bias against larger 1641 packets, 1 MTU of space is always allowed and the limit is 1642 deliberately tested before enqueue. 1644 If limit is not exceeded, the packet is timestamped in line 4. This 1645 assumes that queue delay is measured using the sojourn time technique 1646 (see Note a for alternatives). 1648 At lines 5-9, the packet is classified and enqueued to the Classic or 1649 L4S queue dependent on the least significant bit of the ECN field in 1650 the IP header (line 6). Packets with a codepoint having an LSB of 0 1651 (Not-ECT and ECT(0)) will be enqueued in the Classic queue. 1652 Otherwise, ECT(1) and CE packets will be enqueued in the L4S queue. 1653 Optional additional packet classification flexibility is omitted for 1654 brevity (see [I-D.ietf-tsvwg-ecn-l4s-id]). 1656 The dequeue pseudocode (Figure 4) is repeatedly called whenever the 1657 lower layer is ready to forward a packet. It schedules one packet 1658 for dequeuing (or zero if the queue is empty) then returns control to 1659 the caller, so that it does not block while that packet is being 1660 forwarded. While making this dequeue decision, it also makes the 1661 necessary AQM decisions on dropping or marking. The alternative of 1662 applying the AQMs at enqueue would shift some processing from the 1663 critical time when each packet is dequeued. However, it would also 1664 add a whole queue of delay to the control signals, making the control 1665 loop sloppier (for a typical RTT it would double the Classic queue's 1666 feedback delay). 1668 All the dequeue code is contained within a large while loop so that 1669 if it decides to drop a packet, it will continue until it selects a 1670 packet to schedule. Line 3 of the dequeue pseudocode is where the 1671 scheduler chooses between the L4S queue (lq) and the Classic queue 1672 (cq). Detailed implementation of the scheduler is not shown (see 1673 discussion later). 1675 * If an L4S packet is scheduled, in lines 7 and 8 the packet is ECN- 1676 marked with likelihood p_L. The recur() function at the end of 1677 Figure 4 is used, which is preferred over random marking because 1678 it avoids delay due to randomization when interpreting congestion 1679 signals, but it still desynchronizes the saw-teeth of the flows. 1680 Line 6 calculates p_L as the maximum of the coupled L4S 1681 probability p_CL and the probability from the native L4S AQM p'_L. 1682 This implements the max() function shown in Figure 1 to couple the 1683 outputs of the two AQMs together. Of the two probabilities input 1684 to p_L in line 6: 1686 - p'_L is calculated per packet in line 5 by the laqm() function 1687 (see Figure 5), 1689 - Whereas p_CL is maintained by the dualpi2_update() function 1690 which runs every Tupdate (Tupdate is set in line 13 of 1691 Figure 2). 1693 * If a Classic packet is scheduled, lines 10 to 17 drop or mark the 1694 packet with probability p_C. 1696 The Native L4S AQM algorithm (Figure 5) is a ramp function, similar 1697 to the RED algorithm, but simplified as follows: 1699 * The extent of the ramp is defined in units of queuing delay, not 1700 bytes, so that configuration remains invariant as the queue 1701 departure rate varies. 1703 * It uses instantaneous queueing delay, which avoids the complexity 1704 of smoothing, but also avoids embedding a worst-case RTT of 1705 smoothing delay in the network (see Section 2.1). 1707 * The ramp rises linearly directly from 0 to 1, not to an 1708 intermediate value of p'_L as RED would, because there is no need 1709 to keep ECN marking probability low. 1711 * Marking does not have to be randomized. Determinism is used 1712 instead of randomness; to reduce the delay necessary to smooth out 1713 the noise of randomness from the signal. 1715 The ramp function requires two configuration parameters, the minimum 1716 threshold (minTh) and the width of the ramp (range), both in units of 1717 queuing time), as shown in lines 18 & 19 of the initialization 1718 function in Figure 2. The ramp function can be configured as a step 1719 (see Note c). 1721 Although the DCTCP paper [Alizadeh-stability] recommends an ECN 1722 marking threshold of 0.17*RTT_typ, it also shows that the threshold 1723 can be much shallower with hardly any worse under-utilization of the 1724 link (because the amplitude of DCTCP's sawteeth is so small). Based 1725 on extensive experiments, for the public Internet the default minimum 1726 ECN marking threshold in Figure 2 is considered a good compromise, 1727 even though it is significantly smaller fraction of RTT_typ. 1729 A minimum marking threshold parameter (Th_len) in transmission units 1730 (default 2 MTU) is also necessary to ensure that the ramp does not 1731 trigger excessive marking on slow links. The code in lines 24-27 of 1732 the initialization function (Figure 2) converts 2 MTU into time units 1733 and shifts the ramp so that the min threshold is no shallower than 1734 this floor. 1736 1: laqm(qdelay) { % Returns native L4S AQM probability 1737 2: if (qdelay >= maxTh) 1738 3: return 1 1739 4: else if (qdelay > minTh) 1740 5: return (qdelay - minTh)/range % Divide could use a bit-shift 1741 6: else 1742 7: return 0 1743 8: } 1745 Figure 5: Example Pseudocode for the Native L4S AQM 1747 1: dualpi2_update(lq, cq) { % Update p' every Tupdate 1748 2: curq = cq.time() % use queuing time of first-in Classic packet 1749 3: p' = p' + alpha * (curq - target) + beta * (curq - prevq) 1750 4: p_CL = k * p' % Coupled L4S prob = base prob * coupling factor 1751 5: p_C = p'^2 % Classic prob = (base prob)^2 1752 6: prevq = curq 1753 7: } 1755 Figure 6: Example PI-Update Pseudocode for DualQ Coupled PI2 AQM 1757 (Clamping p' within the range [0,1] omitted for clarity - see text) 1759 The coupled marking probability, p_CL depends on the base probability 1760 (p'), which is kept up to date by the core PI algorithm in Figure 6 1761 executed every Tupdate. 1763 Note that p' solely depends on the queuing time in the Classic queue. 1764 In line 2, the current queuing delay (curq) is evaluated from how 1765 long the head packet was in the Classic queue (cq). The function 1766 cq.time() (not shown) subtracts the time stamped at enqueue from the 1767 current time (see Note a) and implicitly takes the current queuing 1768 delay as 0 if the queue is empty. 1770 The algorithm centres on line 3, which is a classical Proportional- 1771 Integral (PI) controller that alters p' dependent on: a) the error 1772 between the current queuing delay (curq) and the target queuing 1773 delay, 'target'; and b) the change in queuing delay since the last 1774 sample. The name 'PI' represents the fact that the second factor 1775 (how fast the queue is growing) is _P_roportional to load while the 1776 first is the _I_ntegral of the load (so it removes any standing queue 1777 in excess of the target). 1779 The target parameter can be set based on local knowledge, but the aim 1780 is for the default to be a good compromise for anywhere in the 1781 intended deployment environment---the public Internet. The target 1782 queuing delay is related to the typical base RTT, RTT_typ, by two 1783 factors, shown in the comment on line 9 of Figure 2 as target = 1784 RTT_typ * 0.22 * 2. These factors ensure that, in a large proportion 1785 of cases (say 90%), the sawtooth variations in RTT will fit within 1786 the buffer without underutilizing the link. Frankly, these factors 1787 are educated guesses, but with the emphasis closer to 'educated' than 1788 to 'guess' (see [PI2param] for background investigations): 1790 * RTT_typ is taken as 34 ms. This is based on an average CDN 1791 latency measured in each country weighted by the number of 1792 Internet users in that country to produce an overall weighted 1793 average for the Internet [PI2param]. 1795 * The factor 0.22 is a geometry factor that characterizes the shape 1796 of the sawteeth of prevalent Classic congestion controllers. The 1797 geometry factor is the difference between the minimum and the 1798 average queue delays of the sawteeth, relative to the base RTT. 1799 For instance, the geometry factor of standard Reno is 0.5. 1800 According to the census of congestion controllers conducted by 1801 Mishra _et al_ in Jul-Oct 2019 [CCcensus19], most Classic TCP 1802 traffic uses Cubic. And, according to the analysis in [PI2param], 1803 if running over a PI2 AQM, a large proportion of this Cubic 1804 traffic would be in its Reno-Friendly mode, which has a geometry 1805 factor of 0.21 (Linux implementation). The rest of the Cubic 1806 traffic would be in true Cubic mode, which has a geometry factor 1807 of 0.32. Without modelling the sawtooth profiles from all the 1808 other less prevalent congestion controllers, we estimate a 9:1 1809 weighted average of these two, resulting in an average geometry 1810 factor of 0.22. 1812 * The factor 2, is a safety factor that increases the target queue 1813 to allow for the distribution of RTT_typ around its mean. 1814 Otherwise the target queue would only avoid underutilization for 1815 those users below the mean. It also provides a safety margin for 1816 the proportion of paths in use that span beyond the distance 1817 between a user and their local CDN. Currently no data is 1818 available on the variance of queue delay around the mean in each 1819 region, so there is plenty of room for this guess to become more 1820 educated. 1822 The two 'gain factors' in line 3 of Figure 6, alpha and beta, 1823 respectively weight how strongly each of the two elements (Integral 1824 and Proportional) alters p'. They are in units of 'per second of 1825 delay' or Hz, because they transform differences in queueing delay 1826 into changes in probability (assuming probability has a value from 0 1827 to 1). 1829 alpha and beta determine how much p' ought to change after each 1830 update interval (Tupdate). For smaller Tupdate, p' should change by 1831 the same amount per second, but in finer more frequent steps. So 1832 alpha depends on Tupdate (see line 13 of the initialization function 1833 in Figure 2). It is best to update p' as frequently as possible, but 1834 Tupdate will probably be constrained by hardware performance. As 1835 shown in line 13, the update interval should be frequent enough to 1836 update at least once in the time taken for the target queue to drain 1837 ('target') as long as it updates at least three times per maximum 1838 RTT. Tupdate defaults to 16 ms in the reference Linux implementation 1839 because it has to be rounded to a multiple of 4 ms. For link rates 1840 from 4 to 200 Mb/s and a maximum RTT of 100ms, it has been verified 1841 through extensive testing that Tupdate=16ms (as also recommended in 1842 [RFC8033]) is sufficient. 1844 The choice of alpha and beta also determines the AQM's stable 1845 operating range. The AQM ought to change p' as fast as possible in 1846 response to changes in load without over-compensating and therefore 1847 causing oscillations in the queue. Therefore, the values of alpha 1848 and beta also depend on the RTT of the expected worst-case flow 1849 (RTT_max). 1851 The maximum RTT of a PI controller (RTT_max in line 10 of Figure 2) 1852 is not an absolute maximum, but more instability (more queue 1853 variability) sets in for long-running flows with an RTT above this 1854 value. The propagation delay half way round the planet and back in 1855 glass fibre is 200 ms. However, hardly any traffic traverses such 1856 extreme paths and, since the significant consolidation of Internet 1857 traffic between 2007 and 2009 [Labovitz10], a high and growing 1858 proportion of all Internet traffic (roughly two-thirds at the time of 1859 writing) has been served from content distribution networks (CDNs) or 1860 'cloud' services distributed close to end-users. The Internet might 1861 change again, but for now, designing for a maximum RTT of 100ms is a 1862 good compromise between faster queue control at low RTT and some 1863 instability on the occasions when a longer path is necessary. 1865 Recommended derivations of the gain constants alpha and beta can be 1866 approximated for Reno over a PI2 AQM as: alpha = 0.1 * Tupdate / 1867 RTT_max^2; beta = 0.3 / RTT_max, as shown in lines 14 & 15 of 1868 Figure 2. These are derived from the stability analysis in [PI2]. 1869 For the default values of Tupdate=16 ms and RTT_max = 100 ms, they 1870 result in alpha = 0.16; beta = 3.2 (discrepancies are due to 1871 rounding). These defaults have been verified with a wide range of 1872 link rates, target delays and a range of traffic models with mixed 1873 and similar RTTs, short and long flows, etc. 1875 In corner cases, p' can overflow the range [0,1] so the resulting 1876 value of p' has to be bounded (omitted from the pseudocode). Then, 1877 as already explained, the coupled and Classic probabilities are 1878 derived from the new p' in lines 4 and 5 of Figure 6 as p_CL = k*p' 1879 and p_C = p'^2. 1881 Because the coupled L4S marking probability (p_CL) is factored up by 1882 k, the dynamic gain parameters alpha and beta are also inherently 1883 factored up by k for the L4S queue. So, the effective gain factor 1884 for the L4S queue is k*alpha (with defaults alpha = 0.16 Hz and k=2, 1885 effective L4S alpha = 0.32 Hz). 1887 Unlike in PIE [RFC8033], alpha and beta do not need to be tuned every 1888 Tupdate dependent on p'. Instead, in PI2, alpha and beta are 1889 independent of p' because the squaring applied to Classic traffic 1890 tunes them inherently. This is explained in [PI2], which also 1891 explains why this more principled approach removes the need for most 1892 of the heuristics that had to be added to PIE. 1894 Nonetheless, an implementer might wish to add selected heuristics to 1895 either AQM. For instance the Linux reference DualPI2 implementation 1896 includes the following: 1898 * Prior to enqueuing an L4S packet, if the L queue contains <2 1899 packets, the packet is flagged to suppress any native L4S AQM 1900 marking at dequeue (which depends on sojourn time); 1902 * Classic and coupled marking or dropping (i.e. based on p_C and 1903 p_CL from the PI controller) is only applied to a packet if the 1904 respective queue length in bytes is > 2 MTU (prior to enqueuing 1905 the packet or after dequeuing it, depending on whether the AQM is 1906 configured to be applied at enqueue or dequeue); 1908 * In the WRR scheduler, the 'credit' indicating which queue should 1909 transmit is only changed if there are packets in both queues 1910 (i.e. if there is actual resource contention). This means that a 1911 properly paced L flow might never be delayed by the WRR. The WRR 1912 credit is reset in favour of the L queue when the link is idle. 1914 An implementer might also wish to add other heuristics, e.g. burst 1915 protection [RFC8033] or enhanced burst protection [RFC8034]. 1917 Notes: 1919 a. The drain rate of the queue can vary if it is scheduled relative 1920 to other queues, or to cater for fluctuations in a wireless 1921 medium. To auto-adjust to changes in drain rate, the queue needs 1922 to be measured in time, not bytes or packets [AQMmetrics], 1923 [CoDel]. Queuing delay could be measured directly by storing a 1924 per-packet time-stamp as each packet is enqueued, and subtracting 1925 this from the system time when the packet is dequeued. If time- 1926 stamping is not easy to introduce with certain hardware, queuing 1927 delay could be predicted indirectly by dividing the size of the 1928 queue by the predicted departure rate, which might be known 1929 precisely for some link technologies (see for example [RFC8034]). 1931 b. Line 2 of the dualpi2_enqueue() function (Figure 3) assumes an 1932 implementation where lq and cq share common buffer memory. An 1933 alternative implementation could use separate buffers for each 1934 queue, in which case the arriving packet would have to be 1935 classified first to determine which buffer to check for available 1936 space. The choice is a trade off; a shared buffer can use less 1937 memory whereas separate buffers isolate the L4S queue from tail- 1938 drop due to large bursts of Classic traffic (e.g. a Classic Reno 1939 TCP during slow-start over a long RTT). 1941 c. There has been some concern that using the step function of DCTCP 1942 for the Native L4S AQM requires end-systems to smooth the signal 1943 for an unnecessarily large number of round trips to ensure 1944 sufficient fidelity. A ramp is no worse than a step in initial 1945 experiments with existing DCTCP. Therefore, it is recommended 1946 that a ramp is configured in place of a step, which will allow 1947 congestion control algorithms to investigate faster smoothing 1948 algorithms. 1950 A ramp is more general that a step, because an operator can 1951 effectively turn the ramp into a step function, as used by DCTCP, 1952 by setting the range to zero. There will not be a divide by zero 1953 problem at line 5 of Figure 5 because, if minTh is equal to 1954 maxTh, the condition for this ramp calculation cannot arise. 1956 A.2. Pass #2: Overload Details 1958 Figure 7 repeats the dequeue function of Figure 4, but with overload 1959 details added. Similarly Figure 8 repeats the core PI algorithm of 1960 Figure 6 with overload details added. The initialization, enqueue, 1961 L4S AQM and recur functions are unchanged. 1963 In line 10 of the initialization function (Figure 2), the maximum 1964 Classic drop probability p_Cmax = min(1/k^2, 1) or 1/4 for the 1965 default coupling factor k=2. p_Cmax is the point at which it is 1966 deemed that the Classic queue has become persistently overloaded, so 1967 it switches to using drop, even for ECN-capable packets. ECT packets 1968 that are not dropped can still be ECN-marked. 1970 In practice, 25% has been found to be a good threshold to preserve 1971 fairness between ECN capable and non ECN capable traffic. This 1972 protects the queues against both temporary overload from responsive 1973 flows and more persistent overload from any unresponsive traffic that 1974 falsely claims to be responsive to ECN. 1976 When the Classic ECN marking probability reaches the p_Cmax threshold 1977 (1/k^2), the marking probability coupled to the L4S queue, p_CL will 1978 always be 100% for any k (by equation (1) in Section 2). So, for 1979 readability, the constant p_Lmax is defined as 1 in line 22 of the 1980 initialization function (Figure 2). This is intended to ensure that 1981 the L4S queue starts to introduce dropping once ECN-marking saturates 1982 at 100% and can rise no further. The 'Prague L4S' 1983 requirements [I-D.ietf-tsvwg-ecn-l4s-id] state that, when an L4S 1984 congestion control detects a drop, it falls back to a response that 1985 coexists with 'Classic' Reno congestion control. So it is correct 1986 that, when the L4S queue drops packets, it drops them proportional to 1987 p'^2, as if they are Classic packets. 1989 Both these switch-overs are triggered by the tests for overload 1990 introduced in lines 4b and 12b of the dequeue function (Figure 7). 1991 Lines 8c to 8g drop L4S packets with probability p'^2. Lines 8h to 1992 8i mark the remaining packets with probability p_CL. Given p_Lmax = 1993 1, all remaining packets will be marked because, to have reached the 1994 else block at line 8b, p_CL >= 1. 1996 Lines 2c to 2d in the core PI algorithm (Figure 8) deal with overload 1997 of the L4S queue when there is no Classic traffic. This is 1998 necessary, because the core PI algorithm maintains the appropriate 1999 drop probability to regulate overload, but it depends on the length 2000 of the Classic queue. If there is no Classic queue the naive PI 2001 update function in Figure 6 would drop nothing, even if the L4S queue 2002 were overloaded - so tail drop would have to take over (lines 2 and 3 2003 of Figure 3). 2005 Instead, the test at line 2a of the full PI update function in 2006 Figure 8 keeps delay on target using drop. If the test at line 2a of 2007 Figure 8 finds that the Classic queue is empty, line 2d measures the 2008 current queue delay using the L4S queue instead. While the L4S queue 2009 is not overloaded, its delay will always be tiny compared to the 2010 target Classic queue delay. So p_CL will be driven to zero, and the 2011 L4S queue will naturally be governed solely by p'_L from the native 2012 L4S AQM (lines 5 and 6 of the dequeue algorithm in Figure 7). But, 2013 if unresponsive L4S source(s) cause overload, the DualQ transitions 2014 smoothly to L4S marking based on the PI algorithm. If overload 2015 increases further, it naturally transitions from marking to dropping 2016 by the switch-over mechanism already described. 2018 1: dualpi2_dequeue(lq, cq, pkt) { % Couples L4S & Classic queues 2019 2: while ( lq.len() + cq.len() > 0 ) { 2020 3: if ( scheduler() == lq ) { 2021 4a: lq.dequeue(pkt) % L4S scheduled 2022 4b: if ( p_CL < p_Lmax ) { % Check for overload saturation 2023 5: p'_L = laqm(lq.time()) % Native L4S AQM 2024 6: p_L = max(p'_L, p_CL) % Combining function 2025 7: if ( recur(lq, p_L) ) % Linear marking 2026 8a: mark(pkt) 2027 8b: } else { % overload saturation 2028 8c: if ( recur(lq, p_C) ) { % probability p_C = p'^2 2029 8e: drop(pkt) % revert to Classic drop due to overload 2030 8f: continue % continue to the top of the while loop 2031 8g: } 2032 8h: if ( recur(lq, p_CL) ) % probability p_CL = k * p' 2033 8i: mark(pkt) % linear marking of remaining packets 2034 8j: } 2035 9: } else { 2036 10: cq.dequeue(pkt) % Classic scheduled 2037 11: if ( recur(cq, p_C) ) { % probability p_C = p'^2 2038 12a: if ( (ecn(pkt) == 0) % ECN field = not-ECT 2039 12b: OR (p_C >= p_Cmax) ) { % Overload disables ECN 2040 13: drop(pkt) % squared drop, redo loop 2041 14: continue % continue to the top of the while loop 2042 15: } 2043 16: mark(pkt) % squared mark 2044 17: } 2045 18: } 2046 19: return(pkt) % return the packet and stop 2047 20: } 2048 21: return(NULL) % no packet to dequeue 2049 22: } 2051 Figure 7: Example Dequeue Pseudocode for DualQ Coupled PI2 AQM 2052 (Including Overload Code) 2054 1: dualpi2_update(lq, cq) { % Update p' every Tupdate 2055 2a: if ( cq.len() > 0 ) 2056 2b: curq = cq.time() %use queuing time of first-in Classic packet 2057 2c: else % Classic queue empty 2058 2d: curq = lq.time() % use queuing time of first-in L4S packet 2059 3: p' = p' + alpha * (curq - target) + beta * (curq - prevq) 2060 4: p_CL = p' * k % Coupled L4S prob = base prob * coupling factor 2061 5: p_C = p'^2 % Classic prob = (base prob)^2 2062 6: prevq = curq 2063 7: } 2065 Figure 8: Example PI-Update Pseudocode for DualQ Coupled PI2 AQM 2066 (Including Overload Code) 2068 The choice of scheduler technology is critical to overload protection 2069 (see Section 4.1). 2071 * A well-understood weighted scheduler such as weighted round robin 2072 (WRR) is recommended. As long as the scheduler weight for Classic 2073 is small (e.g. 1/16), its exact value is unimportant because it 2074 does not normally determine capacity shares. The weight is only 2075 important to prevent unresponsive L4S traffic starving Classic 2076 traffic. This is because capacity sharing between the queues is 2077 normally determined by the coupled congestion signal, which 2078 overrides the scheduler, by making L4S sources leave roughly equal 2079 per-flow capacity available for Classic flows. 2081 * Alternatively, a time-shifted FIFO (TS-FIFO) could be used. It 2082 works by selecting the head packet that has waited the longest, 2083 biased against the Classic traffic by a time-shift of tshift. To 2084 implement time-shifted FIFO, the scheduler() function in line 3 of 2085 the dequeue code would simply be implemented as the scheduler() 2086 function at the bottom of Figure 10 in Appendix B. For the public 2087 Internet a good value for tshift is 50ms. For private networks 2088 with smaller diameter, about 4*target would be reasonable. TS- 2089 FIFO is a very simple scheduler, but complexity might need to be 2090 added to address some deficiencies (which is why it is not 2091 recommended over WRR): 2093 - TS-FIFO does not fully isolate latency in the L4S queue from 2094 uncontrolled bursts in the Classic queue; 2096 - TS-FIFO is only appropriate if time-stamping of packets is 2097 feasible; 2099 - Even if time-stamping is supported, the sojourn time of the 2100 head packet is always stale. For instance, if a burst arrives 2101 at an empty queue, the sojourn time will only measure the delay 2102 of the burst once the burst is over, even though the queue knew 2103 about it from the start. At the cost of more operations and 2104 more storage, a 'scaled sojourn time' metric of queue delay can 2105 be used, which is the sojourn time of a packet scaled by the 2106 ratio of the queue sizes when the packet departed and 2107 arrived [SigQ-Dyn]. 2109 * A strict priority scheduler would be inappropriate, because it 2110 would starve Classic if L4S was overloaded. 2112 Appendix B. Example DualQ Coupled Curvy RED Algorithm 2114 As another example of a DualQ Coupled AQM algorithm, the pseudocode 2115 below gives the Curvy RED based algorithm. Although the AQM was 2116 designed to be efficient in integer arithmetic, to aid understanding 2117 it is first given using floating point arithmetic (Figure 10). Then, 2118 one possible optimization for integer arithmetic is given, also in 2119 pseudocode (Figure 11). To aid comparison, the line numbers are kept 2120 in step between the two by using letter suffixes where the longer 2121 code needs extra lines. 2123 B.1. Curvy RED in Pseudocode 2125 The pseudocode manipulates three main structures of variables: the 2126 packet (pkt), the L4S queue (lq) and the Classic queue (cq) and 2127 consists of the following five functions: 2129 * The initialization function cred_params_init(...) (Figure 2) that 2130 sets parameter defaults (the API for setting non-default values is 2131 omitted for brevity); 2133 * The dequeue function cred_dequeue(lq, cq, pkt) (Figure 4); 2135 * The scheduling function scheduler(), which selects between the 2136 head packets of the two queues. 2138 It also uses the following functions that are either shown elsewhere, 2139 or not shown in full here: 2141 * The enqueue function, which is identical to that used for DualPI2, 2142 dualpi2_enqueue(lq, cq, pkt) in Figure 3; 2144 * mark(pkt) and drop(pkt) for ECN-marking and dropping a packet; 2145 * cq.len() or lq.len() returns the current length (aka. backlog) of 2146 the relevant queue in bytes; 2148 * cq.time() or lq.time() returns the current queuing delay 2149 (aka. sojourn time or service time) of the relevant queue in units 2150 of time (see Note a in Appendix A.1). 2152 Because Curvy RED was evaluated before DualPI2, certain improvements 2153 introduced for DualPI2 were not evaluated for Curvy RED. In the 2154 pseudocode below, the straightforward improvements have been added on 2155 the assumption they will provide similar benefits, but that has not 2156 been proven experimentally. They are: i) a conditional priority 2157 scheduler instead of strict priority ii) a time-based threshold for 2158 the native L4S AQM; iii) ECN support for the Classic AQM. A recent 2159 evaluation has proved that a minimum ECN-marking threshold (minTh) 2160 greatly improves performance, so this is also included in the 2161 pseudocode. 2163 Overload protection has not been added to the Curvy RED pseudocode 2164 below so as not to detract from the main features. It would be added 2165 in exactly the same way as in Appendix A.2 for the DualPI2 2166 pseudocode. The native L4S AQM uses a step threshold, but a ramp 2167 like that described for DualPI2 could be used instead. The scheduler 2168 uses the simple TS-FIFO algorithm, but it could be replaced with WRR. 2170 The Curvy RED algorithm has not been maintained or evaluated to the 2171 same degree as the DualPI2 algorithm. In initial experiments on 2172 broadband access links ranging from 4 Mb/s to 200 Mb/s with base RTTs 2173 from 5 ms to 100 ms, Curvy RED achieved good results with the default 2174 parameters in Figure 9. 2176 The parameters are categorised by whether they relate to the Classic 2177 AQM, the L4S AQM or the framework coupling them together. Constants 2178 and variables derived from these parameters are also included at the 2179 end of each category. These are the raw input parameters for the 2180 algorithm. A configuration front-end could accept more meaningful 2181 parameters (e.g. RTT_max and RTT_typ) and convert them into these raw 2182 parameters, as has been done for DualPI2 in Appendix A. Where 2183 necessary, parameters are explained further in the walk-through of 2184 the pseudocode below. 2186 1: cred_params_init(...) { % Set input parameter defaults 2187 2: % DualQ Coupled framework parameters 2188 3: limit = MAX_LINK_RATE * 250 ms % Dual buffer size 2189 4: k' = 1 % Coupling factor as a power of 2 2190 5: tshift = 50 ms % Time shift of TS-FIFO scheduler 2191 6: % Constants derived from Classic AQM parameters 2192 7: k = 2^k' % Coupling factor from Equation (1) 2193 6: 2194 7: % Classic AQM parameters 2195 8: g_C = 5 % EWMA smoothing parameter as a power of 1/2 2196 9: S_C = -1 % Classic ramp scaling factor as a power of 2 2197 10: minTh = 500 ms % No Classic drop/mark below this queue delay 2198 11: % Constants derived from Classic AQM parameters 2199 12: gamma = 2^(-g_C) % EWMA smoothing parameter 2200 13: range_C = 2^S_C % Range of Classic ramp 2201 14: 2202 15: % L4S AQM parameters 2203 16: T = 1 ms % Queue delay threshold for native L4S AQM 2204 17: % Constants derived from above parameters 2205 18: S_L = S_C - k' % L4S ramp scaling factor as a power of 2 2206 19: range_L = 2^S_L % Range of L4S ramp 2207 20: } 2209 Figure 9: Example Header Pseudocode for DualQ Coupled Curvy RED AQM 2211 1: cred_dequeue(lq, cq, pkt) { % Couples L4S & Classic queues 2212 2: while ( lq.len() + cq.len() > 0 ) { 2213 3: if ( scheduler() == lq ) { 2214 4: lq.dequeue(pkt) % L4S scheduled 2215 5a: p_CL = (Q_C - minTh) / range_L 2216 5b: if ( ( lq.time() > T ) 2217 5c: OR ( p_CL > maxrand(U) ) ) 2218 6: mark(pkt) 2219 7: } else { 2220 8: cq.dequeue(pkt) % Classic scheduled 2221 9a: Q_C = gamma * cq.time() + (1-gamma) * Q_C % Classic Q EWMA 2222 10a: sqrt_p_C = (Q_C - minTh) / range_C 2223 10b: if ( sqrt_p_C > maxrand(2*U) ) { 2224 11: if ( (ecn(pkt) == 0) { % ECN field = not-ECT 2225 12: drop(pkt) % Squared drop, redo loop 2226 13: continue % continue to the top of the while loop 2227 14: } 2228 15: mark(pkt) 2229 16: } 2230 17: } 2231 18: return(pkt) % return the packet and stop here 2232 19: } 2233 20: return(NULL) % no packet to dequeue 2234 21: } 2236 22: maxrand(u) { % return the max of u random numbers 2237 23: maxr=0 2238 24: while (u-- > 0) 2239 25: maxr = max(maxr, rand()) % 0 <= rand() < 1 2240 26: return(maxr) 2241 27: } 2243 28: scheduler() { 2244 29: if ( lq.time() + tshift >= cq.time() ) 2245 30: return lq; 2246 31: else 2247 32: return cq; 2248 33: } 2250 Figure 10: Example Dequeue Pseudocode for DualQ Coupled Curvy RED AQM 2252 The dequeue pseudocode (Figure 10) is repeatedly called whenever the 2253 lower layer is ready to forward a packet. It schedules one packet 2254 for dequeuing (or zero if the queue is empty) then returns control to 2255 the caller, so that it does not block while that packet is being 2256 forwarded. While making this dequeue decision, it also makes the 2257 necessary AQM decisions on dropping or marking. The alternative of 2258 applying the AQMs at enqueue would shift some processing from the 2259 critical time when each packet is dequeued. However, it would also 2260 add a whole queue of delay to the control signals, making the control 2261 loop very sloppy. 2263 The code is written assuming the AQMs are applied on dequeue (Note 2264 1). All the dequeue code is contained within a large while loop so 2265 that if it decides to drop a packet, it will continue until it 2266 selects a packet to schedule. If both queues are empty, the routine 2267 returns NULL at line 20. Line 3 of the dequeue pseudocode is where 2268 the conditional priority scheduler chooses between the L4S queue (lq) 2269 and the Classic queue (cq). The time-shifted FIFO scheduler is shown 2270 at lines 28-33, which would be suitable if simplicity is paramount 2271 (see Note 2). 2273 Within each queue, the decision whether to forward, drop or mark is 2274 taken as follows (to simplify the explanation, it is assumed that 2275 U=1): 2277 L4S: If the test at line 3 determines there is an L4S packet to 2278 dequeue, the tests at lines 5b and 5c determine whether to mark 2279 it. The first is a simple test of whether the L4S queue delay 2280 (lq.time()) is greater than a step threshold T (Note 3). The 2281 second test is similar to the random ECN marking in RED, but with 2282 the following differences: i) marking depends on queuing time, not 2283 bytes, in order to scale for any link rate without being 2284 reconfigured; ii) marking of the L4S queue depends on a logical OR 2285 of two tests; one against its own queuing time and one against the 2286 queuing time of the _other_ (Classic) queue; iii) the tests are 2287 against the instantaneous queuing time of the L4S queue, but a 2288 smoothed average of the other (Classic) queue; iv) the queue is 2289 compared with the maximum of U random numbers (but if U=1, this is 2290 the same as the single random number used in RED). 2292 Specifically, in line 5a the coupled marking probability p_CL is 2293 set to the amount by which the averaged Classic queueing delay Q_C 2294 exceeds the minimum queuing delay threshold (minTh) all divided by 2295 the L4S scaling parameter range_L. range_L represents the queuing 2296 delay (in seconds) added to minTh at which marking probability 2297 would hit 100%. Then in line 5c (if U=1) the result is compared 2298 with a uniformly distributed random number between 0 and 1, which 2299 ensures that, over range_L, marking probability will linearly 2300 increase with queueing time. 2302 Classic: If the scheduler at line 3 chooses to dequeue a Classic 2303 packet and jumps to line 7, the test at line 10b determines 2304 whether to drop or mark it. But before that, line 9a updates Q_C, 2305 which is an exponentially weighted moving average (Note 4) of the 2306 queuing time of the Classic queue, where cq.time() is the current 2307 instantaneous queueing time of the packet at the head of the 2308 Classic queue (zero if empty) and gamma is the EWMA constant 2309 (default 1/32, see line 12 of the initialization function). 2311 Lines 10a and 10b implement the Classic AQM. In line 10a the 2312 averaged queuing time Q_C is divided by the Classic scaling 2313 parameter range_C, in the same way that queuing time was scaled 2314 for L4S marking. This scaled queuing time will be squared to 2315 compute Classic drop probability so, before it is squared, it is 2316 effectively the square root of the drop probability, hence it is 2317 given the variable name sqrt_p_C. The squaring is done by 2318 comparing it with the maximum out of two random numbers (assuming 2319 U=1). Comparing it with the maximum out of two is the same as the 2320 logical `AND' of two tests, which ensures drop probability rises 2321 with the square of queuing time. 2323 The AQM functions in each queue (lines 5c & 10b) are two cases of a 2324 new generalization of RED called Curvy RED, motivated as follows. 2325 When the performance of this AQM was compared with FQ-CoDel and PIE, 2326 their goal of holding queuing delay to a fixed target seemed 2327 misguided [CRED_Insights]. As the number of flows increases, if the 2328 AQM does not allow host congestion controllers to increase queuing 2329 delay, it has to introduce abnormally high levels of loss. Then loss 2330 rather than queuing becomes the dominant cause of delay for short 2331 flows, due to timeouts and tail losses. 2333 Curvy RED constrains delay with a softened target that allows some 2334 increase in delay as load increases. This is achieved by increasing 2335 drop probability on a convex curve relative to queue growth (the 2336 square curve in the Classic queue, if U=1). Like RED, the curve hugs 2337 the zero axis while the queue is shallow. Then, as load increases, 2338 it introduces a growing barrier to higher delay. But, unlike RED, it 2339 requires only two parameters, not three. The disadvantage of Curvy 2340 RED (compared to a PI controller for example) is that it is not 2341 adapted to a wide range of RTTs. Curvy RED can be used as is when 2342 the RTT range to be supported is limited, otherwise an adaptation 2343 mechanism is required. 2345 From our limited experiments with Curvy RED so far, recommended 2346 values of these parameters are: S_C = -1; g_C = 5; T = 5 * MTU at the 2347 link rate (about 1ms at 60Mb/s) for the range of base RTTs typical on 2348 the public Internet. [CRED_Insights] explains why these parameters 2349 are applicable whatever rate link this AQM implementation is deployed 2350 on and how the parameters would need to be adjusted for a scenario 2351 with a different range of RTTs (e.g. a data centre). The setting of 2352 k depends on policy (see Section 2.5 and Appendix C.2 respectively 2353 for its recommended setting and guidance on alternatives). 2355 There is also a cUrviness parameter, U, which is a small positive 2356 integer. It is likely to take the same hard-coded value for all 2357 implementations, once experiments have determined a good value. Only 2358 U=1 has been used in experiments so far, but results might be even 2359 better with U=2 or higher. 2361 Notes: 2363 1. The alternative of applying the AQMs at enqueue would shift some 2364 processing from the critical time when each packet is dequeued. 2365 However, it would also add a whole queue of delay to the control 2366 signals, making the control loop sloppier (for a typical RTT it 2367 would double the Classic queue's feedback delay). On a platform 2368 where packet timestamping is feasible, e.g. Linux, it is also 2369 easiest to apply the AQMs at dequeue because that is where 2370 queuing time is also measured. 2372 2. WRR better isolates the L4S queue from large delay bursts in the 2373 Classic queue, but it is slightly less simple than TS-FIFO. If 2374 WRR were used, a low default Classic weight (e.g. 1/16) would 2375 need to be configured in place of the time shift in line 5 of the 2376 initialization function (Figure 9). 2378 3. A step function is shown for simplicity. A ramp function (see 2379 Figure 5 and the discussion around it in Appendix A.1) is 2380 recommended, because it is more general than a step and has the 2381 potential to enable L4S congestion controls to converge more 2382 rapidly. 2384 4. An EWMA is only one possible way to filter bursts; other more 2385 adaptive smoothing methods could be valid and it might be 2386 appropriate to decrease the EWMA faster than it increases, 2387 e.g. by using the minimum of the smoothed and instantaneous queue 2388 delays, min(Q_C, qc.time()). 2390 B.2. Efficient Implementation of Curvy RED 2392 Although code optimization depends on the platform, the following 2393 notes explain where the design of Curvy RED was particularly 2394 motivated by efficient implementation. 2396 The Classic AQM at line 10b calls maxrand(2*U), which gives twice as 2397 much curviness as the call to maxrand(U) in the marking function at 2398 line 5c. This is the trick that implements the square rule in 2399 equation (1) (Section 2.1). This is based on the fact that, given a 2400 number X from 1 to 6, the probability that two dice throws will both 2401 be less than X is the square of the probability that one throw will 2402 be less than X. So, when U=1, the L4S marking function is linear and 2403 the Classic dropping function is squared. If U=2, L4S would be a 2404 square function and Classic would be quartic. And so on. 2406 The maxrand(u) function in lines 16-21 simply generates u random 2407 numbers and returns the maximum. Typically, maxrand(u) could be run 2408 in parallel out of band. For instance, if U=1, the Classic queue 2409 would require the maximum of two random numbers. So, instead of 2410 calling maxrand(2*U) in-band, the maximum of every pair of values 2411 from a pseudorandom number generator could be generated out-of-band, 2412 and held in a buffer ready for the Classic queue to consume. 2414 1: cred_dequeue(lq, cq, pkt) { % Couples L4S & Classic queues 2415 2: while ( lq.len() + cq.len() > 0 ) { 2416 3: if ( scheduler() == lq ) { 2417 4: lq.dequeue(pkt) % L4S scheduled 2418 5: if ((lq.time() > T) OR (Q_C >> (S_L-2) > maxrand(U))) 2419 6: mark(pkt) 2420 7: } else { 2421 8: cq.dequeue(pkt) % Classic scheduled 2422 9: Q_C += (qc.ns() - Q_C) >> g_C % Classic Q EWMA 2423 10: if ( (Q_C >> (S_C-2) ) > maxrand(2*U) ) { 2424 11: if ( (ecn(pkt) == 0) { % ECN field = not-ECT 2425 12: drop(pkt) % Squared drop, redo loop 2426 13: continue % continue to the top of the while loop 2427 14: } 2428 15: mark(pkt) 2429 16: } 2430 17: } 2431 18: return(pkt) % return the packet and stop here 2432 19: } 2433 20: return(NULL) % no packet to dequeue 2434 21: } 2436 Figure 11: Optimised Example Dequeue Pseudocode for Coupled DualQ 2437 AQM using Integer Arithmetic 2439 The two ranges, range_L and range_C are expressed as powers of 2 so 2440 that division can be implemented as a right bit-shift (>>) in lines 5 2441 and 10 of the integer variant of the pseudocode (Figure 11). 2443 For the integer variant of the pseudocode, an integer version of the 2444 rand() function used at line 25 of the maxrand(function) in Figure 10 2445 would be arranged to return an integer in the range 0 <= maxrand() < 2446 2^32 (not shown). This would scale up all the floating point 2447 probabilities in the range [0,1] by 2^32. 2449 Queuing delays are also scaled up by 2^32, but in two stages: i) In 2450 line 9 queuing time qc.ns() is returned in integer nanoseconds, 2451 making the value about 2^30 times larger than when the units were 2452 seconds, ii) then in lines 5 and 10 an adjustment of -2 to the right 2453 bit-shift multiplies the result by 2^2, to complete the scaling by 2454 2^32. 2456 In line 8 of the initialization function, the EWMA constant gamma is 2457 represented as an integer power of 2, g_C, so that in line 9 of the 2458 integer code the division needed to weight the moving average can be 2459 implemented by a right bit-shift (>> g_C). 2461 Appendix C. Choice of Coupling Factor, k 2463 C.1. RTT-Dependence 2465 Where Classic flows compete for the same capacity, their relative 2466 flow rates depend not only on the congestion probability, but also on 2467 their end-to-end RTT (= base RTT + queue delay). The rates of 2468 competing Reno [RFC5681] flows are roughly inversely proportional to 2469 their RTTs. Cubic exhibits similar RTT-dependence when in Reno- 2470 compatibility mode, but is less RTT-dependent otherwise. 2472 Until the early experiments with the DualQ Coupled AQM, the 2473 importance of the reasonably large Classic queue in mitigating RTT- 2474 dependence had not been appreciated. Appendix A.1.6 of 2475 [I-D.ietf-tsvwg-ecn-l4s-id] uses numerical examples to explain why 2476 bloated buffers had concealed the RTT-dependence of Classic 2477 congestion controls before that time. Then it explains why, the more 2478 that queuing delays have reduced, the more that RTT-dependence has 2479 surfaced as a potential starvation problem for long RTT flows. 2481 Given that congestion control on end-systems is voluntary, there is 2482 no reason why it has to be voluntarily RTT-dependent. Therefore 2483 [I-D.ietf-tsvwg-ecn-l4s-id] requires L4S congestion controls to be 2484 significantly less RTT-dependent than the standard Reno congestion 2485 control [RFC5681]. Following this approach means there is no need 2486 for network devices to address RTT-dependence, although there would 2487 be no harm if they did, which per-flow queuing inherently does. 2489 At the time of writing, the range of approaches to RTT-dependence in 2490 L4S congestion controls has not settled. Therefore, the guidance on 2491 the choice of the coupling factor in Appendix C.2 is given against 2492 DCTCP [RFC8257], which has well-understood RTT-dependence. The 2493 guidance is given for various RTT ratios, so that it can be adapted 2494 to future circumstances. 2496 C.2. Guidance on Controlling Throughput Equivalence 2498 +===============+======+=======+ 2499 | RTT_C / RTT_L | Reno | Cubic | 2500 +===============+======+=======+ 2501 | 1 | k'=1 | k'=0 | 2502 +---------------+------+-------+ 2503 | 2 | k'=2 | k'=1 | 2504 +---------------+------+-------+ 2505 | 3 | k'=2 | k'=2 | 2506 +---------------+------+-------+ 2507 | 4 | k'=3 | k'=2 | 2508 +---------------+------+-------+ 2509 | 5 | k'=3 | k'=3 | 2510 +---------------+------+-------+ 2512 Table 1: Value of k' for 2513 which DCTCP throughput is 2514 roughly the same as Reno or 2515 Cubic, for some example RTT 2516 ratios 2518 In the above appendices that give example DualQ Coupled algorithms, 2519 to aid efficient implementation, a coupling factor that is an integer 2520 power of 2 is always used. k' is always used to denote the power. k' 2521 is related to the coupling factor k in Equation (1) (Section 2.1) by 2522 k=2^k'. 2524 To determine the appropriate coupling factor policy, the operator 2525 first has to judge whether it wants DCTCP flows to have roughly equal 2526 throughput with Reno or with Cubic (because, even in its Reno- 2527 compatibility mode, Cubic is about 1.4 times more aggressive than 2528 Reno). Then the operator needs to decide at what ratio of RTTs it 2529 wants DCTCP and Classic flows to have roughly equal throughput. For 2530 example choosing k'=0 (equivalent to k=1) will make DCTCP throughput 2531 roughly the same as Cubic, _if their RTTs are the same_. 2533 However, even if the base RTTs are the same, the actual RTTs are 2534 unlikely to be the same, because Classic (Cubic or Reno) traffic 2535 needs roughly a typical base round trip of queue to avoid under- 2536 utilization and excess drop. Whereas L4S (DCTCP) does not. The 2537 operator might still choose this policy if it judges that DCTCP 2538 throughput should be rewarded for keeping its own queue short. 2540 On the other hand, the operator will choose one of the higher values 2541 for k', if it wants to slow DCTCP down to roughly the same throughput 2542 as Classic flows, to compensate for Classic flows slowing themselves 2543 down by causing themselves extra queuing delay. 2545 The values for k' in the table are derived from the formulae below, 2546 which were developed in [DCttH15]: 2548 2^k' = 1.64 (RTT_reno / RTT_dc) (5) 2549 2^k' = 1.19 (RTT_cubic / RTT_dc ) (6) 2551 For localized traffic from a particular ISP's data centre, using the 2552 measured RTTs, it was calculated that a value of k'=3 (equivalent to 2553 k=8) would achieve throughput equivalence, and experiments verified 2554 the formula very closely. 2556 For a typical mix of RTTs from local data centres and across the 2557 general Internet, a value of k'=1 (equivalent to k=2) is recommended 2558 as a good workable compromise. 2560 Authors' Addresses 2562 Koen De Schepper 2563 Nokia Bell Labs 2564 Antwerp 2565 Belgium 2567 Email: koen.de_schepper@nokia.com 2568 URI: https://www.bell-labs.com/usr/koen.de_schepper 2570 Bob Briscoe (editor) 2571 Independent 2572 United Kingdom 2574 Email: ietf@bobbriscoe.net 2575 URI: http://bobbriscoe.net/ 2577 Greg White 2578 CableLabs 2579 Louisville, CO, 2580 United States of America 2581 Email: G.White@CableLabs.com