draft-ietf-tsvwg-aqm-dualq-coupled-02.txt   draft-ietf-tsvwg-aqm-dualq-coupled-03.txt 
Transport Area working group (tsvwg) K. De Schepper Transport Area working group (tsvwg) K. De Schepper
Internet-Draft Nokia Bell Labs Internet-Draft Nokia Bell Labs
Intended status: Experimental B. Briscoe, Ed. Intended status: Experimental B. Briscoe, Ed.
Expires: May 3, 2018 CableLabs Expires: July 28, 2018 CableLabs
O. Bondarenko O. Bondarenko
Simula Research Lab Simula Research Lab
I. Tsang I. Tsang
Nokia Bell Labs Nokia
October 30, 2017 January 24, 2018
DualQ Coupled AQMs for Low Latency, Low Loss and Scalable Throughput DualQ Coupled AQMs for Low Latency, Low Loss and Scalable Throughput
(L4S) (L4S)
draft-ietf-tsvwg-aqm-dualq-coupled-02 draft-ietf-tsvwg-aqm-dualq-coupled-03
Abstract Abstract
Data Centre TCP (DCTCP) was designed to provide predictably low Data Centre TCP (DCTCP) was designed to provide predictably low
queuing latency, near-zero loss, and throughput scalability using queuing latency, near-zero loss, and throughput scalability using
explicit congestion notification (ECN) and an extremely simple explicit congestion notification (ECN) and an extremely simple
marking behaviour on switches. However, DCTCP does not co-exist with marking behaviour on switches. However, DCTCP does not co-exist with
existing TCP traffic---DCTCP is so aggressive that existing TCP existing TCP traffic---DCTCP is so aggressive that existing TCP
algorithms approach starvation. So, until now, DCTCP could only be algorithms approach starvation. So, until now, DCTCP could only be
deployed where a clean-slate environment could be arranged, such as deployed where a clean-slate environment could be arranged, such as
skipping to change at page 2, line 7 skipping to change at page 2, line 7
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on May 3, 2018. This Internet-Draft will expire on July 28, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the Copyright (c) 2018 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
skipping to change at page 2, line 35 skipping to change at page 2, line 35
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Problem and Scope . . . . . . . . . . . . . . . . . . . . 3 1.1. Problem and Scope . . . . . . . . . . . . . . . . . . . . 3
1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 5 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 5
1.3. Features . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3. Features . . . . . . . . . . . . . . . . . . . . . . . . 6
2. DualQ Coupled AQM . . . . . . . . . . . . . . . . . . . . . . 7 2. DualQ Coupled AQM . . . . . . . . . . . . . . . . . . . . . . 7
2.1. Coupled AQM . . . . . . . . . . . . . . . . . . . . . . . 7 2.1. Coupled AQM . . . . . . . . . . . . . . . . . . . . . . . 7
2.2. Dual Queue . . . . . . . . . . . . . . . . . . . . . . . 8 2.2. Dual Queue . . . . . . . . . . . . . . . . . . . . . . . 8
2.3. Traffic Classification . . . . . . . . . . . . . . . . . 8 2.3. Traffic Classification . . . . . . . . . . . . . . . . . 8
2.4. Overall DualQ Coupled AQM Structure . . . . . . . . . . . 8 2.4. Overall DualQ Coupled AQM Structure . . . . . . . . . . . 8
2.5. Normative Requirements for a DualQ Coupled AQM . . . . . 10 2.5. Normative Requirements for a DualQ Coupled AQM . . . . . 11
2.5.1. Functional Requirements . . . . . . . . . . . . . . . 10 2.5.1. Functional Requirements . . . . . . . . . . . . . . . 11
2.5.2. Management Requirements . . . . . . . . . . . . . . . 11 2.5.2. Management Requirements . . . . . . . . . . . . . . . 12
3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12 3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13
4. Security Considerations . . . . . . . . . . . . . . . . . . . 12 4. Security Considerations . . . . . . . . . . . . . . . . . . . 13
4.1. Overload Handling . . . . . . . . . . . . . . . . . . . . 12 4.1. Overload Handling . . . . . . . . . . . . . . . . . . . . 13
5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 14 4.1.1. Avoiding Classic Starvation: Sacrifice L4S Throughput
6. References . . . . . . . . . . . . . . . . . . . . . . . . . 14 or Delay? . . . . . . . . . . . . . . . . . . . . . . 14
6.1. Normative References . . . . . . . . . . . . . . . . . . 14 4.1.2. Congestion Signal Saturation: Introduce L4S Drop or
6.2. Informative References . . . . . . . . . . . . . . . . . 14 Delay? . . . . . . . . . . . . . . . . . . . . . . . 15
Appendix A. Example DualQ Coupled PI2 Algorithm . . . . . . . . 17 4.1.3. Protecting against Unresponsive ECN-Capable Traffic . 16
A.1. Pass #1: Core Concepts . . . . . . . . . . . . . . . . . 17 5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 16
A.2. Pass #2: Overload Details . . . . . . . . . . . . . . . . 22 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 16
Appendix B. Example DualQ Coupled Curvy RED Algorithm . . . . . 25 6.1. Normative References . . . . . . . . . . . . . . . . . . 17
Appendix C. Guidance on Controlling Throughput Equivalence . . . 31 6.2. Informative References . . . . . . . . . . . . . . . . . 17
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 32 Appendix A. Example DualQ Coupled PI2 Algorithm . . . . . . . . 20
A.1. Pass #1: Core Concepts . . . . . . . . . . . . . . . . . 20
A.2. Pass #2: Overload Details . . . . . . . . . . . . . . . . 25
Appendix B. Example DualQ Coupled Curvy RED Algorithm . . . . . 28
Appendix C. Guidance on Controlling Throughput Equivalence . . . 34
Appendix D. Open Issues . . . . . . . . . . . . . . . . . . . . 35
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 36
1. Introduction 1. Introduction
1.1. Problem and Scope 1.1. Problem and Scope
Latency is becoming the critical performance factor for many (most?) Latency is becoming the critical performance factor for many (most?)
applications on the public Internet, e.g. interactive Web, Web applications on the public Internet, e.g. interactive Web, Web
services, voice, conversational video, interactive video, interactive services, voice, conversational video, interactive video, interactive
remote presence, instant messaging, online gaming, remote desktop, remote presence, instant messaging, online gaming, remote desktop,
cloud-based applications, and video-assisted remote control of cloud-based applications, and video-assisted remote control of
skipping to change at page 3, line 48 skipping to change at page 4, line 5
problem (and others). Unlike Diffserv, which gives low latency to problem (and others). Unlike Diffserv, which gives low latency to
some traffic at the expense of others, AQM controls latency for _all_ some traffic at the expense of others, AQM controls latency for _all_
traffic in a class. In general, AQMs introduce an increasing level traffic in a class. In general, AQMs introduce an increasing level
of discard from the buffer the longer the queue persists above a of discard from the buffer the longer the queue persists above a
shallow threshold. This gives sufficient signals to capacity-seeking shallow threshold. This gives sufficient signals to capacity-seeking
(aka. greedy) flows to keep the buffer empty for its intended (aka. greedy) flows to keep the buffer empty for its intended
purpose: absorbing bursts. However, RED [RFC2309] and other purpose: absorbing bursts. However, RED [RFC2309] and other
algorithms from the 1990s were sensitive to their configuration and algorithms from the 1990s were sensitive to their configuration and
hard to set correctly. So, AQM was not widely deployed. hard to set correctly. So, AQM was not widely deployed.
More recent state-of-the-art AQMs, e.g. More recent state-of-the-art AQMs, e.g. fq_CoDel [RFC8290],
fq_CoDel [I-D.ietf-aqm-fq-codel], PIE [RFC8033], Adaptive PIE [RFC8033], Adaptive RED [ARED01], are easier to configure,
RED [ARED01], are easier to configure, because they define the because they define the queuing threshold in time not bytes, so it is
queuing threshold in time not bytes, so it is invariant for different invariant for different link rates. However, no matter how good the
link rates. However, no matter how good the AQM, the sawtoothing AQM, the sawtoothing rate of TCP will either cause queuing delay to
rate of TCP will either cause queuing delay to vary or cause the link vary or cause the link to be under-utilized. Even with a perfectly
to be under-utilized. Even with a perfectly tuned AQM, the tuned AQM, the additional queuing delay will be of the same order as
additional queuing delay will be of the same order as the underlying the underlying speed-of-light delay across the network. Flow-queuing
speed-of-light delay across the network. Flow-queuing can isolate can isolate one flow from another, but it cannot isolate a TCP flow
one flow from another, but it cannot isolate a TCP flow from the from the delay variations it inflicts on itself, and it has other
delay variations it inflicts on itself, and it has other problems - problems - it overrides the flow rate decisions of variable rate
it overrides the flow rate decisions of variable rate video video applications, it does not recognise the flows within IPSec VPN
applications, it does not recognise the flows within IPSec VPN
tunnels and it is relatively expensive to implement. tunnels and it is relatively expensive to implement.
It seems that further changes to the network alone will now yield It seems that further changes to the network alone will now yield
diminishing returns. Data Centre TCP (DCTCP [RFC8257]) teaches us diminishing returns. Data Centre TCP (DCTCP [RFC8257]) teaches us
that a small but radical change to TCP is needed to cut two major that a small but radical change to TCP is needed to cut two major
outstanding causes of queuing delay variability: outstanding causes of queuing delay variability:
1. the `sawtooth' varying rate of TCP itself; 1. the `sawtooth' varying rate of TCP itself;
2. the smoothing delay deliberately introduced into AQMs to permit 2. the smoothing delay deliberately introduced into AQMs to permit
skipping to change at page 4, line 47 skipping to change at page 4, line 52
`less unscalable' Cubic [I-D.ietf-tcpm-cubic] and `less unscalable' Cubic [I-D.ietf-tcpm-cubic] and
Compound [I-D.sridharan-tcpm-ctcp] variants of TCP have been Compound [I-D.sridharan-tcpm-ctcp] variants of TCP have been
successfully deployed. However, these are now approaching their successfully deployed. However, these are now approaching their
scaling limits. Unfortunately, fully scalable TCPs such as DCTCP scaling limits. Unfortunately, fully scalable TCPs such as DCTCP
cause `classic' TCP to starve itself, which is why they have been cause `classic' TCP to starve itself, which is why they have been
confined to private data centres or research testbeds (until now). confined to private data centres or research testbeds (until now).
This document specifies a `DualQ Coupled AQM' extension that solves This document specifies a `DualQ Coupled AQM' extension that solves
the problem of coexistence between scalable and classic flows, the problem of coexistence between scalable and classic flows,
without having to inspect flow identifiers. The AQM is not like without having to inspect flow identifiers. The AQM is not like
flow-queuing approaches [I-D.ietf-aqm-fq-codel] that classify packets flow-queuing approaches [RFC8290] that classify packets by flow
by flow identifier into numerous separate queues in order to isolate identifier into numerous separate queues in order to isolate sparse
sparse flows from the higher latency in the queues assigned to flows from the higher latency in the queues assigned to heavier flow.
heavier flow. In contrast, the AQM exploits the behaviour of In contrast, the AQM exploits the behaviour of scalable congestion
scalable congestion controls like DCTCP so that every packet in every controls like DCTCP so that every packet in every flow sharing the
flow sharing the queue for DCTCP-like traffic can be served with very queue for DCTCP-like traffic can be served with very low latency.
low latency.
This AQM extension can be combined with any single queue AQM that This AQM extension can be combined with any single queue AQM that
generates a statistical or deterministic mark/drop probability driven generates a statistical or deterministic mark/drop probability driven
by the queue dynamics. In many cases it simplifies the basic control by the queue dynamics. In many cases it simplifies the basic control
algorithm, and requires little extra processing. Therefore it is algorithm, and requires little extra processing. Therefore it is
believed the Coupled AQM would be applicable and easy to deploy in believed the Coupled AQM would be applicable and easy to deploy in
all types of buffers; buffers in cost-reduced mass-market residential all types of buffers; buffers in cost-reduced mass-market residential
equipment; buffers in end-system stacks; buffers in carrier-scale equipment; buffers in end-system stacks; buffers in carrier-scale
equipment including remote access servers, routers, firewalls and equipment including remote access servers, routers, firewalls and
Ethernet switches; buffers in network interface cards, buffers in Ethernet switches; buffers in network interface cards, buffers in
skipping to change at page 7, line 27 skipping to change at page 7, line 27
2.1. Coupled AQM 2.1. Coupled AQM
In the 1990s, the `TCP formula' was derived for the relationship In the 1990s, the `TCP formula' was derived for the relationship
between TCP's congestion window, cwnd, and its drop probability, p. between TCP's congestion window, cwnd, and its drop probability, p.
To a first order approximation, cwnd of TCP Reno is inversely To a first order approximation, cwnd of TCP Reno is inversely
proportional to the square root of p. proportional to the square root of p.
TCP Cubic implements a Reno-compatibility mode, which is the only TCP Cubic implements a Reno-compatibility mode, which is the only
relevant mode for typical RTTs under 20ms as long as the throughput relevant mode for typical RTTs under 20ms as long as the throughput
of a single flow is less than about 500Mb/s. Therefore it can be of a single flow is less than about 500Mb/s. Therefore it can be
assumed that Cubic traffic behaves similar to Reno (but with a assumed that Cubic traffic behaves similarly to Reno (but with a
slightly different constant of proportionality), and the term slightly different constant of proportionality), and the term
'Classic' will be used for the collection of Reno-friendly traffic 'Classic' will be used for the collection of Reno-friendly traffic
including Cubic in Reno mode. including Cubic in Reno mode.
The supporting paper [PI2] includes the derivation of the equivalent The supporting paper [PI2] includes the derivation of the equivalent
rate equation for DCTCP, for which cwnd is inversely proportional to rate equation for DCTCP, for which cwnd is inversely proportional to
p (not the square root), where in this case p is the ECN marking p (not the square root), where in this case p is the ECN marking
probability. DCTCP is not the only congestion control that behaves probability. DCTCP is not the only congestion control that behaves
like this, so the term 'L4S' traffic will be used for all similar like this, so the term 'L4S' traffic will be used for all similar
behaviour. behaviour.
skipping to change at page 8, line 33 skipping to change at page 8, line 33
other factors such as RTT being equal). The algorithm achieves this other factors such as RTT being equal). The algorithm achieves this
without having to inspect flow identifiers. without having to inspect flow identifiers.
2.3. Traffic Classification 2.3. Traffic Classification
Both the Coupled AQM and DualQ mechanisms need an identifier to Both the Coupled AQM and DualQ mechanisms need an identifier to
distinguish L and C packets. A separate draft distinguish L and C packets. A separate draft
[I-D.ietf-tsvwg-ecn-l4s-id] recommends using the ECT(1) codepoint of [I-D.ietf-tsvwg-ecn-l4s-id] recommends using the ECT(1) codepoint of
the ECN field as this identifier, having assessed various the ECN field as this identifier, having assessed various
alternatives. An additional process document has proved necessary to alternatives. An additional process document has proved necessary to
make the ECT(1) codepoint available for experimentation make the ECT(1) codepoint available for experimentation [RFC8311].
[I-D.ietf-tsvwg-ecn-experimentation].
2.4. Overall DualQ Coupled AQM Structure 2.4. Overall DualQ Coupled AQM Structure
Figure 1 shows the overall structure that any DualQ Coupled AQM is Figure 1 shows the overall structure that any DualQ Coupled AQM is
likely to have. This schematic is intended to aid understanding of likely to have. This schematic is intended to aid understanding of
the current designs of DualQ Coupled AQMs. However, it is not the current designs of DualQ Coupled AQMs. However, it is not
intended to preclude other innovative ways of satisfying the intended to preclude other innovative ways of satisfying the
normative requirements in Section 2.5 that minimally define a DualQ normative requirements in Section 2.5 that minimally define a DualQ
Coupled AQM. Coupled AQM.
The classifier on the left separates incoming traffic between the two The classifier on the left separates incoming traffic between the two
queues (L and C). Each queue has its own AQM that determines the queues (L and C). Each queue has its own AQM that determines the
likelihood of dropping or marking (p_L and p_C). Nonetheless, the likelihood of dropping or marking (p_L and p_C). Nonetheless, the
AQM for Classic traffic is implemented in two stages: i) a base stage AQM for Classic traffic is implemented in two stages: i) a base stage
that outputs an internal probability p; and ii) a squaring stage that that outputs an internal probability p' (pronounced p-prime); and ii)
outputs p_C, where a squaring stage that outputs p_C, where
p_C = p^2. p_C = (p')^2. (2)
This allows p_L to be coupled to p_C by marking L4S traffic This allows p_L to be coupled to p_C by marking L4S traffic
proportionately to the intermediate output from the first stage where proportionately to the intermediate output from the first stage.
Specifically, the output of the base AQM is coupled across to the L
queue in proportion to the output of the base AQM:
p_L = k*p p_CL = k*p', (3)
By substituting for p from the latter to the former equation, it can where k is the constant coupling factor (see Appendix C) and p_CL is
be seen that these two transformations of p implement the required the output from the coupling between the C queue and the L queue.
coupling given in equation (1) earlier:
p_C = ( p_L / k )^2 It can be seen in the following that these two transformations of p'
implement the required coupling given in equation (1) earlier.
Substituting for p' from equation (3) into (2):
The actual L4S marking probability p_L is a combination of this p_C = ( p_CL / k )^2.
output (k*p) and the output of a native L4S AQM, shown as a logical
(OR) function. Then, after the AQMs have applied their dropping or The actual L4S marking probability p_L is the maximum of the coupled
marking, the scheduler forwards their packets to the link, giving output (p_CL) and the output of a native L4S AQM (p'L), shown as
conditional priority to L4S traffic. '(MAX)' in the schematic. While the output of the Native L4S AQM is
high (p'L > p_CL) it will dominate the way L traffic is marked. When
the native L4S AQM output is lower, the way L traffic is marked will
be driven by the coupling, that is p_L = p_CL. So, whenever the
coupling is needed, as required from equation (1):
p_C = ( p_L / k )^2.
_________ _________
| | ,------. | | ,------.
L4S queue | |==>| ECN | L4S queue | |===>| ECN |
,'| _______|_| |marker|\ ,'| _______|_| |marker|\
<' | | `------'\\ <' | | `------'\\
//`' v ^ p_L \\ //`' v ^ p_L \\
// ,-------. | \\ // ,-------. | \\
// |Native | | \\,. // |Native |p'L | \\,.
// | L4S |->(OR) < | ___ // | L4S |-->(MAX) < | ___
,----------.// | AQM | ^ `\|.'Cond-`. ,----------.// | AQM | ^ p_CL `\|.'Cond-`.
| IP-ECN |/ `-------' | / itional \ | IP-ECN |/ `-------' | / itional \
==>|Classifier| ,-------. (k*p) [ priority]==> ==>|Classifier| ,-------. (k*p') [ priority]==>
| |\ | Base | | \scheduler/ | |\ | Base | | \scheduler/
`----------'\\ | AQM |-->: ,'|`-.___.-' `----------'\\ | AQM |--->: ,'|`-.___.-'
\\ | |p | <' | \\ | |p' | <' |
\\ `-------' (p^2) //`' \\ `-------' (p'^2) //`'
\\ ^ | // \\ ^ | //
\\,. | v p_C // \\,. | v p_C //
< | _________ .------.// < | _________ .------.//
`\| | | | Drop |/ `\| | | | Drop |/
Classic |queue |==>|/mark | Classic |queue |===>|/mark |
__|______| `------' __|______| `------'
Legend: ===> traffic flow; ---> control dependency. Legend: ===> traffic flow; ---> control dependency.
Figure 1: DualQ Coupled AQM Schematic Figure 1: DualQ Coupled AQM Schematic
After the AQMs have applied their dropping or marking, the scheduler
forwards their packets to the link, giving priority to L4S traffic.
Priority has to be conditional in some way (see Section 4.1). Simple
strict priority is inappropriate otherwise it could lead the L4S
queue to starve the Classic queue. For example, consider the case
where a continually busy L4S queue blocks a DNS request in the
Classic queue, arbitrarily delaying the start of a new Classic flow.
Example DualQ Coupled AQM algorithms called DualPI2 and Curvy RED are Example DualQ Coupled AQM algorithms called DualPI2 and Curvy RED are
given in Appendix A and Appendix B. Either example AQM can be used given in Appendix A and Appendix B. Either example AQM can be used
to couple packet marking and dropping across a dual Q. to couple packet marking and dropping across a dual Q.
DualPI2 uses a Proportional-Integral (PI) controller as the Base AQM. DualPI2 uses a Proportional-Integral (PI) controller as the Base AQM.
It is a principled simplification of PIE [RFC8033] that is both more
responsive and more stable in the face of dynamically varying load.
Indeed, this Base AQM with just the squared output and no L4S queue Indeed, this Base AQM with just the squared output and no L4S queue
can be used as a drop-in replacement for PIE, in which case we call can be used as a drop-in replacement for PIE [RFC8033], in which case
it just PI2 [PI2]. we call it just PI2 [PI2]. PI2 is a principled simplification of PIE
that is both more responsive and more stable in the face of
dynamically varying load.
Curvy RED is derived from RED [RFC2309], but its configuration Curvy RED is derived from RED [RFC2309], but its configuration
parameters are insensitive to link rate and it requires less parameters are insensitive to link rate and it requires less
operations per packet. However, DualPI2 is more responsive and operations per packet. However, DualPI2 is more responsive and
stable over a wider range of RTTs than Curvy RED. As a consequence, stable over a wider range of RTTs than Curvy RED. As a consequence,
DualPI2 has attracted more development attention than Curvy RED, DualPI2 has attracted more development attention than Curvy RED,
leaving the Curvy RED design incomplete and not so fully evaluated. leaving the Curvy RED design incomplete and not so fully evaluated.
Both AQMs regulate their queue in units of time not bytes. As Both AQMs regulate their queue in units of time not bytes. As
already explained, this ensures configuration can be invariant for already explained, this ensures configuration can be invariant for
different drain rates. With the dualQ this is particularly important different drain rates. With AQMs in a dualQ structure this is
because the drain rate of each queue can vary rapidly as flows for particularly important because the drain rate of each queue can vary
the two queues arrive and depart, even if the combined link rate is rapidly as flows for the two queues arrive and depart, even if the
constant. combined link rate is constant.
It would be possible to control the queues with other alternative It would be possible to control the queues with other alternative
AQMs, as long as the normative requirements (those expressed in AQMs, as long as the normative requirements (those expressed in
capitals) in Section 2.5 are observed. capitals) in Section 2.5 are observed.
2.5. Normative Requirements for a DualQ Coupled AQM 2.5. Normative Requirements for a DualQ Coupled AQM
The following requirements are intended to capture only the essential The following requirements are intended to capture only the essential
aspects of a DualQ Coupled AQM. They are intended to be independent aspects of a DualQ Coupled AQM. They are intended to be independent
of the particular AQMs used for each queue. of the particular AQMs used for each queue.
2.5.1. Functional Requirements 2.5.1. Functional Requirements
In the Dual Queue, L4S packets MUST be given priority over Classic, In the Dual Queue, L4S packets MUST be given priority over Classic,
although priority SHOULD {ToDo: MUST?} be bounded in order not to although priority MUST be bounded in order not to starve Classic
starve Classic traffic. traffic.
All L4S traffic MUST be ECN-capable. Some Classic traffic might also All L4S traffic MUST be ECN-capable. Some Classic traffic might also
be ECN-capable. be ECN-capable.
Whatever identifier is used for L4S experiments, Whatever identifier is used for L4S experiments,
[I-D.ietf-tsvwg-ecn-l4s-id] defines the meaning of an ECN marking on [I-D.ietf-tsvwg-ecn-l4s-id] defines the meaning of an ECN marking on
L4S traffic, relative to drop of Classic traffic. In order to L4S traffic, relative to drop of Classic traffic. In order to
prevent starvation of Classic traffic by scalable L4S traffic, it prevent starvation of Classic traffic by scalable L4S traffic, it
says, "The likelihood that an AQM drops a Not-ECT Classic packet says, "The likelihood that an AQM drops a Not-ECT Classic packet
(p_C) MUST be roughly proportional to the square of the likelihood (p_C) MUST be roughly proportional to the square of the likelihood
skipping to change at page 11, line 48 skipping to change at page 12, line 41
[RFC0970]. In such cases, the choice of k will solely affect [RFC0970]. In such cases, the choice of k will solely affect
relative flow rates within each customer's access capacity, not relative flow rates within each customer's access capacity, not
between customers. Also, k will not affect relative flow rates at between customers. Also, k will not affect relative flow rates at
any times when all flows are Classic or all L4S, and it will not any times when all flows are Classic or all L4S, and it will not
affect small flows. affect small flows.
2.5.2. Management Requirements 2.5.2. Management Requirements
By default, a DualQ Coupled AQM SHOULD NOT need any configuration for By default, a DualQ Coupled AQM SHOULD NOT need any configuration for
use at a bottleneck on the public Internet [RFC7567]. The following use at a bottleneck on the public Internet [RFC7567]. The following
parameters MAY be operator-configurable, e.g. for use in non-Internet parameters MAY be operator-configurable, e.g. to tune for non-
settings: Internet settings:
o Optional packet classifier(s) to use in addition to the ECN field
{ToDo: e.g. ARP};
o Optional packet classifier(s) to use in addition to the ECN field;
o Expected typical RTT (a parameter for typical or target queuing o Expected typical RTT (a parameter for typical or target queuing
delay in each queue might be configurable instead); delay in each queue might be configurable instead);
o Expected maximum RTT (a stability parameter that depends on o Expected maximum RTT (a stability parameter that depends on
maximum RTT might be configurable instead); maximum RTT might be configurable instead);
o Coupling factor, k; o Coupling factor, k;
o The limit to the conditional priority of L4S (e.g. the Classic o The limit to the conditional priority of L4S (scheduler-dependent,
queuing delay beyond which L4S packets no longer have priority); e.g. the scheduler weight for WRR, or the time-shift for time-
shifted FIFO);
o The maximum Classic ECN marking probability, p_Cmax, before o The maximum Classic ECN marking probability, p_Cmax, before
switching over to drop. switching over to drop.
An experimental DualQ Coupled AQM SHOULD allow the operator to An experimental DualQ Coupled AQM SHOULD allow the operator to
monitor the following operational statistics: monitor the following operational statistics:
o Bits forwarded (total and per queue per sample interval), from o Bits forwarded (total and per queue per sample interval), from
which utilization can be calculated which utilization can be calculated
skipping to change at page 12, line 47 skipping to change at page 13, line 43
3. IANA Considerations 3. IANA Considerations
This specification contains no IANA considerations. This specification contains no IANA considerations.
4. Security Considerations 4. Security Considerations
4.1. Overload Handling 4.1. Overload Handling
Where the interests of users or flows might conflict, it could be Where the interests of users or flows might conflict, it could be
necessary to police traffic to isolate any harm to performance. This necessary to police traffic to isolate any harm to the performance of
is a policy issue that needs to be separable from a basic AQM, but an individual flows. However it is hard to avoid unintended side-
AQM does need to handle overload. A trade-off needs to be made effects with policing, and in a trusted environment policing is not
between complexity and the risk of either class harming the other. necessary. Therefore per-flow policing needs to be separable from a
It is an operator policy to define what must happen if the service basic AQM, as an option under policy control.
time of the classic queue becomes too great. In the following
subsections three optional non-exclusive overload protections are
defined. Their objective is for the overload behaviour of the DualQ
AQM to be similar to a single queue AQM. The example implementation
in Appendix A implements the 'delay on overload' policy. Other
overload protections can be envisaged:
Minimum throughput service: By replacing the priority scheduler However, a basic DualQ AQM does at least need to handle overload. A
with a weighted round robin scheduler, a minimum throughput useful objective would be for the overload behaviour of the DualQ AQM
service can be guaranteed for Classic traffic. Typically the to be at least no worse than a single queue AQM. However, a trade-
scheduling weight of the Classic queue will be small (e.g. 5%) to off needs to be made between complexity and the risk of either
avoid interference with the coupling but big enough to avoid traffic class harming the other. In each of the following three
complete starvation of Classic traffic. In practice it will be subsections, an overload issue specific to the DualQ is described,
hard to set the scheduling weights to give each queue a useful followed by proposed solution(s).
share of the link for any traffic scenario, so this approach is
not recommended.
Delay on overload: To control milder overload of responsive traffic, Under overload the higher priority L4S service will have to sacrifice
particularly when close to the maximum congestion signal, delay some aspect of its performance. Alternative solutions are provided
can be used as an alternative congestion control mechanism. The below that each relax a different factor: e.g. throughput, delay,
Dual Queue Coupled AQM can be made to behave like a single First- drop. Some of these choices might need to be determined by operator
In First-Out (FIFO) queue with different service times by policy or by the developer, rather than by the IETF. {ToDo: Reach
replacing the priority scheduler with a very simple scheduler that consensus on which it is to be in each case.}
could be called a "time-shifted FIFO", which is the same as the
Modifier Earliest Deadline First (MEDF) scheduler of [MEDF]. The
scheduler adds tshift to the queue delay of the next L4S packet,
before comparing it with the queue delay of the next Classic
packet, then it selects the packet with the greater adjusted queue
delay. Under regular conditions, this time-shifted FIFO scheduler
behaves just like a strict priority scheduler. But under moderate
or high overload it prevents starvation of the Classic queue,
because the time-shift defines the maximum extra queuing delay
(tshift) of Classic packets relative to L4S.
Drop on overload: On severe overload, e.g. due to non responsive 4.1.1. Avoiding Classic Starvation: Sacrifice L4S Throughput or Delay?
traffic, queues will typically overflow and packet drop will be
unavoidable. It is important to avoid unresponsive ECN traffic
(either Classic or L4S) driving the AQM to 100% drop and mark
probability. Congestion controls that have a minimum congestion
window will become unresponsive to ECN marking when the marking
probability is high. This situation can be avoided by applying
the drop probability to all packets of all traffic types when it
exceeds a certain threshold or by limiting the drop and marking
probabilities to a lower maximum value (up to where 'fairness'
between the different traffic types is still guaranteed) and rely
on delay to control temporary high congestion and eventually queue
overflow. If the classic drop probability is applied to all types
of traffic when it is higher than a threshold probability the
queueing delay can be controlled up to any overload situation, and
no further measures are required. If a maximum classic and
coupled L4S probability of less than 100% is used, both queues
need scheduling opportunities and should eventually experience
drop. This can be achieved with a scheduler that guarantees a
minimum throughput for each queue, such as a weighted round robin
or time-shifted FIFO scheduler. In that case a common queue limit
can be configured that will drop packets of both types of
traffic.{ToDo: reword this bullet to improve comprehensibility}
To keep the throughput of both L4S and Classic flows equal over the Priority of L4S is required to be conditional to avoid total
full load range, a different control strategy needs to be defined throughput starvation of Classic by heavy L4S traffic. This raises
above the point where one congestion control first saturates to a the question of whether to sacrifice L4S throughput or L4S delay (or
probability of 100% (if k>1, L4S will saturate first). Possible some other policy) to mitigate starvation of Classic:
strategies include: also dropping L4S; increasing the queueing delay
for both; or ensuring that L4S traffic still responds to marking Sacrifice L4S throughput: By using weighted round robin as the
below a window of 2 segments (see [I-D.ietf-tsvwg-ecn-l4s-id]). conditional priority scheduler, the L4S service can sacrifice some
throughput during overload to guarantee a minimum throughput
service for Classic traffic. The scheduling weight of the Classic
queue should be small (e.g. 1/16). Then, in most traffic
scenarios the scheduler will not interfere and it will not need to
- the coupling mechanism and the end-systems will share out the
capacity across both queues as if it were a single pool. However,
because the congestion coupling only applies in one direction
(from C to L), if L4S traffic is over-aggressive or unresponsive,
the scheduler weight for Classic traffic will at least be large
enough to ensure it does not starve.
In cases where the ratio of L4S to Classic flows (e.g. 19:1) is
greater than the ratio of their scheduler weights (e.g. 15:1), the
L4S flows will get less than an equal share of the capacity, but
only slightly. For instance, with the example numbers given, each
L4S flow will get (15/16)/19 = 4.9% when ideally each would get
1/20=5%. In the rather specific case of an unresponsive flow
taking up a large part of the capacity set aside for L4S, using
WRR could significantly reduce the capacity left for any
responsive L4S flows.
Sacrifice L4S Delay: To control milder overload of responsive
traffic, particularly when close to the maximum congestion signal,
the operator could choose to control overload of the Classic queue
by allowing some delay to 'leak' across to the L4S queue. The
scheduler can be made to behave like a single First-In First-Out
(FIFO) queue with different service times by implementing a very
simple conditional priority scheduler that could be called a
"time-shifted FIFO" (see the Modifier Earliest Deadline First
(MEDF) scheduler of [MEDF]). This scheduler adds tshift to the
queue delay of the next L4S packet, before comparing it with the
queue delay of the next Classic packet, then it selects the packet
with the greater adjusted queue delay. Under regular conditions,
this time-shifted FIFO scheduler behaves just like a strict
priority scheduler. But under moderate or high overload it
prevents starvation of the Classic queue, because the time-shift
(tshift) defines the maximum extra queuing delay of Classic
packets relative to L4S.
The example implementation in Appendix A can implement either policy.
4.1.2. Congestion Signal Saturation: Introduce L4S Drop or Delay?
To keep the throughput of both L4S and Classic flows roughly equal
over the full load range, a different control strategy needs to be
defined above the point where one AQM first saturates to a
probability of 100% leaving no room to push back the load any harder.
If k>1, L4S will saturate first, but saturation can be caused by
unresponsive traffic in either queue.
The term 'unresponsive' includes cases where a flow becomes
temporarily unresponsive, for instance, a real-time flow that takes a
while to adapt its rate in response to congestion, or a TCP-like flow
that is normally responsive, but above a certain congestion level it
will not be able to reduce its congestion window below the minimum of
2 segments, effectively becoming unresponsive. (Note that L4S
traffic ought to remain responsive below a window of 2 segments (see
[I-D.ietf-tsvwg-ecn-l4s-id]).
Saturation raises the question of whether to relieve congestion by
introducing some drop into the L4S queue or by allowing delay to grow
in both queues (which could eventually lead to tail drop too):
Drop on Saturation: Saturation can be avoided by setting a maximum
threshold for L4S ECN marking (assuming k>1) before saturation
starts to make the flow rates of the different traffic types
diverge. Above that the drop probability of Classic traffic is
applied to all packets of all traffic types. Then experiments
have shown that queueing delay can be kept at the target in any
overload situation, including with unresponsive traffic, and no
further measures are required.
Delay on Saturation: When L4S marking saturates, instead of
switching to drop, the drop and marking probabilities could be
capped. Beyond that, delay will grow either solely in the queue
with unresponsive traffic (if WRR is used), or in both queues (if
time-shifted FIFO is used). In either case, the higher delay
ought to control temporary high congestion. If the overload is
more persistent, eventually the combined DualQ will overflow and
tail drop will control congestion.
The example implementation in Appendix A applies only the "drop on
saturation" policy.
4.1.3. Protecting against Unresponsive ECN-Capable Traffic
Unresponsive traffic has a greater advantage if it is also ECN-
capable. The advantage is undetectable at normal low levels of drop/
marking, but it becomes significant with the higher levels of drop/
marking typical during overload. This is an issue whether the ECN-
capable traffic is L4S or Classic.
This raises the question of whether and when to switch off ECN
marking and use solely drop instead, as required by both Section 7 of
[RFC3168] and Section 4.2.1 of [RFC7567].
Experiments with the DualPI2 AQM (Appendix A) have shown that
introducing 'drop on saturation' at 100% L4S marking addresses this
problem with unresponsive ECN as well as addressing the saturation
problem. It leaves only a small range of congestion levels where
unresponsive traffic gains any advantage from using the ECN
capability, and the advantage is hardly detectable [DualQ-Test].
5. Acknowledgements 5. Acknowledgements
Thanks to Anil Agarwal, Sowmini Varadhan's and Gabi Bracha for Thanks to Anil Agarwal, Sowmini Varadhan's and Gabi Bracha for
detailed review comments particularly of the appendices and detailed review comments particularly of the appendices and
suggestions on how to make our explanation clearer. suggestions on how to make our explanation clearer. Thanks also to
Greg White and Tom Henderson for insights on the choice of schedulers
and queue delay measurement techniques.
The authors' contributions are part-funded by the European Community The authors' contributions were originally part-funded by the
under its Seventh Framework Programme through the Reducing Internet European Community under its Seventh Framework Programme through the
Transport Latency (RITE) project (ICT-317700). Bob Briscoe's Reducing Internet Transport Latency (RITE) project (ICT-317700). Bob
contribution was also part-funded by the Research Council of Norway Briscoe's contribution was also part-funded by the Research Council
through the TimeIn project. The views expressed here are solely of Norway through the TimeIn project. The views expressed here are
those of the authors. solely those of the authors.
6. References 6. References
6.1. Normative References 6.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
6.2. Informative References 6.2. Informative References
[ARED01] Floyd, S., Gummadi, R., and S. Shenker, "Adaptive RED: An [ARED01] Floyd, S., Gummadi, R., and S. Shenker, "Adaptive RED: An
skipping to change at page 15, line 22 skipping to change at page 17, line 35
2015, 2015,
<http://www.bobbriscoe.net/projects/latency/credi_tr.pdf>. <http://www.bobbriscoe.net/projects/latency/credi_tr.pdf>.
[DCttH15] De Schepper, K., Bondarenko, O., Briscoe, B., and I. [DCttH15] De Schepper, K., Bondarenko, O., Briscoe, B., and I.
Tsang, "`Data Centre to the Home': Ultra-Low Latency for Tsang, "`Data Centre to the Home': Ultra-Low Latency for
All", 2015, <http://www.bobbriscoe.net/projects/latency/ All", 2015, <http://www.bobbriscoe.net/projects/latency/
dctth_preprint.pdf>. dctth_preprint.pdf>.
(Under submission) (Under submission)
[I-D.ietf-aqm-fq-codel] [DualQ-Test]
Hoeiland-Joergensen, T., McKenney, P., Steen, H., "Destruction Testing: Ultra-Low Delay using
dave.taht@gmail.com, d., Gettys, J., and E. Dumazet, "The Dual Queue Coupled Active Queue Management", Masters
FlowQueue-CoDel Packet Scheduler and Active Queue Thesis, Dept of Informatics, Uni Oslo , May 2017.
Management Algorithm", draft-ietf-aqm-fq-codel-06 (work in
progress), March 2016.
[I-D.ietf-tcpm-cubic] [I-D.ietf-tcpm-cubic]
Rhee, I., Xu, L., Ha, S., Zimmermann, A., Eggert, L., and Rhee, I., Xu, L., Ha, S., Zimmermann, A., Eggert, L., and
R. Scheffenegger, "CUBIC for Fast Long-Distance Networks", R. Scheffenegger, "CUBIC for Fast Long-Distance Networks",
draft-ietf-tcpm-cubic-06 (work in progress), September draft-ietf-tcpm-cubic-07 (work in progress), November
2017. 2017.
[I-D.ietf-tsvwg-ecn-experimentation]
Black, D., "Explicit Congestion Notification (ECN)
Experimentation", draft-ietf-tsvwg-ecn-experimentation-00
(work in progress), November 2016.
[I-D.ietf-tsvwg-ecn-l4s-id] [I-D.ietf-tsvwg-ecn-l4s-id]
Schepper, K., Briscoe, B., and I. Tsang, "Identifying Schepper, K., Briscoe, B., and I. Tsang, "Identifying
Modified Explicit Congestion Notification (ECN) Semantics Modified Explicit Congestion Notification (ECN) Semantics
for Ultra-Low Queuing Delay", draft-ietf-tsvwg-ecn-l4s- for Ultra-Low Queuing Delay", draft-ietf-tsvwg-ecn-l4s-
id-00 (work in progress), November 2016. id-00 (work in progress), November 2016.
[I-D.ietf-tsvwg-l4s-arch] [I-D.ietf-tsvwg-l4s-arch]
Briscoe, B., Schepper, K., and M. Bagnulo, "Low Latency, Briscoe, B., Schepper, K., and M. Bagnulo, "Low Latency,
Low Loss, Scalable Throughput (L4S) Internet Service: Low Loss, Scalable Throughput (L4S) Internet Service:
Architecture", draft-ietf-tsvwg-l4s-arch-00 (work in Architecture", draft-ietf-tsvwg-l4s-arch-00 (work in
skipping to change at page 17, line 24 skipping to change at page 19, line 30
Recommendations Regarding Active Queue Management", Recommendations Regarding Active Queue Management",
BCP 197, RFC 7567, DOI 10.17487/RFC7567, July 2015, BCP 197, RFC 7567, DOI 10.17487/RFC7567, July 2015,
<https://www.rfc-editor.org/info/rfc7567>. <https://www.rfc-editor.org/info/rfc7567>.
[RFC8033] Pan, R., Natarajan, P., Baker, F., and G. White, [RFC8033] Pan, R., Natarajan, P., Baker, F., and G. White,
"Proportional Integral Controller Enhanced (PIE): A "Proportional Integral Controller Enhanced (PIE): A
Lightweight Control Scheme to Address the Bufferbloat Lightweight Control Scheme to Address the Bufferbloat
Problem", RFC 8033, DOI 10.17487/RFC8033, February 2017, Problem", RFC 8033, DOI 10.17487/RFC8033, February 2017,
<https://www.rfc-editor.org/info/rfc8033>. <https://www.rfc-editor.org/info/rfc8033>.
[RFC8034] White, G. and R. Pan, "Active Queue Management (AQM) Based
on Proportional Integral Controller Enhanced PIE) for
Data-Over-Cable Service Interface Specifications (DOCSIS)
Cable Modems", RFC 8034, DOI 10.17487/RFC8034, February
2017, <https://www.rfc-editor.org/info/rfc8034>.
[RFC8257] Bensley, S., Thaler, D., Balasubramanian, P., Eggert, L., [RFC8257] Bensley, S., Thaler, D., Balasubramanian, P., Eggert, L.,
and G. Judd, "Data Center TCP (DCTCP): TCP Congestion and G. Judd, "Data Center TCP (DCTCP): TCP Congestion
Control for Data Centers", RFC 8257, DOI 10.17487/RFC8257, Control for Data Centers", RFC 8257, DOI 10.17487/RFC8257,
October 2017, <https://www.rfc-editor.org/info/rfc8257>. October 2017, <https://www.rfc-editor.org/info/rfc8257>.
[RFC8290] Hoeiland-Joergensen, T., McKenney, P., Taht, D., Gettys,
J., and E. Dumazet, "The Flow Queue CoDel Packet Scheduler
and Active Queue Management Algorithm", RFC 8290,
DOI 10.17487/RFC8290, January 2018,
<https://www.rfc-editor.org/info/rfc8290>.
[RFC8311] Black, D., "Relaxing Restrictions on Explicit Congestion
Notification (ECN) Experimentation", RFC 8311,
DOI 10.17487/RFC8311, January 2018,
<https://www.rfc-editor.org/info/rfc8311>.
Appendix A. Example DualQ Coupled PI2 Algorithm Appendix A. Example DualQ Coupled PI2 Algorithm
As a first concrete example, the pseudocode below gives the DualPI2 As a first concrete example, the pseudocode below gives the DualPI2
algorithm. DualPI2 follows the structure of the DualQ Coupled AQM algorithm. DualPI2 follows the structure of the DualQ Coupled AQM
framework in Figure 1. A simple step threshold (in units of queuing framework in Figure 1. A simple step threshold (in units of queuing
time) is used for the Native L4S AQM. And the PI2 algorithm [PI2] is time) is used for the Native L4S AQM, but a ramp is also described as
used for the Classic AQM. PI2 is an improved variant of the PIE AQM an alternative. And the PI2 algorithm [PI2] is used for the Classic
[RFC8033]. AQM. PI2 is an improved variant of the PIE AQM [RFC8033].
We will introduce the pseudocode in two passes. The first pass We will introduce the pseudocode in two passes. The first pass
explains the core concepts, deferring handling of overload to the explains the core concepts, deferring handling of overload to the
second pass. To aid comparison, line numbers are kept in step second pass. To aid comparison, line numbers are kept in step
between the two passes by using letter suffixes where the longer code between the two passes by using letter suffixes where the longer code
needs extra lines. needs extra lines.
A full open source implementation for Linux is available at: A full open source implementation for Linux is available at:
https://github.com/olgabo/dualpi2. https://github.com/olgabo/dualpi2.
skipping to change at page 18, line 17 skipping to change at page 20, line 41
o enqueue code (Figure 3) o enqueue code (Figure 3)
o dequeue code (Figure 4) o dequeue code (Figure 4)
o code to regularly update the base probability (p) used in the o code to regularly update the base probability (p) used in the
dequeue code (Figure 5). dequeue code (Figure 5).
It also uses the following functions that are not shown in full here: It also uses the following functions that are not shown in full here:
o scheduler(), which selects between the head packets of the two
queues; the choice of scheduler technology is discussed later;
o cq.len() or lq.len() returns the current length (aka. backlog) of
the relevant queue in bytes;
o cq.time() or lq.time() returns the current queuing delay (aka. o cq.time() or lq.time() returns the current queuing delay (aka.
sojourn time or service time) of the relevant queue in units of sojourn time or service time) of the relevant queue in units of
time; time;
o cq.len() or lq.len() returns the current length (aka. backlog) of Queuing delay could be measured directly by storing a per-packet
the relevant queue in bytes; time-stamp as each packet is enqueued, and subtracting this from the
system time when the packet is dequeued. If time-stamping is not
easy to introduce with certain hardware, queuing delay could be
predicted indirectly by dividing the size of the queue by the
predicted departure rate, which might be known precisely for some
link technologies (see for example [RFC8034]).
In our experiments so far (building on experiments with PIE) on In our experiments so far (building on experiments with PIE) on
broadband access links ranging from 4 Mb/s to 200 Mb/s with base RTTs broadband access links ranging from 4 Mb/s to 200 Mb/s with base RTTs
from 5 ms to 100 ms, DualPI2 achieves good results with the default from 5 ms to 100 ms, DualPI2 achieves good results with the default
parameters in Figure 2. The parameters are categorised by whether parameters in Figure 2. The parameters are categorised by whether
they relate to the Base PI2 AQM, the L4S AQM or the framework they relate to the Base PI2 AQM, the L4S AQM or the framework
coupling them together. Variables derived from these parameters are coupling them together. Variables derived from these parameters are
also included at the end of each category. Each parameter is also included at the end of each category. Each parameter is
explained as it is encountered in the walk-through of the pseudocode explained as it is encountered in the walk-through of the pseudocode
below. below.
skipping to change at page 19, line 18 skipping to change at page 21, line 33
4: Tupdate = 16 ms % PI Classic queue sampling interval 4: Tupdate = 16 ms % PI Classic queue sampling interval
5: alpha = 10 Hz^2 % PI integral gain 5: alpha = 10 Hz^2 % PI integral gain
6: beta = 100 Hz^2 % PI proportional gain 6: beta = 100 Hz^2 % PI proportional gain
7: p_Cmax = 1/4 % Max Classic drop/mark prob 7: p_Cmax = 1/4 % Max Classic drop/mark prob
8: % Derived PI2 AQM variables 8: % Derived PI2 AQM variables
9: alpha_U = alpha *Tupdate % PI integral gain per update interval 9: alpha_U = alpha *Tupdate % PI integral gain per update interval
10: beta_U = beta * Tupdate % PI prop'nal gain per update interval 10: beta_U = beta * Tupdate % PI prop'nal gain per update interval
11: 11:
12: % DualQ Coupled framework parameters 12: % DualQ Coupled framework parameters
13: k = 2 % Coupling factor 13: k = 2 % Coupling factor
14: tshift = 2 * target % Scheduler time bias 14: % scheduler weight or equival't parameter (scheduler-dependent)
15: limit = MAX_LINK_RATE * 250 ms % Dual buffer size 15: limit = MAX_LINK_RATE * 250 ms % Dual buffer size
16: 16:
17: % L4S AQM parameters 17: % L4S AQM parameters
18: T_time = 1 ms % L4S marking threshold in time 18: T_time = 1 ms % L4S marking threshold in time
19: T_len = 2 * MTU % Min L4S marking threshold in bytes 19: T_len = 2 * MTU % Min L4S marking threshold in bytes
20: % Derived L4S AQM variables 20: % Derived L4S AQM variables
21: p_Lmax = min(k*sqrt(p_Cmax), 1) % Max L4S marking prob 21: p_Lmax = min(k*sqrt(p_Cmax), 1) % Max L4S marking prob
22: } 22: }
Figure 2: Example Header Pseudocode for DualQ Coupled PI2 AQM Figure 2: Example Header Pseudocode for DualQ Coupled PI2 AQM
The base probability (p) is an internal variable from which the The overall goal of the code is to maintain the base probability (p),
marking and dropping probabilities for L4S and Classic traffic (p_L which is an internal variable from which the marking and dropping
and p_C) are derived, as shown in Figure 1. These probabilities are probabilities for L4S and Classic traffic (p_L and p_C) are derived.
derived in lines 3, 4 and 5 of the dualpi2_update() function The variable named p in the pseudocode and in this walk-through is
the same as p' (p-prime) in Section 2.4. The probabilities p_L and
p_C are derived in lines 3, 4 and 5 of the dualpi2_update() function
(Figure 5) then used in the dualpi2_dequeue() function (Figure 4). (Figure 5) then used in the dualpi2_dequeue() function (Figure 4).
The code walk-through below builds up to explaining that part of the
code eventually, but it starts from packet arrival.
1: dualpi2_enqueue(lq, cq, pkt) { % Test limit and classify lq or cq 1: dualpi2_enqueue(lq, cq, pkt) { % Test limit and classify lq or cq
2: stamp(pkt) % attach arrival time to packet 2: if ( lq.len() + cq.len() > limit )
3: if ( lq.len() + cq.len() > limit ) 3: drop(pkt) % drop packet if buffer is full
4: drop(pkt) % drop packet if buffer is full 4: else { % Packet classifier
5: else { % Packet classifier 5: if ( ecn(pkt) modulo 2 == 1 ) % ECN bits = ECT(1) or CE
6: if ( ecn(pkt) modulo 2 == 1 ) % ECN bits = ECT(1) or CE 6: lq.enqueue(pkt)
7: lq.enqueue(pkt) 7: else % ECN bits = not-ECT or ECT(0)
8: else % ECN bits = not-ECT or ECT(0) 8: cq.enqueue(pkt)
9: cq.enqueue(pkt) 9: }
10: } 10: }
11: }
Figure 3: Example Enqueue Pseudocode for DualQ Coupled PI2 AQM Figure 3: Example Enqueue Pseudocode for DualQ Coupled PI2 AQM
1: dualpi2_dequeue(lq, cq, pkt) { % Couples L4S & Classic queues 1: dualpi2_dequeue(lq, cq, pkt) { % Couples L4S & Classic queues
2: while ( lq.len() + cq.len() > 0 ) 2: while ( lq.len() + cq.len() > 0 )
3: if ( lq.time() + tshift >= cq.time() ) { % time-shifted FIFO 3: if ( scheduler() == lq ) {
4: lq.dequeue(pkt) 4: lq.dequeue(pkt) % Scheduler chooses lq
5: if ( ((pkt.time() > T_time) % step marking ... 5: if ( ((lq.time() > T_time) % step marking ...
6: AND (lq.len() > T_len)) 6: AND (lq.len() > T_len))
7: OR (p_L > rand()) ) % ...or linear marking 7: OR (p_CL > rand()) ) % ...or linear marking
8: mark(pkt) 8: mark(pkt)
9: } else { 9: } else {
10: cq.dequeue(pkt) 10: cq.dequeue(pkt) % Scheduler chooses cq
11: if ( p_C > rand() ) { % probability p_C = p^2 11: if ( p_C > rand() ) { % probability p_C = p^2
12: if ( ecn(pkt) == 0 ) { % if ECN field = not-ECT 12: if ( ecn(pkt) == 0 ) { % if ECN field = not-ECT
13: drop(pkt) % squared drop 13: drop(pkt) % squared drop
14: continue % continue to the top of the while loop 14: continue % continue to the top of the while loop
15: } 15: }
16: mark(pkt) % squared mark 16: mark(pkt) % squared mark
17: } 17: }
18: } 18: }
19: return(pkt) % return the packet and stop 19: return(pkt) % return the packet and stop
20: } 20: }
21: return(NULL) % no packet to dequeue 21: return(NULL) % no packet to dequeue
22: } 22: }
Figure 4: Example Dequeue Pseudocode for DualQ Coupled PI2 AQM Figure 4: Example Dequeue Pseudocode for DualQ Coupled PI2 AQM
1: dualpi2_update(lq, cq, target) { % Update p every Tupdate
2: curq = cq.time() % use queuing time of first-in Classic packet
3: p = p + alpha_U * (curq - target) + beta_U * (curq - prevq)
4: p_L = p * k % L4S prob = base prob * coupling factor
5: p_C = p^2 % Classic prob = (base prob)^2
6: prevq = curq
7: }
Figure 5: Example PI-Update Pseudocode for DualQ Coupled PI2 AQM
When packets arrive, first a common queue limit is checked as shown When packets arrive, first a common queue limit is checked as shown
in line 3 of the enqueuing pseudocode in Figure 3. Note that the in line 2 of the enqueuing pseudocode in Figure 3. Note that the
limit is deliberately tested before enqueue to avoid any bias against limit is deliberately tested before enqueue to avoid any bias against
larger packets (so the actual buffer has to be one packet larger than larger packets (so the actual buffer has to be one MTU larger than
limit). If limit is not exceeded, the packet will be classified and limit). If limit is not exceeded, the packet will be classified and
enqueued to the Classic or L4S queue dependent on the least enqueued to the Classic or L4S queue dependent on the least
significant bit of the ECN field in the IP header (line 6). Packets significant bit of the ECN field in the IP header (line 5). Packets
with a codepoint having an LSB of 0 (Not-ECT and ECT(0)) will be with a codepoint having an LSB of 0 (Not-ECT and ECT(0)) will be
enqueued in the Classic queue. Otherwise, ECT(1) and CE packets will enqueued in the Classic queue. Otherwise, ECT(1) and CE packets will
be enqueued in the L4S queue. Optional additional packet be enqueued in the L4S queue. Optional additional packet
classification flexibility is omitted for brevity. classification flexibility is omitted for brevity.
The dequeue pseudocode schedules one packet for dequeuing (or zero if The dequeue pseudocode (Figure 4) schedules one packet for dequeuing
the queue is empty). It also makes all the AQM decisions on dropping (or zero if the queue is empty). It also makes all the AQM decisions
and marking. It is contained within a large while loop so that if it on dropping and marking. The alternative of applying the AQMs at
decides to drop a packet, it will continue until it selects a packet enqueue would shift some processing from the critical time when each
to schedule. Line 3 of the dequeue pseudocode implements time- packet is dequeued. However, it would also add a whole queue of
shifted FIFO scheduling. It takes the packet that waited the delay to the control signals, making the control loop very sloppy.
longest, biased against the Classic traffic by a time-shift of
tshift. All the dequeue code is contained within a large while loop so that
if it decides to drop a packet, it will continue until it selects a
packet to schedule. Line 3 of the dequeue pseudocode is where the
scheduler chooses between the L4S queue (lq) and the Classic queue
(cq). Detailed implementation of the scheduler is not shown (see
discussion later).
o If an L4S packet is scheduled, lines 5 to 8 mark the packet if o If an L4S packet is scheduled, lines 5 to 8 mark the packet if
either the L4S threshold (T_time) is exceeded, or if a random either the L4S threshold (T_time) is exceeded, or if a random
marking decision is drawn according to p_L (maintained by the marking decision is drawn according to p_CL (maintained by the
dualpi2_update() function discussed below). The L4S threshold is dualpi2_update() function discussed below). This logical 'OR' on
usually in units of time (default T_time = 1 ms). However, on a per-packet basis implements the max() function shown in Figure 1
to couple the outputs of the two AQMs together. The L4S threshold
is usually in units of time (default T_time = 1 ms). However, on
slow links the packet serialization time can approach the slow links the packet serialization time can approach the
threshold T_time, so line 6 sets a floor of 2 MTU to the threshold T_time, so line 6 sets a floor of T_len (=2 MTU) to the
threshold. threshold, otherwise marking is always too frequent on slow links.
o If a Classic packet is scheduled, lines 10 to 17 drop or mark the o If a Classic packet is scheduled, lines 10 to 17 drop or mark the
packet based on the squared probability p_C. packet based on the squared probability p_C.
The probability p is kept up to date by the core PI algorithm in There is some concern that using a step function for the Native L4S
Figure 5, which is executed every Tupdate ([RFC8033] now recommends AQM requires end-systems to smooth the signal for a lot longer -
16ms). The algorithm centres on line 3, which is a classical until its fidelity is sufficient. The latency benefits of a ramp are
Proportional-Integral (PI) controller that alters p dependent on a) being investigated as a simple alternative to the step. This ramp
the error between the current queuing delay (curq) and the target would be similar to the RED algorithm, with the following
queuing delay (target) as defined in [RFC8033] and b) the change in differences:
queuing delay since the last sample. The name 'PI' represents the
fact that the second factor is _P_roportional to load while the first o The min and max of the ramp are defined in units of queuing delay,
is the _I_ntegral of the load (so it removes any standing queue). not bytes, so that configuration remains invariant as the queue
departure rate varies.
o It uses instantaneous queueing delay without smoothing (smoothing
is done in the end-systems).
o Determinism is being experimented with instead of randomness; to
reduce the delay necessary to smooth out the noise of randomness
from the signal. For each packet, the algorithm would accumulate
p'_L in a counter and mark the packet that took the counter over
1, then subtract 1 from the counter and continue.
o The ramp rises linearly directly from 0 to 1, not to a an
intermediate value of p'_L as RED would, because there is no need
to keep ECN marking probability low.
This ramp algorithm would require two configuration parameters (min
and max threshold in units of queuing time), in contrast to the
single parameter of a step.
1: dualpi2_update(lq, cq, target) { % Update p every Tupdate
2: curq = cq.time() % use queuing time of first-in Classic packet
3: p = p + alpha_U * (curq - target) + beta_U * (curq - prevq)
4: p_CL = p * k % Coupled L4S prob = base prob * coupling factor
5: p_C = p^2 % Classic prob = (base prob)^2
6: prevq = curq
7: }
Figure 5: Example PI-Update Pseudocode for DualQ Coupled PI2 AQM
The base probability (p) is kept up to date by the core PI algorithm
in Figure 5, which is executed every Tupdate.
Note that p solely depends on the queuing time in the Classic queue. Note that p solely depends on the queuing time in the Classic queue.
In line 2, the current queuing delay (curq) is evaluated by In line 2, the current queuing delay (curq) is evaluated from how
inspecting the timestamp of the next packet to schedule in the long the head packet was in the Classic queue (cq). The function
Classic queue. The function cq.time() subtracts the time stamped at cq.time() (not shown) subtracts the time stamped at enqueue from the
enqueue from the current time and implicitly takes the current current time and implicitly takes the current queuing delay as 0 if
queuing delay as 0 if the queue is empty. the queue is empty.
The algorithm centres on line 3, which is a classical Proportional-
Integral (PI) controller that alters p dependent on: a) the error
between the current queuing delay (curq) and the target queuing delay
('target' - see [RFC8033]); and b) the change in queuing delay since
the last sample. The name 'PI' represents the fact that the second
factor (how fast the queue is growing) is _P_roportional to load
while the first is the _I_ntegral of the load (so it removes any
standing queue in excess of the target).
The two 'gain factors' in line 3, alpha_U and beta_U, respectively The two 'gain factors' in line 3, alpha_U and beta_U, respectively
weight how strongly each of these elements ((a) and (b)) alters p. weight how strongly each of these elements ((a) and (b)) alters p.
They are in units of 'per second of delay' or Hz, because they They are in units of 'per second of delay' or Hz, because they
transform differences in queueing delay into changes in probability. transform differences in queueing delay into changes in probability.
The suffix '_U' represents 'per update time' (Tupdate). They are
derived from the input parameters alpha and beta recommended from the alpha_U and beta_U are derived from the input parameters alpha and
stability analysis in [PI2]. alpha and beta can be thought of as gain beta (see lines 5 and 6 of Figure 2). These recommended values of
factors per unit time, as if Tupdate were 1s. If a briefer update alpha and beta come from the stability analysis in [PI2] so that the
time is configured, alpha and beta do not need to change, but alpha_U AQM can change p as fast as possible in response to changes in load
and beta_U are automatically scaled down to ensure that the same without over-compensating and therefore causing oscillations in the
response is given over the same time, but just in finer steps (see queue.
lines 9 and 10 of Figure 2).
alpha and beta determine how much p ought to change if it was updated
every second. It is best to update p as frequently as possible, but
the update interval (Tupdate) will probably be constrained by
hardware performance. For link rates from 4 - 200 Mb/s, we found
Tupdate=16ms (as recommended in [RFC8033]) is sufficient. However
small the chosen value of Tupdate, p should change by the same amount
per second, but in finer more frequent steps. So the gain factors
used for updating p in Figure 5 need to be scaled by (Tupdate/1s),
which is done in lines 9 and 10 of Figure 2). The suffix '_U'
represents 'per update time' (Tupdate).
In corner cases, p can overflow the range [0,1] so the resulting In corner cases, p can overflow the range [0,1] so the resulting
value of p has to be bounded (omitted from the pseudocode). Then, as value of p has to be bounded (omitted from the pseudocode). Then, as
already explained, the L4S and Classic probabilities are derived from already explained, the coupled and Classic probabilities are derived
the new p in lines 4 and 5 as p_L=k*p and p_C=p^2. from the new p in lines 4 and 5 as p_CL = k*p and p_C = p^2.
Because the L4S marking probability (p_L) is factored up by k, the Because the coupled L4S marking probability (p_CL) is factored up by
dynamic gain parameters alpha and beta are also inherently factored k, the dynamic gain parameters alpha and beta are also inherently
up by k for the L4S queue, which is necessary to ensure that Classic factored up by k for the L4S queue, which is necessary to ensure that
TCP and DCTCP controls have the same stability. So, if alpha is 10 Classic TCP and DCTCP controls have the same stability. So, if alpha
Hz^2, the effective gain factor for the L4S queue is k*alpha, which is 10 Hz^2, the effective gain factor for the L4S queue is k*alpha,
is 20 Hz^2 with the default coupling factor of k=2. which is 20 Hz^2 with the default coupling factor of k=2.
Unlike in PIE [RFC8033], alpha_U and beta_U do not need to be tuned Unlike in PIE [RFC8033], alpha_U and beta_U do not need to be tuned
every Tupdate dependent on p. Instead, in PI2, alpha_U and beta_U every Tupdate dependent on p. Instead, in PI2, alpha_U and beta_U
are independent of p because the squaring applied to Classic traffic are independent of p because the squaring applied to Classic traffic
tunes them inherently. This is explained in [PI2], which also tunes them inherently. This is explained in [PI2], which also
explains why this more principled approach removes the need for most explains why this more principled approach removes the need for most
of the heuristics that had to be added to PIE. of the heuristics that had to be added to PIE.
{ToDo: Scaling beta with Tupdate and scaling both alpha & beta with
RTT}
A.2. Pass #2: Overload Details A.2. Pass #2: Overload Details
Figure 6 repeats the dequeue function of Figure 4, but with overload Figure 6 repeats the dequeue function of Figure 4, but with overload
details added. Similarly Figure 7 repeats the core PI algorithm of details added. Similarly Figure 7 repeats the core PI algorithm of
Figure 5 with overload details added. The initialization and enqueue Figure 5 with overload details added. The initialization and enqueue
functions are unchanged. functions are unchanged.
In line 7 of the initialization function (Figure 2), the default In line 7 of the initialization function (Figure 2), the default
maximum Classic drop probability p_Cmax = 1/4 or 25%. This is the maximum Classic drop probability p_Cmax = 1/4 or 25%. This is the
point at which it is deemed that the Classic queue has become point at which it is deemed that the Classic queue has become
skipping to change at page 23, line 8 skipping to change at page 26, line 27
ensure that the L4S queue starts to introduce dropping once marking ensure that the L4S queue starts to introduce dropping once marking
saturates and can rise no further. The 'TCP Prague' requirements saturates and can rise no further. The 'TCP Prague' requirements
[I-D.ietf-tsvwg-ecn-l4s-id] state that, when an L4S congestion [I-D.ietf-tsvwg-ecn-l4s-id] state that, when an L4S congestion
control detects a drop, it falls back to a response that coexists control detects a drop, it falls back to a response that coexists
with 'Classic' TCP. So it is correct that the L4S queue drops with 'Classic' TCP. So it is correct that the L4S queue drops
packets proportional to p^2, as if they are Classic packets. packets proportional to p^2, as if they are Classic packets.
Both these switch-overs are triggered by the tests for overload Both these switch-overs are triggered by the tests for overload
introduced in lines 4b and 12b of the dequeue function (Figure 6). introduced in lines 4b and 12b of the dequeue function (Figure 6).
Lines 8c to 8g drop L4S packets with probability p^2. Lines 8h to 8i Lines 8c to 8g drop L4S packets with probability p^2. Lines 8h to 8i
mark the remaining packets with probability p_L. mark the remaining packets with probability p_CL.
Lines 2c to 2d in the core PI algorithm (Figure 7) deal with overload Lines 2c to 2d in the core PI algorithm (Figure 7) deal with overload
of the L4S queue when there is no Classic traffic. This is of the L4S queue when there is no Classic traffic. This is
necessary, because the core PI algorithm maintains the appropriate necessary, because the core PI algorithm maintains the appropriate
drop probability to regulate overload, but it depends on the length drop probability to regulate overload, but it depends on the length
of the Classic queue. If there is no Classic queue the naive of the Classic queue. If there is no Classic queue the naive
algorithm in Figure 5 drops nothing, even if the L4S queue is algorithm in Figure 5 drops nothing, even if the L4S queue is
overloaded - so tail drop would have to take over (lines 3 and 4 of overloaded - so tail drop would have to take over (lines 3 and 4 of
Figure 3). Figure 3).
skipping to change at page 24, line 7 skipping to change at page 27, line 7
compared to the target Classic queue delay. So p_L will be driven to compared to the target Classic queue delay. So p_L will be driven to
zero, and the L4S queue will naturally be governed solely by zero, and the L4S queue will naturally be governed solely by
threshold marking (lines 5 and 6 of the dequeue algorithm in threshold marking (lines 5 and 6 of the dequeue algorithm in
Figure 6). But, if unresponsive L4S source(s) cause overload, the Figure 6). But, if unresponsive L4S source(s) cause overload, the
DualQ transitions smoothly to L4S marking based on the PI algorithm. DualQ transitions smoothly to L4S marking based on the PI algorithm.
And as overload increases, it naturally transitions from marking to And as overload increases, it naturally transitions from marking to
dropping by the switch-over mechanism already described. dropping by the switch-over mechanism already described.
1: dualpi2_dequeue(lq, cq) { % Couples L4S & Classic queues, lq & cq 1: dualpi2_dequeue(lq, cq) { % Couples L4S & Classic queues, lq & cq
2: while ( lq.len() + cq.len() > 0 ) 2: while ( lq.len() + cq.len() > 0 )
3: if ( lq.time() + tshift >= cq.time() ) { % time-shifted FIFO 3: if ( scheduler() == lq ) {
4a: lq.dequeue(pkt) 4a: lq.dequeue(pkt)
4b: if ( p_L < p_Lmax ) { % Check for overload saturation 4b: if ( p_CL < p_Lmax ) { % Check for overload saturation
5: if ( ((pkt.time() > T_time) % step marking ... 5: if ( ((lq.time() > T_time) % step marking ...
6: AND (lq.len > T_len)) 6: AND (lq.len > T_len))
7: OR (p_L > rand()) ) % ...or linear marking 7: OR (p_CL > rand()) ) % ...or linear marking
8a: mark(pkt) 8a: mark(pkt)
8b: } else { % overload saturation 8b: } else { % overload saturation
8c: if ( p_C > rand() ) { % probability p_C = p^2 8c: if ( p_C > rand() ) { % probability p_C = p^2
8e: drop(pkt) % revert to Classic drop due to overload 8e: drop(pkt) % revert to Classic drop due to overload
8f: continue % continue to the top of the while loop 8f: continue % continue to the top of the while loop
8g: } 8g: }
8h: if ( p_L > rand() ) % probability p_L = k * p 8h: if ( p_CL > rand() ) % probability p_CL = k * p
8i: mark(pkt) % linear marking of remaining packets 8i: mark(pkt) % linear marking of remaining packets
8j: } 8j: }
9: } else { 9: } else {
10: cq.dequeue(pkt) 10: cq.dequeue(pkt)
11: if ( p_C > rand() ) { % probability p_C = p^2 11: if ( p_C > rand() ) { % probability p_C = p^2
12a: if ( (ecn(pkt) == 0) % ECN field = not-ECT 12a: if ( (ecn(pkt) == 0) % ECN field = not-ECT
12b: OR (p_C >= p_Cmax) ) { % Overload disables ECN 12b: OR (p_C >= p_Cmax) ) { % Overload disables ECN
13: drop(pkt) % squared drop, redo loop 13: drop(pkt) % squared drop, redo loop
14: continue % continue to the top of the while loop 14: continue % continue to the top of the while loop
15: } 15: }
skipping to change at page 25, line 11 skipping to change at page 28, line 11
Figure 6: Example Dequeue Pseudocode for DualQ Coupled PI2 AQM Figure 6: Example Dequeue Pseudocode for DualQ Coupled PI2 AQM
(Including Integer Arithmetic and Overload Code) (Including Integer Arithmetic and Overload Code)
1: dualpi2_update(lq, cq, target) { % Update p every Tupdate 1: dualpi2_update(lq, cq, target) { % Update p every Tupdate
2a: if ( cq.len() > 0 ) 2a: if ( cq.len() > 0 )
2b: curq = cq.time() %use queuing time of first-in Classic packet 2b: curq = cq.time() %use queuing time of first-in Classic packet
2c: else % Classic queue empty 2c: else % Classic queue empty
2d: curq = lq.time() % use queuing time of first-in L4S packet 2d: curq = lq.time() % use queuing time of first-in L4S packet
3: p = p + alpha_U * (curq - target) + beta_U * (curq - prevq) 3: p = p + alpha_U * (curq - target) + beta_U * (curq - prevq)
4: p_L = p * k % L4S prob = base prob * coupling factor 4: p_CL = p * k % L4S prob = base prob * coupling factor
5: p_C = p^2 % Classic prob = (base prob)^2 5: p_C = p^2 % Classic prob = (base prob)^2
6: prevq = curq 6: prevq = curq
7: } 7: }
Figure 7: Example PI-Update Pseudocode for DualQ Coupled PI2 AQM Figure 7: Example PI-Update Pseudocode for DualQ Coupled PI2 AQM
(Including Overload Code) (Including Overload Code)
The choice of scheduler technology is critical to overload protection
(see Section 4.1).
o A well-understood weighted scheduler such as weighted round robin
(WRR) is recommended. The scheduler weight for Classic should be
low, e.g. 1/16.
o Alternatively, a time-shifted FIFO could be used. This is a very
simple scheduler, but it does not fully isolate latency in the L4S
queue from uncontrolled bursts in the Classic queue. It works by
selecting the head packet that has waited the longest, biased
against the Classic traffic by a time-shift of tshift. To
implement time-shifted FIFO, the "if (scheduler() == lq )" test in
line 3 of the dequeue code would simply be replaced by "if (
lq.time() + tshift >= cq.time() )". For the public Internet a
good value for tshift is 50ms. For private networks with smaller
diameter, about 4*target would be reasonable.
o A strict priority scheduler would be inappropriate, because it
would starve Classic if L4S was overloaded.
Appendix B. Example DualQ Coupled Curvy RED Algorithm Appendix B. Example DualQ Coupled Curvy RED Algorithm
As another example of a DualQ Coupled AQM algorithm, the pseudocode As another example of a DualQ Coupled AQM algorithm, the pseudocode
below gives the Curvy RED based algorithm we used and tested. below gives the Curvy RED based algorithm we used and tested.
Although we designed the AQM to be efficient in integer arithmetic, Although we designed the AQM to be efficient in integer arithmetic,
to aid understanding it is first given using real-number arithmetic. to aid understanding it is first given using real-number arithmetic.
Then, one possible optimization for integer arithmetic is given, also Then, one possible optimization for integer arithmetic is given, also
in pseudocode. To aid comparison, the line numbers are kept in step in pseudocode. To aid comparison, the line numbers are kept in step
between the two by using letter suffixes where the longer code needs between the two by using letter suffixes where the longer code needs
extra lines. extra lines.
skipping to change at page 26, line 39 skipping to change at page 29, line 39
19: maxr = max(maxr, rand()) % 0 <= rand() < 1 19: maxr = max(maxr, rand()) % 0 <= rand() < 1
20: return(maxr) 20: return(maxr)
21: } 21: }
Figure 8: Example Dequeue Pseudocode for DualQ Coupled Curvy RED AQM Figure 8: Example Dequeue Pseudocode for DualQ Coupled Curvy RED AQM
Packet classification code is not shown, as it is no different from Packet classification code is not shown, as it is no different from
Figure 3. Potential classification schemes are discussed in Figure 3. Potential classification schemes are discussed in
Section 2. The Curvy RED algorithm has not been maintained to the Section 2. The Curvy RED algorithm has not been maintained to the
same degree as the DualPI2 algorithm. Some ideas used in DualPI2 same degree as the DualPI2 algorithm. Some ideas used in DualPI2
would need to be translated into Curvy RED, such as i) the time- would need to be translated into Curvy RED, such as i) the
shifted FIFO scheduler ii) the time-based L4S threshold; iii) turning conditional priority scheduler instead of strict priority ii) the
off ECN as overload protection; iv) Classic ECN support. These are time-based L4S threshold; iii) turning off ECN as overload
not shown in the Curvy RED pseudocode, but would need to be protection; iv) Classic ECN support. These are not shown in the
implemented for production. {ToDo} Curvy RED pseudocode, but would need to be implemented for
production. {ToDo}
At the outer level, the structure of dualq_dequeue() implements At the outer level, the structure of dualq_dequeue() implements
strict priority scheduling. The code is written assuming the AQM is strict priority scheduling. The code is written assuming the AQM is
applied on dequeue (Note 1) . Every time dualq_dequeue() is called, applied on dequeue (Note 1) . Every time dualq_dequeue() is called,
the if-block in lines 2-6 determines whether there is an L4S packet the if-block in lines 2-6 determines whether there is an L4S packet
to dequeue by calling lq.dequeue(pkt), and otherwise the while-block to dequeue by calling lq.dequeue(pkt), and otherwise the while-block
in lines 7-13 determines whether there is a Classic packet to in lines 7-13 determines whether there is a Classic packet to
dequeue, by calling cq.dequeue(pkt). (Note 2) dequeue, by calling cq.dequeue(pkt). (Note 2)
In the lower priority Classic queue, a while loop is used so that, if In the lower priority Classic queue, a while loop is used so that, if
the AQM determines that a classic packet should be dropped, it the AQM determines that a classic packet should be dropped, it
skipping to change at page 32, line 41 skipping to change at page 35, line 41
For localized traffic from a particular ISP's data centre, we used For localized traffic from a particular ISP's data centre, we used
the measured RTTs to calculate that a value of k'=3 (equivalant to the measured RTTs to calculate that a value of k'=3 (equivalant to
k=8) would achieve throughput equivalence, and our experiments k=8) would achieve throughput equivalence, and our experiments
verified the formula very closely. verified the formula very closely.
For a typical mix of RTTs from local data centres and across the For a typical mix of RTTs from local data centres and across the
general Internet, a value of k'=1 (equivalent to k=2) is recommended general Internet, a value of k'=1 (equivalent to k=2) is recommended
as a good workable compromise. as a good workable compromise.
Appendix D. Open Issues
Most of the following open issues are also tagged '{ToDo}' at the
appropriate point in the document:
Operational guidance to monitor L4S experiment
Interaction between Diffserv & L4S
Define additional classifier flexibility more clearly
PI2 appendix: scaling of alpha & beta, esp. dependence of beta_U
on Tupdate
Curvy RED appendix: complete the unfinished parts
Authors' Addresses Authors' Addresses
Koen De Schepper Koen De Schepper
Nokia Bell Labs Nokia Bell Labs
Antwerp Antwerp
Belgium Belgium
Email: koen.de_schepper@nokia.com Email: koen.de_schepper@nokia.com
URI: https://www.bell-labs.com/usr/koen.de_schepper URI: https://www.bell-labs.com/usr/koen.de_schepper
Bob Briscoe (editor) Bob Briscoe (editor)
CableLabs CableLabs
UK UK
Email: ietf@bobbriscoe.net Email: ietf@bobbriscoe.net
URI: http://bobbriscoe.net/ URI: http://bobbriscoe.net/
Olga Bondarenko Olga Bondarenko
Simula Research Lab Simula Research Lab
Lysaker Lysaker
skipping to change at page 33, line 20 skipping to change at page 36, line 35
Olga Bondarenko Olga Bondarenko
Simula Research Lab Simula Research Lab
Lysaker Lysaker
Norway Norway
Email: olgabnd@gmail.com Email: olgabnd@gmail.com
URI: https://www.simula.no/people/olgabo URI: https://www.simula.no/people/olgabo
Ing-jyh Tsang Ing-jyh Tsang
Nokia Bell Labs Nokia
Antwerp Antwerp
Belgium Belgium
Email: ing-jyh.tsang@nokia.com Email: ing-jyh.tsang@nokia.com
 End of changes. 73 change blocks. 
275 lines changed or deleted 474 lines changed or added

This html diff was produced by rfcdiff 1.46. The latest version is available from http://tools.ietf.org/tools/rfcdiff/