RFC 7141
Byte and Packet Congestion Notification
RFC 7141: Byte and Packet Congestion Notification ๐
Heyyy bestie, okay so this is RFC 7141 ๐, a Best Current Practice (it's also BCP 41 ๐) from the IETF, published in February 2014 ๐ธ. The authors are B. Briscoe (BT) and J. Manner (Aalto University) โจ. It updates RFC 2309 and RFC 2914 ๐ฆ and its ISSN is 2070-1721. The header also says it's from the Internet Engineering Task Force (IETF) ๐ง
Abstract โจ
Okay so this doc gives best current practice recommendations for dropping or marking packets with any active queue management (AQM) algorithm ๐ That includes Random Early Detection (RED), BLUE, Pre-Congestion Notification (PCN), and newer stuff like CoDel (Controlled Delay) and PIE (Proportional Integral controller Enhanced) ๐
It gives three big recommendations, and they're lowkey the whole point ๐ฅ:
- packet size should be taken into account when transports detect and respond to congestion indications,
- packet size should not be taken into account when network equipment creates congestion signals (marking, dropping), and therefore
- in the specific case of RED, the byte-mode packet drop variant that drops fewer small packets should not be used.
This memo updates RFC 2309 to deprecate deliberate preferential treatment of small packets in AQM algorithms ๐
Status of This Memo
This memo documents an Internet Best Current Practice ๐
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community, it has received public review, and the Internet Engineering Steering Group (IESG) approved it for publication โจ For more info on BCPs, check Section 2 of RFC 5741 ๐ฆ
Want the current status of this document, any errata, or a way to send feedback? Go to http://www.rfc-editor.org/info/rfc7141 ๐ซถ
Copyright Notice
Copyright (c) 2014 IETF Trust and the persons identified as the document authors. All rights reserved. ๐
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) as they're in effect on the date of publication. Please read these carefully, because they explain your rights and restrictions for this document ๐ Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions, and they come without warranty as described in the Simplified BSD License ๐
Table of Contents ๐ธ
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1. Terminology and Scoping . . . . . . . . . . . . . . . . . 6
1.2. Example Comparing Packet-Mode Drop and Byte-Mode Drop . . 7
2. Recommendations . . . . . . . . . . . . . . . . . . . . . . . 9
2.1. Recommendation on Queue Measurement . . . . . . . . . . . 9
2.2. Recommendation on Encoding Congestion Notification . . . 10
2.3. Recommendation on Responding to Congestion . . . . . . . 11
2.4. Recommendation on Handling Congestion Indications When
Splitting or Merging Packets . . . . . . . . . . . . . . 12
3. Motivating Arguments . . . . . . . . . . . . . . . . . . . . 13
3.1. Avoiding Perverse Incentives to (Ab)use Smaller Packets . 13
3.2. Small != Control . . . . . . . . . . . . . . . . . . . . 14
3.3. Transport-Independent Network . . . . . . . . . . . . . . 14
3.4. Partial Deployment of AQM . . . . . . . . . . . . . . . . 16
3.5. Implementation Efficiency . . . . . . . . . . . . . . . . 17
4. A Survey and Critique of Past Advice . . . . . . . . . . . . 17
4.1. Congestion Measurement Advice . . . . . . . . . . . . . . 18
4.1.1. Fixed-Size Packet Buffers . . . . . . . . . . . . . . 18
4.1.2. Congestion Measurement without a Queue . . . . . . . 19
4.2. Congestion Notification Advice . . . . . . . . . . . . . 20
4.2.1. Network Bias When Encoding . . . . . . . . . . . . . 20
4.2.2. Transport Bias When Decoding . . . . . . . . . . . . 22
4.2.3. Making Transports Robust against Control Packet
Losses . . . . . . . . . . . . . . . . . . . . . . . 23
4.2.4. Congestion Notification: Summary of Conflicting
Advice . . . . . . . . . . . . . . . . . . . . . . . 24
5. Outstanding Issues and Next Steps . . . . . . . . . . . . . . 25
5.1. Bit-congestible Network . . . . . . . . . . . . . . . . . 25
5.2. Bit- and Packet-Congestible Network . . . . . . . . . . . 26
6. Security Considerations . . . . . . . . . . . . . . . . . . . 26
7. Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . 27
8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 28
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 28
9.1. Normative References . . . . . . . . . . . . . . . . . . 28
9.2. Informative References . . . . . . . . . . . . . . . . . 29
Appendix A. Survey of RED Implementation Status . . . . . . . . 33
Appendix B. Sufficiency of Packet-Mode Drop . . . . . . . . . . 34
B.1. Packet-Size (In)Dependence in Transports . . . . . . . . 35
B.2. Bit-Congestible and Packet-Congestible Indications . . . 38
Appendix C. Byte-Mode Drop Complicates Policing Congestion
Response . . . . . . . . . . . . . . . . . . . . . . 39
1. Introduction โจ
Okay bestie, this doc gives best current practice recommendations for how we should correctly scale congestion control functions with respect to packet size for the long term ๐ It also admits that expediency may be necessary to deal with existing, widely deployed protocols that don't live up to that long-term goal ๐ฅบ
Packet size has been a headache for researchers and practitioners for as long as AQM has been discussed ๐ญ Honestly, one reason AQM was introduced in the first place was to reduce the lock-out effects that small packets can have on large packets in tail-drop queues ๐ This memo wants to state the principles we should be using, and to outline how they'll affect future protocol design, while still taking existing deployments into account ๐ฆ
The question of whether to take packet size into account shows up at three stages of the congestion notification process ๐
- Measuring congestion: When a congested resource measures locally how congested it is, should it measure its queue length in time, bytes, or packets?
- Encoding congestion notification into the wire protocol: When a congested network resource signals its level of congestion, should the probability that it drops or marks each packet depend on the size of that particular packet?
- Decoding congestion notification from the wire protocol: When a transport interprets the notification to decide how much to respond to congestion, should it take into account the size of each missing or marked packet?
Consensus has emerged over the years on the first stage, which Section 2.1 records in the RFC Series โจ In summary: if possible, it's best to measure congestion by time in the queue. Otherwise, the choice between bytes and packets solely depends on whether the resource is congested by bytes or by packets ๐ธ
The controversy is mainly around the last two stages: whether to allow for the size of the specific packet notifying congestion i) when the network encodes it or ii) when the transport decodes it ๐ค
Right now, the RFC series is silent on this matter, apart from a paper trail of advice referenced from [RFC2309]. That advice conditionally recommends byte-mode (packet-size dependent) drop [pktByteEmail] ๐ง
Reducing the number of small packets dropped does have some tempting advantages, ngl ๐ฅน i) it drops fewer control packets, which tend to be small, and ii) it makes TCP's bit rate less dependent on packet size. BUT there are ways to address these issues at the transport layer, rather than reverse engineering network forwarding to fix them ๐
This memo updates [RFC2309] to deprecate deliberate preferential treatment of packets in AQM algorithms solely because of their size ๐ It recommends that (1) packet size should be taken into account when transports detect and respond to congestion indications, and (2) not when network equipment creates them. This memo also adds to the congestion control principles enumerated in BCP 41 [RFC2914] ๐
In the particular case of Random Early Detection (RED), this means the byte-mode packet drop variant should not be used to drop fewer small packets. Why? Because that creates a perverse incentive for transports to use tiny segments, which also opens up a DoS vulnerability ๐จ Fortunately, all the RED implementers who responded to our admittedly limited survey (Section 4.2.4) have NOT followed the earlier advice to use byte-mode drop, so the position this memo argues for already seems to exist in implementations ๐ฅณ
Heads up: a DoS vulnerability is the reason this matters so much. Tiny segments shouldn't be rewarded for being tiny. ๐
However, at the transport layer, TCP congestion control is a widely deployed protocol that doesn't scale with packet size. Its reduction in rate does not take into account the size of a lost packet ๐ฌ So far this hasn't been a significant problem, because most TCP implementations have been used with similar packet sizes. BUT as we design new congestion control mechanisms, this memo recommends that we build in scaling with packet size, rather than assuming we should follow TCP's example ๐
Here's the roadmap, bestie ๐บ๏ธ First, the memo covers terminology and scoping. Section 2 gives concrete formal recommendations, followed by motivating arguments in Section 3. Then we critically survey the advice given previously in the RFC Series and the research literature (Section 4), and check whether this advice has been followed in production networks (Appendix A). To wrap up, outstanding issues are discussed (Section 5), since they need resolving both to inform future protocol designs and to handle legacy AQM deployments. Then security issues are collected together in Section 6, before conclusions are drawn in Section 7. If you want more detailed issues on the theme of byte vs. packet, the appendices have you covered ๐ง
This memo intentionally includes a non-negligible amount of material on the subject, so for the busy reader, Section 2 summarises the recommendations for the Internet community ๐โจ
1.1. Terminology and Scoping ๐
okay so bestie, first things first: the key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]. ๐
This memo applies to the design of all AQM algorithms, like Random Early Detection (RED) [RFC2309], BLUE [BLUE02], Pre-Congestion Notification (PCN) [RFC5670], Controlled Delay (CoDel) [CoDel], and the Proportional Integral controller Enhanced (PIE) [PIE]. ๐ฆ We're using RED as our main example because it's a widely known and deployed AQM algorithm, but no cap, that does NOT mean the advice is any less applicable to the other algorithms, and it doesn't mean RED is the fave. ๐ซถ
Congestion Notification: Congestion notification is a changing signal that aims to communicate the probability that the network resource(s) will not be able to forward the level of traffic load offered (or that there is an impending risk that they will not be able to). โจ
The 'impending risk' bit is there because AQM systems set a virtual limit that's smaller than the actual limit of the resource, then notify the transport once that virtual limit is exceeded, so they can avoid uncontrolled congestion of the actual capacity. ๐ธ
Congestion notification communicates a real number bounded by the range [ 0 , 1 ]. This ties in with the most well-understood measure of congestion notification: drop probability. ๐ฅ
Explicit and Implicit Notification: The byte vs. packet dilemma is about congestion notification whether it's signalled implicitly by drop or explicitly using ECN [RFC3168] or PCN [RFC5670]. ๐ Throughout this document, unless it's clear from context, the term 'marking' means notifying congestion explicitly, while 'congestion notification' means notifying congestion either implicitly by drop or explicitly by marking. ๐ง
Bit-congestible vs. Packet-congestible: If the load on a resource depends on the rate at which packets arrive, it's called 'packet-congestible'. If the load depends on the rate at which bits arrive, it's called 'bit-congestible'. ๐
Examples of packet-congestible resources are route look-up engines and firewalls, because the load depends on how many packet headers they have to process. ๐ Examples of bit-congestible resources are transmission links, radio power, and most buffer memory, because the load depends on how many bits they have to transmit or store. Some machine architectures use fixed-size packet buffers, so buffer memory in these cases is packet-congestible (see Section 4.1.1). ๐
The path through a machine will typically encounter both packet-congestible and bit-congestible resources. ๐ However, right now, a design goal of network processing equipment such as routers and firewalls is to size the packet-processing engine(s) relative to the lines, in order to keep packet processing uncongested, even under worst-case packet rates with runs of minimum-size packets. Therefore, packet congestion is currently rare (see Section 3.3 of [RFC6077]), but there is no guarantee that it won't become more common in the future. ๐ญ
Note that information is generally processed or transmitted with a minimum granularity greater than a bit (e.g., octets). The appropriate granularity for the resource in question should be used, but for the sake of brevity we'll talk in terms of bytes in this memo. ๐
Coarser Granularity: Resources may be congestible at higher levels of granularity than bits or packets. For instance, stateful firewalls are flow-congestible and call-servers are session-congestible. This memo focuses on congestion of connectionless resources, but the same principles may be applicable for congestion notification protocols controlling per-flow and per-session processing or state. ๐ฆ
RED Terminology: In RED, whether to use packets or bytes when measuring queues is called, respectively, 'packet-mode queue measurement' or 'byte-mode queue measurement'. And whether the probability of dropping a particular packet is independent or dependent on its size is called, respectively, 'packet-mode drop' or 'byte-mode drop'. The terms 'byte-mode' and 'packet-mode' should not be used without specifying whether they apply to queue measurement or to drop. ๐
1.2. Example Comparing Packet-Mode Drop and Byte-Mode Drop ๐
Taking RED as a well-known example algorithm, a central question this document addresses is whether to recommend RED's packet-mode drop variant and to deprecate byte-mode drop. โจ The table below compares how packet-mode and byte-mode drop affect two flows of different size packets. For each, it gives the expected number of packets and of bits dropped in one second. Each example flow runs at the same bit rate of 48 Mbps, but one is broken up into small 60 byte packets and the other into large 1,500 byte packets. ๐
To keep up the same bit rate, in one second there are about 25 times more small packets because they're 25 times smaller. As you can see from the table, the packet rate is 100,000 small packets versus 4,000 large packets per second (pps). ๐ญ
Parameter Formula Small packets Large packets
-------------------- --------------- ------------- -------------
Packet size s/8 60 B 1,500 B
Packet size s 480 b 12,000 b
Bit rate x 48 Mbps 48 Mbps
Packet rate u = x/s 100 kpps 4 kpps
Packet-mode Drop
Pkt-loss probability p 0.1% 0.1%
Pkt-loss rate p*u 100 pps 4 pps
Bit-loss rate p*u*s 48 kbps 48 kbps
Byte-mode Drop MTU, M=12,000 b
Pkt-loss probability b = p*s/M 0.004% 0.1%
Pkt-loss rate b*u 4 pps 4 pps
Bit-loss rate b*u*s 1.92 kbps 48 kbps
Table 1: Example Comparing Packet-Mode and Byte-Mode Drop
For packet-mode drop, we illustrate the effect of a drop probability of 0.1%, which the algorithm applies to all packets irrespective of size. Because there are 25 times more small packets in one second, it naturally drops 25 times more small packets, that is, 100 small packets but only 4 large packets. ๐ธ But if we count how many bits it drops, there are 48,000 bits in 100 small packets and 48,000 bits in 4 large packets -- the same number of bits for small as for large. ๐ง
The packet-mode drop algorithm drops any bit with the same probability whether the bit is in a small or a large packet. ๐
For byte-mode drop, again we use an example drop probability of 0.1%, but only for maximum size packets (assuming the link maximum transmission unit (MTU) is 1,500 B or 12,000 b). ๐ฆ The byte-mode algorithm reduces the drop probability of smaller packets in proportion to their size, making the probability that it drops a small packet 25 times smaller, at 0.004%. But there are 25 times more small packets, so dropping them with 25 times lower probability results in dropping the same number of packets: 4 drops in both cases. ๐ The 4 small dropped packets contain 25 times fewer bits than the 4 large dropped packets: 1,920 compared to 48,000. ๐
The byte-mode drop algorithm drops any bit with a probability proportionate to the size of the packet it is in. ๐ฅ
- Recommendations ๐
This section gives recommendations related to network equipment in Sections 2.1 and 2.2, and we discuss the implications on transport protocols in Sections 2.3 and 2.4. ๐
2.1. Recommendation on Queue Measurement ๐
Ideally, an AQM would measure the service time of the queue to measure congestion of a resource. However, service time can only be measured as packets leave the queue, and that's not always expedient to implement with a full AQM algorithm. To predict the service time as packets join the queue, an AQM algorithm needs to measure the length of the queue. ๐ซถ
In this case, if the resource is bit-congestible, the AQM implementation SHOULD measure the length of the queue in bytes and, if the resource is packet-congestible, the implementation SHOULD measure the length of the queue in packets. Subject to the exceptions below, no other choice makes sense, because the number of packets waiting in the queue isn't relevant if the resource gets congested by bytes, and vice versa. For example, the length of the queue into a transmission line would be measured in bytes, while the length of the queue into a firewall would be measured in packets. ๐
To avoid the pathological effects of tail drop, the AQM can then transform this service time or queue length into the probability of dropping or marking a packet (e.g., RED's piecewise linear function between thresholds). โจ
What this advice means for RED as a specific example:
- A RED implementation SHOULD use byte-mode queue measurement for measuring the congestion of bit-congestible resources and packet-mode queue measurement for packet-congestible resources. ๐
- An implementation SHOULD NOT make it possible to configure the way a queue measures itself, because whether a queue is bit-congestible or packet-congestible is an inherent property of the queue. ๐
Exceptions to these recommendations might be necessary, for instance where a packet-congestible resource has to be configured as a proxy bottleneck for a bit-congestible resource in an adjacent box that does not support AQM. ๐ฆ
The recommended approach in less straightforward scenarios, such as fixed-size packet buffers, resources without a queue, and buffers comprising a mix of packet and bit-congestible resources, is discussed in Section 4.1. ๐ For instance, Section 4.1.1 explains that the queue into a line should be measured in bytes even if the queue consists of fixed-size packet buffers, because the root cause of any congestion is bytes arriving too fast for the line. Packets filling buffers are merely a symptom of the underlying congestion of the line. ๐ธ
2.2. Recommendation on Encoding Congestion Notification โจ
okay so when you're encoding congestion notification (by drop, ECN, or PCN ๐ฆ), the chance that network gear drops or marks a particular packet SHOULD NOT depend on how big that packet is ๐ . Section 1.2 already showed this. To drop any bit with a 0.1% chance, you just drop every packet with a 0.1% chance, no matter the size ๐.
This keeps things fair bestie ๐ซถ. The network layer gives enough congestion info to every transport protocol, current and future, and it doesn't create perverse incentives that push transports to use inappropriately tiny packet sizes ๐.
Here's what this means for RED as a specific example ๐:
- The RED AQM algorithm SHOULD NOT use byte-mode drop, so it ought to use packet-mode drop instead. Byte-mode drop is more complex, it creates the perverse incentive to fragment segments into tiny pieces, and it's vulnerable to floods of small packets ๐.
- If a vendor has implemented byte-mode drop and an operator has turned it on, it is RECOMMENDED that the operator use packet-mode drop instead, but first check whether there are any implications on the relative performance of applications using different packet sizes ๐ฅ. The only reason all the recommendations above on encoding congestion notification aren't phrased more strongly is the unlikely possibility of some application-specific legacy use of byte-mode drop ๐.
RED as a whole SHOULD NOT be switched off ๐ญ. Without RED, a tail-drop queue biases against large packets and is vulnerable to floods of small packets.
Note well (iykyk) that RED's byte-mode queue drop is completely orthogonal to byte-mode queue measurement, so don't mix them up ๐ง. If a RED implementation has a byte-mode but doesn't say what sort of byte-mode it is, it's most probably byte-mode queue measurement, which is fine. However, if in doubt, the vendor should be consulted.
A survey (Appendix A) showed there appears to be little, if any, installed base of the byte-mode drop variant of RED ๐. So deprecating byte-mode drop will have little, if any, incremental deployment impact. Main character energy for a clean cutover โจ.
2.3. Recommendation on Responding to Congestion ๐ธ
When a transport detects that a packet has been lost or congestion marked, it SHOULD consider the strength of the congestion indication as proportionate to the size in octets (bytes) of the missing or marked packet ๐.
In other words, when a packet indicates congestion (by being lost or marked), you can think of it as a congestion indication on every octet of the packet, not just one indication per packet ๐ฆ.
To be clear, the above recommendation only describes how a transport should interpret what a congestion indication means, as a long term goal. It makes no recommendation on whether a transport should act differently based on that interpretation. It just helps interoperability between transports, if they choose to make their actions depend on how strong a congestion indication is ๐ซถ.
This definition is going to be useful as the IETF transport area keeps working on its programme of:
- updating host-based congestion control protocols to take packet size into account, and
- making transports less sensitive to losing control packets like SYNs and pure ACKs ๐.
What this advice means for the case of TCP ๐ :
- If two TCP flows with different packet sizes are required to run at equal bit rates under the same path conditions, this SHOULD be done by altering TCP (Section 4.2.2), not network equipment (the latter affects other transports besides TCP).
- If it is desired to improve TCP performance by reducing the chance that a SYN or a pure ACK will be dropped, this SHOULD be done by modifying TCP (Section 4.2.3), not network equipment โจ.
To be clear, we are not recommending at all that TCPs under equivalent conditions should aim for equal bit rates. We're just saying that anyone trying to do that should modify their TCP algorithm, not the network ๐.
These recommendations are phrased as 'SHOULD' rather than 'MUST', because there may be cases where expediency dictates that compatibility with pre-existing versions of a transport protocol makes the recommendations impractical ๐ญ.
2.4. Recommendation on Handling Congestion Indications When Splitting or Merging Packets ๐ง
Packets carrying congestion indications may be split or merged in some circumstances (e.g., at an RTP / RTP Control Protocol (RTCP) transcoder or during IP fragment reassembly). Splitting and merging only make sense in the context of ECN, not loss ๐ฆ.
The general rule to follow is that the number of octets in packets with congestion indications SHOULD be equivalent before and after merging or splitting ๐. This is based on the principle from above: an indication of congestion on a packet can be considered as an indication of congestion on each octet of the packet.
The above rule is not phrased with the word 'MUST' to allow the following exception ๐. There are cases where pre-existing protocols weren't designed to conserve congestion-marked octets (e.g., IP fragment reassembly [RFC3168] or loss statistics in RTCP receiver reports [RFC3550] before ECN was added [RFC6679]). When any such protocol is updated, it SHOULD comply with the above rule to conserve marked octets. However, the rule may be relaxed if it would otherwise become too complex to interoperate with pre-existing implementations of the protocol ๐ซถ.
One way to picture a splitting or merging process is to imagine that all the incoming congestion-marked octets increment a counter, and all the outgoing marked octets decrement that same counter. To keep congestion indications timely, even the smallest positive remainder in the conceptual counter should trigger the next outgoing packet to be marked (causing the counter to go negative) โญ.
3. Motivating Arguments ๐
This section is informative. It justifies the recommendations made in the previous section ๐ง.
3.1. Avoiding Perverse Incentives to (Ab)use Smaller Packets ๐
Increasingly, it's being recognised that a protocol design must take care not to cause unintended consequences by giving the parties in the protocol exchange perverse incentives [Evol_cc] [RFC3426]. There are lots of good reasons why larger path maximum transmission units (PMTUs) would help solve a number of scaling issues, so we don't want to create any bias against large packets that's greater than their true cost ๐ .
Imagine a scenario where the same bit rate of packets contributes the same to bit congestion of a link, whether it's sent as fewer larger packets or more smaller packets. A protocol design that caused larger packets to be more likely to be dropped than smaller ones would be dangerous in both of the following cases ๐ฌ:
- Malicious transports: A queue that gives an advantage to small packets can be used to amplify the force of a flooding attack. By sending a flood of small packets, the attacker can get the queue to discard more large-packet traffic, allowing more attack traffic to get through and cause further damage. Such a queue lets attack traffic have a disproportionately large effect on regular traffic without the attacker having to do much work ๐.
- Non-malicious transports: Even if an application designer isn't actually malicious, if over time it's noticed that small packets tend to go faster, designers will act in their own interest and use smaller packets. Queues that give advantage to small packets create an evolutionary pressure for applications or transports to send at the same bit rate but break their data stream down into tiny segments to reduce their drop rate. Encouraging a high volume of tiny packets might in turn unnecessarily overload a completely unrelated part of the system, perhaps more limited by header processing than bandwidth ๐.
Imagine that two unresponsive flows arrive at a bit-congestible transmission link, each with the same bit rate, say 1 Mbps. One consists of 1,500 B packets and the other of 60 B packets, which are 25x smaller. Consider a scenario where gentle RED [gentle_RED] is used, along with the variant of RED we advise against, i.e., where the RED algorithm is configured to adjust the drop probability of packets in proportion to each packet's size (byte-mode packet drop). In this case, RED aims to drop 25x more of the larger packets than the smaller ones. So, for example, if RED drops 25% of the larger packets, it will aim to drop 1% of the smaller packets (but, in practice, it may drop more as congestion increases; see Appendix B.4 of [RFC4828]). Even though both flows arrive with the same bit rate, the bit rate the RED queue aims to pass to the line will be 750 kbps for the flow of larger packets but 990 kbps for the smaller packets (because of rate variations, it will actually be a little less than this target) ๐.
Note that, although the byte-mode drop variant of RED amplifies small-packet attacks, tail-drop queues amplify small-packet attacks even more (see Security Considerations in Section 6). Wherever possible, neither should be used ๐ซ.
3.2. Small != Control ๐ฆ
Dropping fewer control packets considerably improves performance. It's tempting to drop small packets with lower probability in order to improve performance, because many control packets tend to be smaller (TCP SYNs and ACKs, DNS queries and responses, SIP messages, HTTP GETs, etc). However, we must not give control packets preference purely by virtue of their smallness, otherwise it's too easy for any data source to get the same preferential treatment simply by sending data in smaller packets. Again, we shouldn't create perverse incentives to favour small packets rather than control packets, which is what we actually intend ๐ โโ๏ธ.
Just because many control packets are small doesn't mean all small packets are control packets ๐ .
So, rather than fix these problems in the network, we argue that the transport should be made more robust against losses of control packets (see Section 4.2.3) ๐ซถ.
3.3. Transport-Independent Network โจ
okay so TCP congestion control makes sure that flows fighting over the same resource each keep the same number of segments in flight, no matter how big the segments are ๐ซถ. So under similar conditions, flows with different segment sizes end up with different bit rates ๐
so it's super tempting to just not follow our recommendation and have the network bias congestion notification by packet size, so the bit rates of different-sized flows come out even ๐ but here's the catch: to do that, the queuing algorithm has to make assumptions about the transport, and those assumptions get baked right into the network ๐ญ specifically:
- The queuing algorithm has to assume how aggressively the transport will respond to congestion (see Section 4.2.4) ๐ฅ. If the network assumes the transport responds as aggressively as TCP NewReno, it'll be wrong for Compound TCP and differently wrong for Cubic TCP, and so on ๐. To get equal bit rates, each transport then has to guess what the network assumed, and figure out how to swap that assumed aggressiveness for its own ๐
- Also, if the network biases congestion notification by packet size, it has to assume a baseline packet size. Every proposed algorithm uses the local MTU for this (for example, see the byte-mode loss probability formula in Table 1) ๐. So then if the non-Reno transports mentioned above are trying to reverse engineer what the network assumed, they also have to guess the MTU of the congested link ๐ต๏ธโโ๏ธ
Even though reducing the drop probability of small packets (e.g., RED's byte-mode drop) helps make sure TCP flows with different packet sizes achieve similar bit rates ๐, we think that correction should be made to any future transport protocols based on TCP, not to the network just to fix one transport, no matter how predominant it is ๐. Favouring small packets in the network is basically reverse engineering network equipment around one particular transport protocol (TCP) ๐ค, which goes against the excellent advice in [RFC3426]. That advice asks designers to question "Why are you proposing a solution at this layer of the protocol stack, rather than at another layer?" ๐ง
on the flip side, if the network never takes packet size into account, the transport can be certain it will never have to guess any assumptions the network made ๐ฆ and the network passes along two pieces of information that are enough in every case: i) congestion notification on the packet and ii) the size of the packet ๐ฆ. Both are available for the transport to combine (by taking packet size into account when responding to congestion) or not ๐. Appendix B checks that these two pieces of information are sufficient for all relevant scenarios โ
when the network doesn't take packet size into account, it lets transport protocols choose whether or not to take packet size into account ๐ธ. But if the network were to bias congestion notification by packet size, transport protocols would have no choice at all ๐ญ. Those that didn't consider packet size themselves would unwittingly become dependent on packet size, and those that already took packet size into account would end up taking it into account twice ๐
3.4. Partial Deployment of AQM ๐ง
in overview, the argument in this section goes like this:
- Because the network does not, and cannot always, drop packets in proportion to their size, it shouldn't be given the task of making drop signals depend on packet size at all ๐ โโ๏ธ
- Transports, on the other hand, don't always want to make their rate response proportional to the size of dropped packets, but if they want to, they always can ๐
this is similar to the end-to-end argument that says "Don't do X in the network if end systems can do X by themselves, and they want to be able to choose whether to do X anyway" ๐ซง. Actually, the following argument is stronger. It also says "Don't give the network task X that could be done by the end systems, if X is not deployed on all network nodes, and end systems won't be able to tell whether their network is doing X, or whether they need to do X themselves." ๐ณ In this case, the X in question is "making the response to congestion depend on packet size" ๐
let's re-run this argument and look at each step in more depth ๐. The argument applies solely to drop, not to ECN marking ๐
a queue drops packets for either of two reasons: a) to signal to host congestion controls that they should reduce the load, and b) because there is no buffer left to store the packets ๐ชฃ. Active queue management tries to use drops as a signal for hosts to slow down (case a), so that drops due to buffer exhaustion (case b) should not be necessary ๐
AQM is not universally deployed in every queue on the Internet. Lots of cheap Ethernet bridges, software firewalls, NATs on consumer devices, etc. implement simple tail-drop buffers ๐ฆ๐. Even if AQM were universal, it has to be able to cope with buffer exhaustion (by switching to a behaviour like tail drop), so it can handle unresponsive or excessive transports ๐ช. For these reasons, networks will sometimes be dropping packets as a last resort (case b) rather than under AQM control (case a) ๐ค
when buffers are exhausted (case b), they don't naturally drop packets in proportion to their size ๐ซ . The network can only reduce the probability of dropping smaller packets if it has enough space to store them somewhere while it waits for a larger packet that it can drop. If the buffer is exhausted, it doesn't have that choice ๐งฑ. Admittedly, tail drop does naturally drop somewhat fewer small packets, but exactly how few depends more on the mix of sizes than on the size of the packet in question ๐คทโโ๏ธ. Nonetheless, in general, if we wanted networks to do size-dependent drop, we'd need universal deployment of (packet-size dependent) AQM code, which is currently unrealistic ๐ฅฒ
a host transport can't know whether any particular drop was a deliberate signal from an AQM, or a sign of a queue shedding packets because its buffer ran out ๐ฎ. So, because the network can't universally do size-dependent drop, it shouldn't do it at all ๐ซ
Universality is desirable in the network, but diversity is desirable between different transport-layer protocols. Some, like standards track TCP congestion control [RFC5681], may not choose to make their rate response proportionate to the size of each dropped packet, while others will (e.g., TCP-Friendly Rate Control for Small Packets (TFRC-SP) [RFC4828]). ๐ท
3.5. Implementation Efficiency โ๏ธ
biasing against large packets typically takes an extra multiply and divide in the network (see the example byte-mode drop formula in Table 1) ๐งฎ. Taking packet size into account at the transport, rather than in the network, means neither the network nor the transport needs to do a multiply operation ๐. Multiplication by packet size is effectively achieved as a repeated add, when the transport adds to its count of marked bytes as each congestion event is fed to it โ. Also, the work of doing the biasing is spread across many hosts, instead of being concentrated in just the congested network element ๐. These aren't principled reasons in themselves, but they're a happy consequence of the other principled reasons ๐
4. A Survey and Critique of Past Advice ๐
This section is informative, not normative. ๐ค
the original 1993 paper on RED [RED93] proposed two options for the RED active queue management algorithm: packet mode and byte mode ๐ญ. Packet mode measured the queue length in packets and dropped (or marked) individual packets with a probability independent of their size. Byte mode measured the queue length in bytes and marked an individual packet with a probability in proportion to its size (relative to the maximum packet size) ๐. In the paper's outline of further work, it said no recommendation had been made on whether the queue size should be measured in bytes or packets, but it noted that the difference could be significant ๐ซฃ
when RED was recommended for general deployment in 1998 [RFC2309], the two modes were mentioned, which implied the choice between them was a question of performance ๐ค. It referred to a 1997 email [pktByteEmail] for advice on tuning. A later addendum to that email introduced the insight that there are actually two orthogonal choices ๐ก:
- whether to measure queue length in bytes or packets (Section 4.1), and
- whether the drop probability of an individual packet should depend on its own size (Section 4.2).
the rest of this section is structured accordingly ๐๏ธ
4.1. Congestion Measurement Advice ๐
the choice of which metric to use to measure queue length was left open in RFC 2309 ๐คทโโ๏ธ. It's now well understood that queues for bit-congestible resources should be measured in bytes, and queues for packet-congestible resources should be measured in packets [pktByteEmail] ๐ฏ
congestion in some legacy bit-congestible buffers is only measured in packets, not bytes ๐ฆ. In such cases, the operator has to take into account a typical mix of packet sizes when setting the thresholds. Any AQM algorithm on such a buffer will be oversensitive to high proportions of small packets (e.g., a DoS attack) and under-sensitive to high proportions of large packets ๐ฌ. However, there's no need to make allowances for the possibility of such a legacy in future protocol design ๐. This is safe, because any under-sensitivity during unusual traffic mixes can't lead to congestion collapse, given that the buffer will eventually revert to tail drop, which discards proportionately more large packets ๐
4.1.1. Fixed-Size Packet Buffers ๐
okay so the question of whether to measure queues in bytes or packets seems pretty well understood, bestie ๐ . the confusing part is when the resource is bit-congestible but the queue in front of it is packet-congestible ๐. this section walks through how to handle that mess โจ.
Some queuing hardware, mostly the older stuff, gives each packet in the queue a fixed-size buffer ๐งฑ. this hardware sends packets out to the line in one of two ways:
- With some hardware, any fixed-size buffer that isn't completely filled by a packet gets padded when it's sent to the wire. this case is clearly packet-congestible, because both queuing and transmission happen in fixed MTU-size units ๐ฆ. so the queue length in packets is a good model of how congested the link is ๐ซถ.
- More commonly, hardware with fixed-size packet buffers sends packets to the line without padding. this makes a hybrid system: transmission congestion depends on the size of the packets, but queue congestion depends on the number of packets, no matter how big they are ๐ค.
but here's the thing ๐: there would be no queue at all unless the line had become congested. the root cause of any congestion is too many bytes arriving for the line ๐. so the AQM should measure the queue length as the sum of all the packet sizes in bytes that are waiting to be serviced by the line, whether or not each packet sits in a fixed-size buffer ๐.
in the (unlikely) first case, where padding means the queue should be measured in packets, things get confusing again because the fixed buffers are rarely all one size ๐ญ. usually there are pools of different-sized buffers. (Cisco calls the process of splitting memory into these pools "buffer carving" [IOSArch].) normally, if the pool of small buffers runs out, arriving small packets can borrow space from the pool of large buffers, but not the other way around ๐. still, there's no need to get lost in all that complexity, because the root cause of congestion is still line overload, and buffer consumption is only the symptom ๐ฉบ. so the length of the queue should be measured as the sum of the bytes in the queue that will be sent to the line, including any padding. in the (unusual) case of transmission with padding, that means the sum of the sizes of the small buffers queued plus the sum of the sizes of the large buffers queued ๐งฎ.
we'll come back to borrowing of fixed-size buffers when we talk about biasing the drop or marking probability of a specific packet based on its size, in Section 4.2.1 ๐. but for now, here's the simple rule for measuring the length of queues made of fixed buffers, no matter how fancy the buffering scheme is: a transmission line is almost always bit-congestible, so the number of bytes queued up waiting for the line tells you how congested the line is ๐ฆ. it's rarely important to measure how congested the buffering system itself is ๐ โจ.
4.1.2. Congestion Measurement without a Queue ๐ธ
AQM algorithms are almost always described assuming there's a queue for a congested resource, and that the algorithm uses the queue length to decide the probability of dropping or marking each packet ๐. but not every congested resource builds a queue ๐. for example, power-limited resources are usually bit-congestible when energy is mainly spent on transmission rather than header processing, but a link protocol rarely builds a queue as it nears maximum power ๐.
that said, AQM algorithms don't need a queue to work ๐. for instance, spectrum congestion can be modelled by signal quality, using the target bit-energy-to-noise-density ratio ๐ก. and to model radio power exhaustion, transmission-power levels can be measured and compared to the maximum power available โก. [ECNFixedWireless] proposes a practical and theoretically sound way to combine congestion notification for different bit-congestible resources at different layers along an end-to-end path. this works whether the path is wireless or wired, and whether or not there are queues involved ๐๐.
in wireless protocols that use request to send / clear to send (RTS / CTS) control, such as some variants of IEEE802.11, it's reasonable to base an AQM on the time spent waiting for transmission opportunities (TXOPs) ๐ฏ. even though the wireless spectrum is usually considered congested by bits (for a given coding scheme), requests for TXOPs pile up as the spectrum gets congested by all the bits being transferred ๐ถ. so the time TXOPs spend queued directly reflects bit congestion of the spectrum ๐.
4.2. Congestion Notification Advice ๐ฃ
4.2.1. Network Bias When Encoding ๐
4.2.1.1. Advice on Packet-Size Bias in RED ๐
okay, this part is a whole saga ๐ญ. the email [pktByteEmail] that [RFC2309] refers to said that most scarce resources in the Internet were bit-congestible, which is still believed to be true (Section 1.1) โ . but it then went on to give advice that this memo updates ๐. it said that drop probability should depend on the size of the packet being considered for drop if the resource is bit-congestible, but not if it's packet-congestible ๐คทโโ๏ธ. the argument went on that if packet drops were inflated by packet size (byte-mode dropping), then "a flow's fraction of the packet drops is then a good indication of that flow's fraction of the link bandwidth in bits per second" ๐ง . this lined up with a policing mechanism that was being worked on at the time for detecting unusually high-bandwidth flows, which was eventually published in 1999 [pBox] ๐ต๏ธโโ๏ธ. however, the problem could and should have been solved by making the policing mechanism count the volume of bytes randomly dropped, not the number of packets ๐ .
a few months before RFC 2309 was published, an addendum was added to that archived email, and the RFC referenced it ๐. in the addendum, the final paragraph seemed to partly take back what had been said before ๐ณ. it clarified that whether the probability of dropping or marking a packet should depend on its size had nothing to do with whether the resource itself is bit-congestible. it was a completely orthogonal question ๐ฆ. but the only example given had the queue measured in packets while the packet drop depended on the packet's size, and no example was given the other way round ๐.
in 2000, Cnodder et al. [REDbyte] pointed out an error in the part of the original 1993 RED algorithm that was meant to spread drops out uniformly, because it didn't correctly account for the packet size adjustment ๐ซ . they recommended an algorithm called RED_4 to fix this. they also recommended a further change, RED_5, which adjusts the drop rate based on the square of the relative packet size ๐. this did match one motivation behind RED's byte-mode drop, which was to reverse engineer the network so that the dominant end-to-end congestion control mechanisms would perform better ๐ง. this memo makes different recommendations in Section 2 โจ.
by 2003, the adjustment for packet size had changed again, this time in the RED algorithm of the ns2 simulator ๐ฅ๏ธ. instead of taking each packet's size relative to a 'maximum packet size', it was taken relative to a 'mean packet size', meant to be a static value representing the 'typical' packet size on the link ๐. we haven't been able to find a justification for this change in the literature ๐คจ. however, Eddy and Allman ran experiments [REDbias] that tested how sensitive RED was to this parameter, among other things ๐งช. this changed algorithm can often lead to drop probabilities greater than 1, which is a hint that there's probably a mistake in the theory somewhere ๐.
on 10-Nov-2004, this variant of byte-mode packet drop became the default in the ns2 simulator ๐ . it seems unlikely that byte-mode drop has ever been implemented in production networks (Appendix A) ๐. so any conclusions drawn from ns2 simulations that use RED without disabling byte-mode drop are likely to behave very differently from RED in production networks ๐จ.
4.2.1.2. Packet-Size Bias Regardless of AQM ๐ง
the byte-mode drop variant of RED (or a similar variant of other AQM algorithms) isn't the only possible bias towards small packets in queuing systems ๐ญ. we've already mentioned that tail-drop queues naturally tend to lock out large packets once they're full ๐.
but also, queues with fixed-size buffers reduce the probability that small packets will be dropped, if and only if they let small packets borrow buffers from the pools meant for larger packets (see Section 4.1.1) ๐งฉ. borrowing effectively makes the maximum queue size for small packets bigger than for large packets, because small packets can use more buffers while fewer will fit large packets ๐. fun fact ๐ค: the bias towards small packets from buffer borrowing is nowhere near as strong as the bias from RED's byte-mode drop ๐.
still, fixed-buffer memory with tail drop is prone to lock out large packets, purely because of the tail-drop part ๐ค. so fixed-size packet buffers should be augmented with a good AQM algorithm and packet-mode drop ๐. if an AQM is too complicated to implement with multiple fixed buffer pools, the minimum needed to prevent large-packet lockout is to make sure smaller packets never use the last available buffer in any of the pools meant for larger packets ๐ซถโจ.
4.2.2. Transport Bias When Decoding โจ
okay so the proposals to make network equipment favour smaller packets have mostly been happening outside the IETF ๐ meanwhile, inside the IETF, there are loads of ideas for changing transport protocols to hit the same goals. either make the flow bit rate account for packet size, or protect control packets from loss. this memo argues that changing the transport protocols is the more principled approach ๐
a recently approved experimental RFC adapts its transport-layer protocol to account for packet sizes relative to typical TCP packet sizes ๐ฆ it proposes a new small-packet variant of TCP-friendly rate control (TFRC [RFC5348]), called TFRC-SP [RFC4828]. basically, it proposes a rate equation that inflates the flow rate by the ratio of a typical TCP segment size (1,500 B including TCP header) over the actual segment size [PktSizeEquCC]. (there are also other important differences from TFRC, like using virtual packets [CCvarPktSize] to avoid responding to multiple losses per round trip, and using a minimum inter-packet interval โจ)
Section 4.5.1 of the TFRC-SP specification talks about what happens when queues are set up to drop smaller packets with proportionately lower probability than larger ones ๐ but it only covers TCP operating in that kind of environment. TFRC-SP only gets a brief mention when it comes to defining fairness with TCP. and it only looks at the byte-mode dropping version of RED from before Cnodder et al. pointed out that it didn't bias towards small packets enough to make TCP independent of packet size ๐ญ
so the TFRC-SP specification doesn't address whether the network or the transport should handle fairness between different packet sizes ๐ค in Appendix B.4 of RFC 4828, it does discuss the possibility of both TFRC-SP and some network buffers duplicating each other's attempts to deliberately bias towards small packets. but the discussion isn't conclusive. it reports simulations of many of the possibilities to assess performance, but it doesn't recommend any particular course of action ๐
the paper that originally proposed TFRC with virtual packets (VP-TFRC) [CCvarPktSize] suggested there might perhaps be two variants, to cater for the different variants of RED ๐ but as the TFRC-SP authors point out, a transport has no way of knowing whether some queues on its path have deployed RED with byte-mode packet drop (unless an exhaustive survey found that nobody has deployed it! -- see Appendix A) ๐ also, VP-TFRC proposed that byte-mode RED dropping should really square the packet-size compensation factor (like Cnodder's RED_5, but apparently unaware of it) ๐
pre-congestion notification [RFC5670] is an IETF technology that uses a virtual queue for AQM marking, for packets within one Diffserv class, to give early warning before any real queuing happens โญ the PCN marking algorithms have been designed not to take packet size into account when forwarding through queues. instead, the general principle is to take the sizes of marked packets into account when monitoring the fraction of marking at the edge of the network, as recommended here ๐ซถ
4.2.3. Making Transports Robust against Control Packet Losses
okay this part is giving transport robustness ๐ฅ two RFCs have defined changes to TCP that make it more robust against losing small control packets [RFC5562] [RFC5690]. in both cases, they note that the case for these two TCP changes would be weaker if RED were biased against dropping small packets. we argue here that these two proposals are a safer and more principled way to improve TCP performance than reverse engineering RED to benefit TCP ๐
although there are no known proposals, it would also be possible and perfectly valid to make control packets robust against drop by requesting a scheduling class with lower drop probability. that would be achieved by re-marking to a Diffserv code point [RFC2474] within the same behaviour aggregate ๐ง
although it wasn't brought to the IETF, a simple proposal from Wischik [DupTCP] suggests that the first three packets of every TCP flow should be routinely duplicated after a short delay ๐ it shows this would greatly improve the chances of short flows completing quickly, but it would hardly increase traffic levels on the Internet, because Internet bytes have always been concentrated in the large flows ๐ it also shows that the performance of many typical applications depends on completing long serial chains of short messages. it argues that, since most of the value people get from the Internet is concentrated within short flows, this simple expedient would greatly increase the value of the best-effort Internet at minimal cost ๐ฆ a similar but more extensive approach has been evaluated on Google servers [GentleAggro] ๐ธ
the proposals in this sub-section are experimental approaches that aren't yet in wide operational use. but they are existence proofs that transports can make themselves robust against loss of control packets โจ the examples are all TCP-based, but applications over non-TCP transports could mitigate loss of control packets by making similar use of Diffserv, data duplication, FEC, etc. ๐
4.2.4. Congestion Notification: Summary of Conflicting Advice
okay, the table time ๐ this one is the big summary of all the conflicting advice
+-----------+-----------------+-----------------+-------------------+
| transport | RED_1 (packet- | RED_4 (linear | RED_5 (square |
| cc | mode drop) | byte-mode drop) | byte-mode drop) |
+-----------+-----------------+-----------------+-------------------+
| TCP or | s/sqrt(p) | sqrt(s/p) | 1/sqrt(p) |
| TFRC | | | |
| TFRC-SP | 1/sqrt(p) | 1/sqrt(s*p) | 1/(s*sqrt(p)) |
+-----------+-----------------+-----------------+-------------------+
Table 2: Dependence of flow bit rate per RTT on packet size, s, and
drop probability, p, when there is network and/or transport bias
towards small packets to varying degrees
Table 2 aims to sum up the potential effects of all the advice from different sources ๐ each column shows a different possible AQM behaviour in different queues in the network, using the terminology of Cnodder et al. outlined earlier (RED_1 is basic RED with packet-mode drop). each row shows a different transport behaviour: TCP [RFC5681] and TFRC [RFC5348] on the top row, with TFRC-SP [RFC4828] below. each cell shows how the bits per round trip of a flow depend on packet size, s, and drop probability, p. to declutter the formulae and focus on packet-size dependence, they're all given per round trip, which removes any RTT term ๐ง
let's assume the goal is for the bit rate of a flow to be independent of packet size ๐ suppressing all the inessential details, the table shows this should either be achievable by not altering the TCP transport in a RED_5 network, or by using the small-packet TFRC-SP transport (or similar) in a network without any byte-mode dropping RED (top right and bottom left). top left is the 'do nothing' scenario, while bottom right is the 'do both' scenario, where the bit rate would become far too biased towards small packets ๐ญ of course, if any form of byte-mode dropping RED has been deployed on a subset of queues that congest, each path through the network will present a different hybrid scenario to its transport ๐ฅ
whatever the case, the linear byte-mode drop column in the middle would seriously complicate the Internet ๐ even if you believe the network should be doing the biasing, linear byte-mode drop is a half-way house that doesn't bias enough towards small packets. Section 2 recommends that _all_ bias in network equipment towards small packets should be turned off (if indeed any equipment vendors have implemented it), leaving packet-size bias solely as the preserve of the transport layer (solely the leftmost, packet-mode drop column) ๐
in practice, it seems no deliberate bias towards small packets has been implemented for production networks. of the 19% of vendors who responded to a survey of 84 equipment vendors, none had implemented byte-mode drop in RED (see Appendix A for details) ๐ซถ
5. Outstanding Issues and Next Steps
5.1. Bit-congestible Network
okay, now the loose ends ๐ง for a connectionless network where nearly all resources are bit-congestible, the recommended position is clear: the network should not make allowance for packet sizes, and the transport should. that leaves two outstanding issues:
- o The question of how to handle any legacy AQM deployments using byte-mode drop;
- o The need to start a programme to update transport congestion control protocol standards to take packet size into account.
a survey of equipment vendors (Section 4.2.4) found no evidence that byte-mode packet drop had been implemented, so deployment will be sparse at best ๐ธ a migration strategy isn't really needed to remove an algorithm that may not even be deployed ๐
a programme of experimental updates to take packet size into account in transport congestion control protocols has already started with TFRC-SP [RFC4828] โจ
5.2. Bit- and Packet-Congestible Network
the position is much less clear-cut if the Internet becomes populated by a more even mix of packet-congestible and bit-congestible resources (see Appendix B.2) ๐ค this problem isn't pressing, though, because most Internet resources are designed to be bit-congestible before packet processing starts to congest (see Section 1.1) ๐ฆ
the IRTF's Internet Congestion Control Research Group (ICCRG) has set itself the task of reaching consensus on generic forwarding mechanisms that are necessary and sufficient to support the Internet's future congestion control requirements (the first challenge in [RFC6077]) ๐ the research question of whether packet congestion might become common, and what to do if it does, may be explored in the IRTF in the future (the "Challenge 3: Packet Size" in [RFC6077]) ๐
note that sometimes it seems resources might be congested by neither bits nor packets, e.g., where the queue for access to a wireless medium is in units of transmission opportunities. however, the root cause of congestion of the underlying spectrum is overload of bits (see Section 4.1.2) ๐
6. Security Considerations โจ
Okay bestie, this memo recommends that queues do NOT let packet size bias drop probability ๐ โโ๏ธ Like, if a queue dropped small packets less often than big ones, transports would be incentivised to chop their flows into tiny segments ๐ That's the perverse incentive tail-drop queues gave to small packets, and one of the big wins of AQM was supposed to be killing it. Iconic of AQM, honestly ๐
Also, transports can't all be trusted to respond to congestion ๐ฌ So another reason queues shouldn't favour small packets is to avoid being vulnerable to small-packet DDoS attacks. AQM was meant to remove tail drop's DoS weakness to small packets, so we really should NOT add it back ๐ฅ
Here's where it gets scary ๐ฑ If most queues used byte-mode drop, the whole network would amplify a small-packet DDoS. At the first queue, the flood of small packets pushes aside a bigger share of the large packets, so more of the small ones survive to hit the next queue. The flood keeps going toward the destination, shoving regular large-packet traffic out of the way queue after queue, while barely getting dropped itself ๐ซ Not it.
Appendix C explains why the ability of networks to police the response of any transport to congestion depends on bit-congestible network resources only doing packet-mode drop, not byte-mode drop ๐ง The short version: making drop probability depend on the size of the packets the bits happen to be split into just encourages the bits to be split into smaller packets. So byte-mode drop would permanently complicate any attempt to fix the Internet's incentive structures ๐ญ
7. Conclusions ๐
Okay so this memo spots three distinct stages of the congestion notification process where implementations need to decide whether packet size matters ๐ฆ The recommendations in Section 2 of this memo are different for each one:
- When network equipment measures the length of a queue, if it is not feasible to use time, it is recommended to count in bytes if the network resource is congested by bytes, or to count in packets if is congested by packets. ๐
- When network equipment decides whether to drop (or mark) a packet, it is recommended that the size of the particular packet should not be taken into account. ๐
- However, when a transport algorithm responds to a dropped or marked packet, the size of the rate reduction should be proportionate to the size of the packet. ๐
So in summary, the answers are 'it depends', 'no', and 'yes', respectively ๐
For the specific case of RED, this means byte-mode queue measurement will often be appropriate, but byte-mode drop is very strongly discouraged ๐ โโ๏ธ
At the transport layer, the IETF should keep updating congestion control protocols to take into account the size of each packet that indicates congestion โจ The IETF should also keep making protocols less sensitive to losing control packets like SYNs, pure ACKs, and DNS exchanges ๐ซถ Yes, many control packets happen to be small, but if network equipment favoured all small packets it would be dangerous. That would create perverse incentives to split data transfers into smaller packets ๐
The memo builds these recommendations from principled arguments about scaling, layering, incentives, inherent efficiency, security, and 'policeability' ๐ง It also deals with practical stuff like specific buffer architectures and incremental deployment. A limited survey of RED implementations is discussed, and it shows there appears to be little, if any, installed base of RED's byte-mode drop ๐ So it can be deprecated with little, if any, incremental deployment complications ๐
The recommendations rest on the well-founded basis that most Internet resources are bit-congestible, not packet-congestible ๐ธ We need to know how likely this assumption is to hold in the longer term and, if it might not, which protocol changes will be needed to cater for a mix of the two. The IRTF Internet Congestion Control Research Group (ICCRG) is currently working on these problems [RFC6077] ๐
8. Acknowledgements ๐ซถ
Thank you to Sally Floyd, who gave extensive and useful review comments ๐ Also thanks for the reviews from Philip Eardley, David Black, Fred Baker, David Taht, Toby Moncaster, Arnaud Jacquet, and Mirja Kuehlewind, plus helpful explanations of different hardware approaches from Larry Dunn and Fred Baker ๐ We're grateful to Bruce Davie and his colleagues for providing a timely and efficient survey of RED implementation in Cisco's product range ๐ Also, grateful thanks to Toby Moncaster, Will Dormann, John Regnault, Simon Carter, and Stefaan De Cnodder, who further helped survey the current status of RED implementation and deployment. And finally, thanks to the anonymous individuals who responded ๐ฆ
Bob Briscoe and Jukka Manner were partly funded by Trilogy and Trilogy 2, research projects (ICT-216372, ICT-317756) supported by the European Community under its Seventh Framework Programme ๐ The views expressed here are those of the authors only ๐
9. References ๐
9.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2309] Braden, B., Clark, D., Crowcroft, J., Davie, B., Deering, S., Estrin, D., Floyd, S., Jacobson, V., Minshall, G., Partridge, C., Peterson, L., Ramakrishnan, K., Shenker, S., Wroclawski, J., and L. Zhang, "Recommendations on Queue Management and Congestion Avoidance in the Internet", RFC 2309, April 1998.
[RFC2914] Floyd, S., "Congestion Control Principles", BCP 41, RFC 2914, September 2000.
[RFC3168] Ramakrishnan, K., Floyd, S., and D. Black, "The Addition of Explicit Congestion Notification (ECN) to IP", RFC 3168, September 2001.
9.2. Informative References โจ
Okay, bestie, this is the reading list ๐ It's the stuff that gave the document its backbone, not the stuff you have to follow to the letter. Here it is, every single source, exactly as the original cites them:
[BLUE02]Feng, W-c., Shin, K., Kandlur, D., and D. Saha, "The BLUE active queue management algorithms", IEEE/ACM Transactions on Networking 10(4) 513-528, August 2002,<http://dx.doi.org/10.1109/TNET.2002.801399>.[CCvarPktSize]Widmer, J., Boutremans, C., and J-Y. Le Boudec, "End-to-end congestion control for TCP-friendly flows with variable packet size", ACM CCR 34(2) 137-151, April 2004,<http://doi.acm.org/10.1145/997150.997162>.[CHOKe_Var_Pkt]Psounis, K., Pan, R., and B. Prabhaker, "Approximate Fair Dropping for Variable-Length Packets", IEEE Micro 21(1):48-56, January-February 2001,<http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=903061>.[CoDel]Nichols, K. and V. Jacobson, "Controlled Delay Active Queue Management", Work in Progress, February 2013.[DRQ]Shin, M., Chong, S., and I. Rhee, "Dual-Resource TCP/AQM for Processing-Constrained Networks", IEEE/ACM Transactions on Networking Vol 16, issue 2, April 2008,<http://dx.doi.org/10.1109/TNET.2007.900415>.[DupTCP]Wischik, D., "Short messages", Philosophical Transactions of the Royal Society A 366(1872):1941-1953, June 2008,<http://rsta.royalsocietypublishing.org/content/366/1872/1941.full.pdf+html>.[ECNFixedWireless]Siris, V., "Resource Control for Elastic Traffic in CDMA Networks", Proc. ACM MOBICOM'02 , September 2002,<http://www.ics.forth.gr/netlab/publications/resource_control_elastic_cdma.html>.[Evol_cc]Gibbens, R. and F. Kelly, "Resource pricing and the evolution of congestion control", Automatica 35(12)1969-1985, December 1999,<http://www.sciencedirect.com/science/article/pii/S0005109899001351>.[GentleAggro]Flach, T., Dukkipati, N., Terzis, A., Raghavan, B., Cardwell, N., Cheng, Y., Jain, A., Hao, S., Katz-Bassett, E., and R. Govindan, "Reducing web latency: the virtue of gentle aggression", ACM SIGCOMM CCR 43(4)159-170, August 2013,<http://doi.acm.org/10.1145/2486001.2486014>.[IOSArch]Bollapragada, V., White, R., and C. Murphy, "Inside Cisco IOS Software Architecture", Cisco Press: CCIE Professional Development ISBN13: 978-1-57870-181-0, July 2000.[PIE]Pan, R., Natarajan, P., Piglione, C., Prabhu, M., Subramanian, V., Baker, F., and B. Steeg, "PIE: A Lightweight Control Scheme To Address the Bufferbloat Problem", Work in Progress, February 2014.[PktSizeEquCC]Vasallo, P., "Variable Packet Size Equation-Based Congestion Control", ICSI Technical Report tr-00-008, 2000,<http://http.icsi.berkeley.edu/ftp/global/pub/techreports/2000/tr-00-008.pdf>.[RED93]Floyd, S. and V. Jacobson, "Random Early Detection (RED) gateways for Congestion Avoidance", IEEE/ACM Transactions on Networking 1(4) 397--413, August 1993,<http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=251892>.[REDbias]Eddy, W. and M. Allman, "A Comparison of RED's Byte and Packet Modes", Computer Networks 42(3) 261--280, June 2003,<http://www.ir.bbn.com/documents/articles/redbias.ps>.[REDbyte]De Cnodder, S., Elloumi, O., and K. Pauwels, "Effect of different packet sizes on RED performance", Proc. 5th IEEE Symposium on Computers and Communications (ISCC) 793-799, July 2000,<http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=860741>.[RFC2474]Nichols, K., Blake, S., Baker, F., and D. Black, "Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6 Headers", RFC 2474, December 1998.[RFC3426]Floyd, S., "General Architectural and Policy Considerations", RFC 3426, November 2002.[RFC3550]Schulzrinne, H., Casner, S., Frederick, R., and V. Jacobson, "RTP: A Transport Protocol for Real-Time Applications", STD 64, RFC 3550, July 2003.[RFC3714]Floyd, S. and J. Kempf, "IAB Concerns Regarding Congestion Control for Voice Traffic in the Internet", RFC 3714, March 2004.[RFC4828]Floyd, S. and E. Kohler, "TCP Friendly Rate Control (TFRC): The Small-Packet (SP) Variant", RFC 4828, April 2007.[RFC5348]Floyd, S., Handley, M., Padhye, J., and J. Widmer, "TCP Friendly Rate Control (TFRC): Protocol Specification", RFC 5348, September 2008.[RFC5562]Kuzmanovic, A., Mondal, A., Floyd, S., and K. Ramakrishnan, "Adding Explicit Congestion Notification (ECN) Capability to TCP's SYN/ACK Packets", RFC 5562, June 2009.[RFC5670]Eardley, P., "Metering and Marking Behaviour of PCN-Nodes", RFC 5670, November 2009.[RFC5681]Allman, M., Paxson, V., and E. Blanton, "TCP Congestion Control", RFC 5681, September 2009.[RFC5690]Floyd, S., Arcia, A., Ros, D., and J. Iyengar, "Adding Acknowledgement Congestion Control to TCP", RFC 5690, February 2010.[RFC6077]Papadimitriou, D., Welzl, M., Scharf, M., and B. Briscoe, "Open Research Issues in Internet Congestion Control", RFC 6077, February 2011.[RFC6679]Westerlund, M., Johansson, I., Perkins, C., O'Hanlon, P., and K. Carlberg, "Explicit Congestion Notification (ECN) for RTP over UDP", RFC 6679, August 2012.[RFC6789]Briscoe, B., Woundy, R., and A. Cooper, "Congestion Exposure (ConEx) Concepts and Use Cases", RFC 6789, December 2012.[Rate_fair_Dis]Briscoe, B., "Flow Rate Fairness: Dismantling a Religion", ACM CCR 37(2)63-74, April 2007,<http://portal.acm.org/citation.cfm?id=1232926>.[gentle_RED]Floyd, S., "Recommendation on using the "gentle_" variant of RED", Web page , March 2000,<http://www.icir.org/floyd/red/gentle.html>.[pBox]Floyd, S. and K. Fall, "Promoting the Use of End-to-End Congestion Control", IEEE/ACM Transactions on Networking 7(4) 458--472, August 1999,<http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=793002>.[pktByteEmail]Floyd, S., "RED: Discussions of Byte and Packet Modes", email, March 1997,<http://ee.lbl.gov/floyd/REDaveraging.txt>.
Appendix A. Survey of RED Implementation Status โจ
This Appendix is informative, not normative. ๐ธ
Okay, so back in May 2007 somebody went around and surveyed 84 vendors ๐ to see how many had built RED with drop probability based on packet size. About 19% of them replied, which gave a sample size of 16. Most of the respondents weren't allowed to be named, but the crew who did reply includes most of the bigger equipment vendors, covering a large fraction of the market ๐ The only two who said yes to being named were Cisco and Alcatel-Lucent. Everyone else was a mix of big network equipment vendors at L3 and L2, firewall vendors, wireless equipment vendors, and large software businesses with a small selection of networking products.
Here's the tea โ Every single responder confirmed they have not implemented the variant of RED where the drop depends on packet size. Two of them were fairly sure they hadn't, but they wanted to double-check more thoroughly ๐ At the time of the survey, Linux did not implement RED with packet-size bias of drop. The authors didn't dig into a wider range of open source code, though, so that part's not fully mapped ๐
+-------------------------------+----------------+--------------+
| Response | No. of vendors | % of vendors |
+-------------------------------+----------------+--------------+
| Not implemented | 14 | 17% |
| Not implemented (probably) | 2 | 2% |
| Implemented | 0 | 0% |
| No response | 68 | 81% |
| Total companies/orgs surveyed | 84 | 100% |
+-------------------------------+----------------+--------------+
Table 3: Vendor Survey on byte-mode drop variant of RED (lower drop
probability for small packets)
When people did say why they hadn't built the byte-mode drop variant, the extra complexity of packet-bias code was the most common excuse ๐งฉ One vendor had a more principled reason for skipping it, which is kind of similar to the argument this document makes ๐ฆ
Now, this survey only covers what vendors built, so we can't be certain about what operators actually deployed ๐คทโโ๏ธ Still, the authors believe lots of queues in the Internet are still tail drop. The company of one of the co-authors (BT) has widely deployed RED, but plenty of tail-drop queues are still going to exist, especially in access network equipment and on middleboxes like firewalls, where RED isn't always available ๐งฑ
Routers using a memory architecture based on fixed-size buffers with borrowing may also still be prevalent in the Internet. As explained in Section 4.2.1, these also give a marginal (but legitimate) bias towards small packets ๐ So even though RED byte-mode drop isn't prevalent, it's likely there's still some bias towards small packets in the Internet, thanks to tail-drop queues and fixed-buffer borrowing. That's the whole vibe, periodt ๐
Appendix B. Sufficiency of Packet-Mode Drop โจ
This Appendix is informative, not normative. ๐
okay so bestie, we're checking whether packet-mode drop (or marking) in the network gives the transport layer enough generic info to actually use ๐ We check against a 2x2 matrix of four scenarios that might happen now or later (Table 4). Checking the two scenarios in each dimension tests the extremes of packet-size sensitivity, in the transport and in the network respectively ๐ฆ
+-------------------------------+-----------------+-----------------+
| Transport -> | a) Independent | b) Dependent on |
| ----------------------------- | of packet size | packet size of |
| Network | of congestion | congestion |
| | notifications | notifications |
+-------------------------------+-----------------+-----------------+
| 1) Predominantly bit- | Scenario a1) | Scenario b1) |
| congestible network | | |
| 2) Mix of bit-congestible and | Scenario a2) | Scenario b2) |
| pkt-congestible network | | |
+-------------------------------+-----------------+-----------------+
Table 4: Four Possible Congestion Scenarios
Appendix B.1 looks at the horizontal dimension of Table 4 ๐ธ It checks that packet-mode drop (or marking) gives enough information, whether or not the transport uses it. That's scenarios b) and a) respectively.
Appendix B.2 looks at the vertical dimension of Table 4 ๐ง It checks that packet-mode drop gives the transport enough info whether the network resources are bit-congestible or packet-congestible (these terms are defined in Section 1.1).
Notation: To be concrete, we'll compare two flows with different packet sizes, s_1 and s_2. For example, we'll take s_1 = 60 B = 480 b and s_2 = 1,500 B = 12,000 b. ๐
A flow's bit rate, x [bps], is related to its packet rate, u [pps], by:
x(t) = s*u(t)
In the bit-congestible case, path congestion is denoted by p_b, and in the packet-congestible case by p_p. When either case is implied, the letter p alone denotes path congestion. ๐
B.1. Packet-Size (In)Dependence in Transports
In all cases, we consider a packet-mode drop queue that indicates congestion by dropping (or marking) packets with probability p, irrespective of packet size. We use an example value of loss (marking) probability, p=0.1%. ๐ซถ
A transport like TCP, as specified in RFC 5681, treats a congestion notification on any packet, whatever its size, as one event. However, a network with just the packet-mode drop algorithm gives more information if the transport chooses to use it. We'll use Table 5 to illustrate this ๐
We'll set aside the last column until later. The columns labelled 'Flow 1' and 'Flow 2' compare two flows made of 60 B and 1,500 B packets respectively. The body of the table considers two separate cases: one where the flows have an equal bit rate, and one with equal packet rates. In both cases, the two flows fill a 96 Mbps link. So in the equal bit rate case, they each get half the bit rate (48Mbps). Whereas, with equal packet rates, Flow 1 uses 25 times smaller packets, so it gets 25 times less bit rate. It only gets 1/(1+25) of the link capacity (96 Mbps / 26 = 4 Mbps after rounding). In contrast, Flow 2 gets 25 times more bit rate (92 Mbps) in the equal packet rate case, because its packets are 25 times larger. The packet rate shown for each flow could easily be derived once the bit rate was known, by dividing the bit rate by packet size, as shown in the column labelled 'Formula'. โจ
Parameter Formula Flow 1 Flow 2 Combined
----------------------- ----------- -------- -------- --------
Packet size s/8 60 B 1,500 B (Mix)
Packet size s 480 b 12,000 b (Mix)
Pkt loss probability p 0.1% 0.1% 0.1%
EQUAL BIT RATE CASE
Bit rate x 48 Mbps 48 Mbps 96 Mbps
Packet rate u = x/s 100 kpps 4 kpps 104 kpps
Absolute pkt-loss rate p*u 100 pps 4 pps 104 pps
Absolute bit-loss rate p*u*s 48 kbps 48 kbps 96 kbps
Ratio of lost/sent pkts p*u/u 0.1% 0.1% 0.1%
Ratio of lost/sent bits p*u*s/(u*s) 0.1% 0.1% 0.1%
EQUAL PACKET RATE CASE
Bit rate x 4 Mbps 92 Mbps 96 Mbps
Packet rate u = x/s 8 kpps 8 kpps 15 kpps
Absolute pkt-loss rate p*u 8 pps 8 pps 15 pps
Absolute bit-loss rate p*u*s 4 kbps 92 kbps 96 kbps
Ratio of lost/sent pkts p*u/u 0.1% 0.1% 0.1%
Ratio of lost/sent bits p*u*s/(u*s) 0.1% 0.1% 0.1%
Table 5: Absolute Loss Rates and Loss Ratios for Flows of Small and Large Packets and Both Combined
So far we've just set up the scenarios ๐ Now let's think about congestion notification in the scenario. Two TCP flows with the same round-trip time aim to equalise their packet-loss rates over time. That means the number of packets lost in a second, which is the packets per second (u) multiplied by the probability that each one is dropped (p). So TCP converges on the case labelled 'Equal packet rate' in the table, where both flows aim for the same absolute packet-loss rate (both 8 pps in the table). ๐
Packet-mode drop actually gives flows enough information to measure their loss rate in bits per second, if they choose, not just packets per second. Each flow can count the size of a lost or marked packet and scale its rate response in proportion (as TFRC-SP does) ๐ฆ The result is shown in the row entitled 'Absolute bit-loss rate', where the bits lost in a second is the packets per second (u) multiplied by the probability of losing a packet (p), multiplied by the packet size (s). Such an algorithm would try to remove any imbalance in the bit-loss rate, like the wide disparity in the case labelled 'Equal packet rate' (4k bps vs. 92 kbps). Instead, a packet-size-dependent algorithm would aim for equal bit-loss rates. That would drive both flows towards the case labelled 'Equal bit rate', by driving them to equal bit-loss rates (both 48 kbps in this example). ๐ฅ
The explanation so far has assumed that each flow consists of packets of only one constant size. Still, it extends naturally to flows with mixed packet sizes ๐ธ In the right-most column of Table 5, a flow of mixed-size packets is created simply by considering Flow 1 and Flow 2 as a single aggregated flow. There's no need for a flow to maintain an average packet size. It's only necessary for the transport to scale its response to each congestion indication by the size of each individual lost (or marked) packet. Take, for example, the case labelled 'Equal packet rate': in one second, about 8 small packets and 8 large packets are lost (making closer to 15 than 16 losses per second due to rounding). If the transport multiplies each loss by its size, in one second it responds to 8*480 and 8*12,000 lost bits, adding up to 96,000 lost bits in a second. This double checks correctly, being the same as 0.1% of the total bit rate of 96 Mbps. For completeness, the formula for absolute bit-loss rate is p(u1*s1+u2*s2). ๐งฎ
Incidentally, a transport will always measure the loss probability the same, whether it measures in packets or in bytes. In other words, the ratio of lost packets to sent packets will be the same as the ratio of lost bytes to sent bytes. (This is why TCP's bit rate is still proportional to packet size, even when byte counting is used, as recommended for TCP in [RFC5681], mainly for orthogonal security reasons.) This is intuitively obvious when you compare two example flows: one with 60 B packets, the other with 1,500 B packets. If both flows pass through a queue with drop probability 0.1%, each flow will lose 1 in 1,000 packets. In the stream of 60 B packets, the ratio of lost bytes to sent bytes will be 60 B in every 60,000 B. In the stream of 1,500 B packets, the loss ratio will be 1,500 B out of 1,500,000 B. When the transport responds to the ratio of lost to sent packets, it measures the same ratio whether it measures in packets or bytes: 0.1% in both cases. You can see this in Table 5, where the ratio of lost packets to sent packets and the ratio of lost bytes to sent bytes is always 0.1% in all cases (recall that the scenario was set up with p=0.1%). ๐
This discussion of how the ratio can be measured in packets or bytes is only raised here to highlight that it is irrelevant to this memo! ๐ Whether or not a transport depends on packet size depends on how this ratio is used within the congestion control algorithm.
So far, we've shown that packet-mode drop passes enough information to the transport layer so that the transport can take bit congestion into account, by using the sizes of the packets that indicate congestion. We've also shown that the transport can choose not to take packet size into account if it wishes. Next up, we'll consider whether the transport can know which to do. ๐
B.2. Bit-Congestible and Packet-Congestible Indications ๐งชโจ
okay so, imagine a thought-experiment ๐ง an idealised congestion notification protocol that handles BOTH bit-congestible and packet-congestible resources. it would need at least two ECN flags, one for each kind of resource. bestie this is where it gets spicy ๐ถ๏ธ
- a packet-congestible resource trying to code congestion level p_p into a packet stream should mark the idealised 'packet congestion' field in each packet with probability p_p, irrespective of the packet's size. the transport should then take a packet with the packet congestion field marked to mean just one mark, irrespective of the packet size. ๐
- a bit-congestible resource trying to code time-varying byte-congestion level p_b into a packet stream should mark the 'byte congestion' field in each packet with probability p_b, again irrespective of the packet's size. unlike before, the transport should take a packet with the byte congestion field marked to count as a mark on each byte in the packet. ๐
this hides a fundamental problem ๐ญ and it's way more fundamental than whether we can magically create header space for yet another ECN flag, or whether it would work while being deployed incrementally. distinguishing drop from delivery naturally gives just ONE implicit bit of congestion info: the packet is either dropped or not. it's so hard to drop a packet in two ways that are distinguishable remotely. this is kinda the same problem as telling wireless transmission losses apart from congestive losses ๐ก
and it wouldn't be solved even if ECN were universally deployed. a congestion notification protocol has to survive a transition from low levels of congestion to high. marking two states is feasible with explicit marking, but it's much harder if packets are dropped. also, it won't always be cost-effective to implement AQM at every low-level resource, so drop will often have to suffice ๐
we are NOT saying two ECN fields will be needed. (and we are not saying that somehow a resource should be able to drop a packet in one of two different ways so that the transport can distinguish which sort of drop it was!) these two congestion notification channels are a conceptual device to illustrate a dilemma we could face in the future. ๐ซถ
Section 3 gives four good reasons why it would be a bad idea to allow for packet size by biasing drop probability in favour of small packets within the network. the impracticality of our thought experiment shows that it will be hard to give transports a practical way to know whether or not to take into account the size of congestion indication packets ๐
thankfully this dilemma isn't pressing ๐ธ because by design most equipment becomes bit-congested before its packet processing becomes congested (as already outlined in Section 1.1). so transports can be designed on the relatively sound assumption that a congestion indication will usually imply bit congestion. โจ
still, even though the above idealised protocol isn't meant for implementation, we do want to emphasise that research is needed to predict whether there are good reasons to believe packet congestion might become more common. and if so, we need to find a way to somehow distinguish between bit and packet congestion [RFC3714]. ๐
recently, the dual resource queue (DRQ) proposal [DRQ] has been made on the premise that, as network processors become more cost-effective, per-packet operations will become more complex (irrespective of whether more function in the network is desirable). consequently, the premise is that CPU congestion will become more common. DRQ is a proposed modification to the RED algorithm that folds both bit congestion and packet congestion into one signal (either loss or ECN). ๐ง
finally, one more complication ๐ strictly speaking, packet-congestible resources are often cycle-congestible. for instance, for routing lookups, the load depends on the complexity of each lookup and on whether or not the pattern of arrivals is amenable to caching. this also reminds us that any solution must not require a forwarding engine to use excessive processor cycles in order to decide how to say it has no spare processor cycles. the irony is real ๐
Appendix C. Byte-Mode Drop Complicates Policing Congestion Response ๐ฆ
This section is informative, not normative. ๐
okay so there are two main classes of approach to policing congestion response: (i) policing at each bottleneck link, or (ii) policing at the edges of networks. packet-mode drop in RED is compatible with either one, but byte-mode drop precludes edge policing ๐ซ
the simplicity of an edge policer relies on one dropped or marked packet being equivalent to another of the same size, without having to know which link the drop or mark occurred at. BUT the byte-mode drop algorithm has to depend on the local MTU of the line, because it needs some concept of a 'normal' packet size. so one dropped or marked packet from a byte-mode drop algorithm is not necessarily equivalent to another from a different link. ๐ค a policing function local to the link can know the local MTU where the congestion occurred. however, a policer at the edge of the network cannot, at least not without a lot of complexity. ๐ฅฒ
the early research proposals for type (i) policing at a bottleneck link [pBox] used byte-mode drop, then detected flows that contributed disproportionately to the number of packets dropped. however, with no extra complexity, later proposals used packet-mode drop and looked for flows that contributed a disproportionate amount of dropped bytes [CHOKe_Var_Pkt]. glow-up energy ๐
work is progressing on the Congestion Exposure (ConEx) protocol [RFC6789], which enables a type (ii) edge policer located at a user's attachment point. the idea is to take an integrated view of the effect of all a user's traffic on any link in the internetwork. but byte-mode drop would effectively preclude such edge policing because of the MTU issue above. ๐ง
and honestly, making drop probability depend on the size of the packets that bits happen to be divided into would just encourage the bits to be divided into smaller packets in order to confuse policing. ๐ in contrast, as long as a dropped/marked packet is taken to mean that all the bytes in the packet are dropped/marked, a policer can stay robust against sequences of bits being re-divided into different size packets or across different size flows [Rate_fair_Dis]. main character policing energy ๐
Authors' Addresses ๐ธ
Bob Briscoe
BT
B54/77, Adastral Park
Martlesham Heath
Ipswich IP5 3RE
UK
Phone: +44 1473 645196
EMail: bob.briscoe@bt.com
URI: http://bobbriscoe.net/
Jukka Manner
Aalto University
Department of Communications and Networking (Comnet)
P.O. Box 13000
FIN-00076 Aalto
Finland
Phone: +358 9 470 22481
EMail: jukka.manner@aalto.fi
URI: http://www.netlab.tkk.fi/~jmanner/
๐ฆ where this page comes from
- ietf: rfc7141 2014-02
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms