<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<rfc category="info" docName="draft-briscoe-tsvwg-byte-pkt-mark-00"
     ipr="full3978">
  <?xml-stylesheet type='text/xsl' href='http://xml.resource.org/authoring/rfc2629.xslt' ?>

  <!-- Alterations to I-D/RFC boilerplate -->

  <?rfc private="" ?>

  <!-- Default private="" Produce an internal memo 2.5pp shorter than an I-D or RFC -->

  <?rfc topblock="yes" ?>

  <!-- Default topblock="yes" put the famous header block on the first page -->

  <?rfc footer="" ?>

  <!-- Default footer="Expires <date>" override the center footer string -->

  <?rfc header="" ?>

  <!-- Default header="Internet-Draft" override the leftmost header string -->

  <?rfc authorship="yes" ?>

  <!-- Default authorship="yes" Render authors' addresses section -->

  <?rfc rfcprocack="yes" ?>

  <!-- Default rfcprocack="no" add a short sentence acknowledging xml2rfc -->

  <?rfc strict="no" ?>

  <!-- Default strict="no" Don't check I-D nits -->

  <?rfc rfcedstyle="no" ?>

  <!-- Default rfcedstyle="yes" attempt to closely follow finer details from the latest observable RFC-Editor style -->

  <?rfc colonspace="no" ?>

  <!-- Default colonspace="no" put two spaces instead of one after each colon (``:'') in txt or nroff files -->

  <?rfc notedraftinprogress="yes" ?>

  <!-- Default notedraftinprogress="yes" generates "(work in progress)", as appropriate -->

  <?rfc refparent="References" ?>

  <!-- Default refparent="References" title of the top-level section containing all references -->

  <!-- IETF process -->

  <?rfc iprnotified="no" ?>

  <!-- Default iprnotified="no" I haven't disclosed existence of IPR to IETF -->

  <!-- ToC format -->

  <?rfc toc="yes" ?>

  <!-- Default toc="no" No Table of Contents -->

  <?rfc tocappendix="yes" ?>

  <!-- Default tocappendix="yes" control whether the word `Appendix' appears in the table-of-content -->

  <?rfc tocdepth="3" ?>

  <!-- Default tocdepth="3" if toc is "yes", then this determines the depth of the table-of-contents -->

  <?rfc tocindent="yes" ?>

  <!-- Default tocindent="yes" if toc is "yes", indent subsections in the table-of-contents -->

  <?rfc tocnarrow="yes" ?>

  <!-- Default tocnarrow="yes" affects horizontal spacing in the table-of-content -->

  <?rfc tocompact="yes" ?>

  <!-- Default tocompact="yes" if toc is "yes", then setting this to "no" will make it a little less compact -->

  <!-- Cross referencing, footnotes, comments -->

  <?rfc symrefs="yes" ?>

  <!-- Default symrefs="no" Don't use anchors, but use numbers for refs -->

  <?rfc sortrefs="yes"?>

  <!-- Default sortrefs="no" Don't sort references into order -->

  <?rfc comments="yes" ?>

  <!-- Default comments="no" Don't render comments -->

  <?rfc inline="no" ?>

  <!-- Default inline="no" if comments is "yes", then render comments inline; otherwise render them in an `Editorial Comments' section -->

  <?rfc editing="no" ?>

  <!-- Default editing="no" Don't insert editing marks for ease of discussing draft versions -->

  <!-- Pagination control -->

  <?rfc compact="yes"?>

  <!-- Default compact="no" Start sections on new pages -->

  <?rfc subcompact="no"?>

  <!-- Default subcompact="(as compact setting)" yes/no is not quite as compact as yes/yes -->

  <?rfc autobreaks="yes" ?>

  <!-- Default autobreaks="yes" avoid widows and orphans (not perfect) -->

  <!-- HTML formatting control -->

  <?rfc emoticonic="yes" ?>

  <!-- Default emoticonic="no" Doesn't prettify HTML format -->

  <?rfc background="" ?>

  <!-- Default background="" when producing a html file, use this image -->

  <?rfc useobject="no" ?>

  <!-- Default useobject="no" use <object> not <src> when outputting HTML -->

  <?rfc linkmailto="yes" ?>

  <!-- Default linkmailto="yes" generate mailto: URL, as appropriate -->

  <?rfc docmapping="no" ?>

  <!-- Default docmapping="no" use hierarchical tags (e.g., <h1>, <h2>, etc.) for (sub)section titles -->

  <?rfc slides="no" ?>

  <!-- Default slides="no" when producing a html file, produce multiple files for a slide show -->

  <front>
    <title abbrev="Byte and Packet Congestion Notification">Byte and Packet
    Congestion Notification</title>

    <author fullname="Bob Briscoe" initials="B." surname="Briscoe">
      <organization>BT &amp; UCL</organization>

      <address>
        <postal>
          <street>B54/77, Adastral Park</street>

          <street>Martlesham Heath</street>

          <city>Ipswich</city>

          <code>IP5 3RE</code>

          <country>UK</country>
        </postal>

        <phone>+44 1473 645196</phone>

        <email>bob.briscoe@bt.com</email>

        <uri>http://www.cs.ucl.ac.uk/staff/B.Briscoe/</uri>
      </address>
    </author>

    <date day="17" month="June" year="2007" />

    <area>Transport</area>

    <workgroup>Transport Area Working Group</workgroup>

    <keyword>Quality of Service</keyword>

    <keyword>QoS</keyword>

    <keyword>Congestion Control</keyword>

    <keyword>Protocol</keyword>

    <abstract>
      <t>This memo was written to clarify how (and whether) to take packet
      size into account when notifying congestion using active queue
      management (AQM) such as random early detection (RED). The scope
      includes resource congestion by bytes and by packet processing, even
      though the latter is less common. It answers the question of whether
      packet size should be taken into account when network equipment writes
      congestion notification, or when transports read it. The primary
      conclusion is that RED's byte-mode packet drop should not be used
      because it creates a perverse incentive for transports to use tiny
      segments. <!-- ToDo: Add DDoS vulnerability -->TCP's lack of attention
      to packet size should be fixed in TCP, not by reverse engineering
      network forwarding to fix transport protocols.</t>
    </abstract>
  </front>

  <middle>
    <!-- ================================================================ -->

    <section anchor="pktb_Introduction" title="Introduction">
      <t>When notifying congestion, the problem of how (and whether) to take
      packet sizes into account has exercised the minds of researchers and
      practitioners for as long as active queue management (AQM) has been
      discussed. This memo aims to state the principles we should be using and
      to come to conclusions on what these principles will mean for future
      protocol design, taking into account the deployments we have
      already.</t>

      <t>If the load on a resource depends on the rate at which packets
      arrive, it is called packet-congestible. If the load depends on the rate
      at which bits arrive it is called bit-congestible.</t>

      <t>Examples of packet-congestible resources are route look-up engines
      and firewalls, because load depends on how many packet headers they have
      to process. Examples of bit-congestible resources are transmission
      links, and buffer memory, because the load depends on how many bits they
      have to transmit or store. Note that information is generally processed
      or transmitted with a minimum granularity greater than a bit. The
      appropriate granularity for the resource in question SHOULD be used, but
      for the sake of brevity we will talk in terms of bytes in this memo.</t>

      <t>Resources may be congestible at higher levels of granularity than
      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 applied for
      congestion notification protocols controlling per-flow and per-session
      processing or state.</t>

      <t>The byte vs. packet dilemma arises at three stages in the congestion
      notification process: <list style="hanging">
          <t hangText="Measuring congestion">When the congested resource
          decides locally how to measure how congested it is (should the queue
          be measured in bytes or packets?);</t>

          <t
          hangText="Coding congestion notification into the wire protocol:">When
          the congested resource decides how to notify the level of congestion
          (should the level of notification depend on the byte-size of each
          particular packet carrying the notification?);</t>

          <t
          hangText="Decoding congestion notification from the wire protocol:">When
          the transport interprets the notification (should the byte-size of a
          missing or marked packet be taken into account?).</t>
        </list> In RED, whether to use packets or bytes when measuring queues
      is called packet-mode or byte-mode queue measurement. This choice is now
      fairly well understood but is included in <xref
      target="pktb_Measure"></xref> to document it in the RFC series.</t>

      <t>The controversy is mainly around the other two stages: whether to
      allow for packet size when the network codes or when the transport
      decodes congestion notification. In RED, this choice is termed
      packet-mode or byte-mode drop as opposed to queue measurement, which is
      an orthogonal choice. Note that this issue concerns how much each
      congestion notification on a packet should be taken to mean,
      irrespective of whether it is signalled implicitly by drop or explicitly
      using ECN <xref target="RFC3168"></xref>.</t>

      <t>Increasingly, it is being recognised that a protocol design must take
      care not to cause unintended consequences by giving the parties in the
      protocol exchange perverse incentives <xref
      target="Evol_cc"></xref><xref target="RFC3426"></xref>. For instance,
      imagine a scenario where the same bit rate of packets will contribute
      the same to congestion of a link irrespective of whether it is 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 this case. Transports would tend to act in their
      own interests by breaking their data stream down into tiny segments,
      reducing their drop rate without reducing their bit rate. Encouraging a
      high volume of tiny packets might in turn unnecessarily overload a
      completely unrelated part of the system.</t>

      <t>Currently, the paper trail of advice referenced from the RFC series
      (sort of) recommends exactly such packet-size dependent drop, although
      we believe implementers may have ignored the advice. The primary purpose
      of this memo is to explain why that advice should be reversed and
      eventually to record a definitive consensus within the RFC series.</t>

      <t>Imagine two flows arrive at a bit-congestible transmission link each
      with the same bit rate, say 1Mbps, but one consists of 1500B and the
      other 60B packets. For bit-congestible resources, it is currently
      recommended that RED should be configured to adjust the drop probability
      of packets in proportion to each packet's size (byte mode packet drop).
      So in this case, if RED drops 25% of the larger packets, it will drop 1%
      of the smaller packets. The bit rate passed to the line by the RED queue
      will therefore be 750k for the flow of larger packets but 990k for flow
      of smaller packets, even though they both arrived with the same bit
      rate.</t>

      <!-- ToDo: Point out the DDoS vulnerability incl of drop tail-->

      <t>The reason it was recommended that RED should work like this is that
      TCP has always been the predominant transport used in the Internet, and
      TCP congestion control ensures that flows competing for the same
      resource each maintain the same number of segments in flight,
      irrespective of segment size. Rather than discuss the possibility of
      fixing the problem in TCP, it was recommended that routers should be
      altered to reverse engineer the network layer around TCP, contrary to
      the excellent advice in <xref target="RFC3426"></xref>, which asks
      designers to question "Why are you proposing a solution at this layer of
      the protocol stack, rather than at another layer?" The implicit plan
      seems to have been to use gradual RED deployment in the network as a way
      to make the fairness that the TCP algorithm achieves gradually change
      from equalising segment-rate to equalising bit-rate between flows. This
      seems to be how we ended up recommending RED should use byte-mode packet
      drop to discard equal numbers of packets, not bits, from equal bit-rate
      flows.</t>

      <t>Now is a good time to discuss whether fairness between different
      sized packets would best be implemented in the network layer, or at the
      transport, for a number of reasons: <list style="numbers">
          <t>The packet vs. byte issue requires speedy resolution because the
          IETF pre-congestion notification (PCN) working group is in the
          process of being chartered to produce a standards track
          specification of its congestion marking (AQM) algorithm <xref
          target="PCNcharter"></xref>;</t>

          <t><xref target="RFC2309"></xref> says RED may either take account
          of packet size or not when dropping, but gives no recommendation
          between the two, referring instead to advice on the performance
          implications in an email <xref target="pktByteEmail"></xref>, which
          recommends byte-mode drop, but without really discussing
          performance. Further, just before RFC2309 was issued, an addendum
          was added to the archived email that revisited the issue of packet
          vs. byte-mode drop in its last para, making the recommendation less
          clear-cut;</t>

          <t>Currently, no active queue management behaviour like RED has been
          standardised, so implementers have no other standards guidance than
          <xref target="RFC2309"></xref>, which is informational;</t>

          <t>The IRTF Internet Congestion Control Research Group (ICCRG)
          recently took on the challenge of building consensus on what common
          congestion control support should be required from forwarding
          engines on routers in the future;</t>

          <t>The Internet community needs to discuss widely whether the
          complexity of adjusting for packet size should be on routers or in
          transports;</t>

          <t>Given there are many good reasons why larger path max
          transmission units (PMTUs) would help solve a number of scaling
          issues, we don't want to create any bias against large packets that
          is greater than their true cost;</t>

          <t>And finally, given it has recently been shown that TCP doesn't
          achieve any meaningful fairness anyway <xref
          target="I-D.briscoe-tsvarea-fair"></xref>, because it doesn't
          consider fairness over all the flows a user transmits nor over time,
          modifying the network so as not to have to modify TCP still won't
          achieve fairness. It seems more likely we have to face up to
          changing TCP anyway.</t>
        </list></t>

      <t>This memo starts from first principles, defining congestion
      notification in <xref target="pktb_Congestion_Definition"></xref> then
      determining the correct way to measure congestion (<xref
      target="pktb_Measure"></xref>) and to design an idealised congestion
      notification protocol (<xref target="pktb_Ideal_Coding"></xref>). It
      then surveys the advice given previously in the RFC series, the research
      literature and the deployed legacy (<xref target="pktb_SotA"></xref>)
      before summarising the recommended way forward and listing outstanding
      issues (<xref target="pktb_Issues"></xref>) that will need resolution
      both to achieve the ideal protocol and to handle legacy.</t>
    </section>

    <!-- ================================================================ -->

    <section anchor="pktb_Reqs_notation" title="Requirements notation">
      <t>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 <xref
      target="RFC2119"></xref>.</t>
    </section>

    <!-- ================================================================ -->

    <section anchor="pktb_Congestion_Definition"
             title="Working Definition of Congestion Notification">
      <t>Rather than aim to achieve what many have tried and failed, this memo
      will not try to define congestion. It will give a working definition of
      what congestion notification should be taken to mean for this document.
      Congestion notification is a changing signal that aims to communicate
      the ratio E/L, where E is the instantaneous excess load offered to a
      resource that it cannot (or would not) serve and L is the instantaneous
      offered load.</t>

      <t>The phrase `would not serve' is added, because AQM systems (e.g. RED,
      PCN <xref target="PCN"></xref>) use a virtual capacity smaller than
      actual capacity, then notify congestion of this virtual capacity in
      order to avoid congestion of the actual capacity.</t>

      <t>Note that the denominator is offered load, not capacity. Therefore
      congestion notification is a real number bounded by the range [0,1].
      This ties in with the most well-understood form of congestion
      notification: drop rate. It also means that congestion has a natural
      interpretation as a probability; the probability of offered traffic not
      being served (or being marked as at risk of not being served).</t>

      <t>Incidentally, load being the denominator also has a subtle
      significance in the related debate over whether desired flow rates
      should be communicated between transport and network and whether
      achievable flow rates should then be communicated back again (e.g. in
      XCP <xref target="I-D.falk-xcp-spec"></xref> &amp; Quickstart <xref
      target="RFC4782"></xref>). Even though congestion notification doesn't
      communicate a rate explicitly, from each source's point of view
      congestion notification represents the fraction of the rate it was
      sending a round trip ago that couldn't (or wouldn't) be served by
      available resources. After they were sent, all these fractions of each
      source's offered load added up to the aggregate fraction of offered load
      seen by the congested resource. Therefore the instantaneous excess flow
      rate an RTT ago is implicitly communicated within this one scale-free
      dimensionless fraction (and a lot more).</t>
    </section>

    <!-- ================================================================ -->

    <section anchor="pktb_Measure" title="Congestion Measurement">
      <t>Queue length is usually the most correct and simplest way to measure
      congestion of a resource. To avoid the pathological effects of drop
      tail, an AQM function can then be used to transform queue length into
      the probability of dropping or marking a packet (e.g. RED's piecewise
      linear function between thresholds). If the resource is bit-congestible,
      the length of the queue SHOULD be measured in bytes. If the resource is
      packet-congestible, the length of the queue SHOULD be measured in
      packets. 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. We discuss the implications on RED's byte mode and
      packet mode for measuring queue length in <xref
      target="pktb_SotA"></xref>.</t>

      <t>There is a complication for some queuing hardware that consists of
      fixed sized buffers. Each packet fills as many buffers as are necessary
      leaving remaining space empty in the last buffer. Also, with some
      hardware, any fixed sized buffers not completely filled by the end of a
      packet are padded when transmitted to the wire.</t>

      <t>Taking the extreme for the size of these buffers, a forwarding system
      with both queuing and transmission in MTU-sized units should clearly be
      treated as packet-congestible, because the queue length in packets would
      be a good model of congestion of the lower layer link.</t>

      <t>A hybrid forwarding system with transmission delay largely dependent
      on the byte-size of packets but buffers of one MTU per packet would
      strictly require a more complex algorithm to determine the probability
      of congestion. It would have to be treated as two resources in sequence,
      where the sum of the byte-sizes of the packets within each packet buffer
      modelled congestion of the line while the length of the queue in packets
      modelled congestion of the buffer. Then the probability of congesting
      the forwarding buffer would have to be a conditional
      probability&mdash;conditional on the previously calculated probability
      of congesting the line. The sub-MTU-sized fixed buffers described above
      would require a slightly more complex model to fully determine how best
      to measure the queue. It would then be necessary to approximate this
      back to some practical algorithm.</t>

      <t>Not all congested resources lead to queues. For instance, wireless
      spectrum is bit-congestible (for a given coding scheme), because
      interference increases with the rate at which bits are transmitted. But
      wireless link protocols do not always maintain a queue that depends on
      spectrum interference. Similarly, power limited resources are also
      usually bit-congestible if energy is primarily required for transmission
      rather than header processing, but it is rare for a link protocol to
      build a queue as it approaches maximum power. <xref
      target="ECNFixedWireless"></xref> proposes a practical and theoretically
      sound way to combine congestion notification for different
      bit-congestible resources along an end to end path, whether wireless or
      wired, and whether with or without queues.</t>
    </section>

    <!-- ================================================================ -->

    <section anchor="pktb_Ideal_Coding" title="Idealised Wire Protocol Coding">
      <t>We will start by inventing an idealised congestion notification
      protocol before discussing how to make it practical. The idealised
      protocol is shown to be correct using examples in <xref
      target="pktb_Scenarios"></xref>. Congestion notification involves the
      congested resource coding a congestion notification signal into the
      packet stream and the transports decoding it. The idealised protocol
      uses two different fields in each datagram to signal congestion: one for
      byte congestion and one for packet congestion.</t>

      <t>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 just a
      conceptual device. They allow us to defer having to decide whether to
      distinguish between byte and packet congestion when the network resource
      codes the signal or when the transport decodes it.</t>

      <t>However, although this idealised mechanism isn't intended for
      implementation, we do want to emphasise that we must find a way to
      implement it, because it could become necessary to somehow distinguish
      between bit and packet congestion <xref target="RFC3714"></xref>.
      Currently a design goal of network processing equipment such as routers
      and firewalls is to keep packet processing uncongested even under worst
      case bit rates with minimum packet sizes. Therefore, packet-congestion
      is currently rare, but there is no guarantee that it will not become
      common with future technology trends.</t>

      <t>The idealised wire protocol is given below. It allows for packet size
      at the transport layer, not in the network, and then only in the case of
      bit-congestible resources. This avoids the perverse incentive to send
      smaller packets that would otherwise result if the network were to bias
      towards them (see Introduction). <!-- ToDo: Add robustness to DDoS -->Incidentally,
      it also ensures neither the network nor the transport needs to do a
      multiply&mdash;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: <list style="symbols">
          <t>A packet-congestible resource trying to code congestion level p_p
          into a packet stream should mark the `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.</t>

          <t>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.</t>
        </list></t>

      <t>The worked examples in <xref target="pktb_Scenarios"></xref> show
      that transports can extract sufficient and correct congestion
      notification from these protocols for cases when two flows with
      different packet sizes have matching bit rates or matching packet rates.
      Examples are also given that mix these two flows into one to show that a
      flow with mixed packet sizes would still be able to extract sufficient
      and correct information.</t>

      <t>Sufficient and correct congestion information means that there is
      sufficient information for the two different types of transport
      requirements: <list style="symbols">
          <t>Established transport congestion controls like TCP's <xref
          target="RFC2581"></xref> aim to achieve equal segment rates per RTT
          through the same bottleneck&mdash;TCP `fairness' <xref
          target="RFC3448"></xref>. They work with the ratio of marked to
          unmarked segments. The example scenarios show that these ratio-based
          transports are effectively the same whether counting in bytes or
          marks, because the units cancel out. (Incidentally, this is why
          TCP's bit rate is still proportional to packet size even when
          byte-counting is used, as recommended for TCP in <xref
          target="I-D.ietf-tcpm-rfc2581bis"></xref>, mainly for orthogonal
          security reasons.)</t>

          <t>Other congestion controls proposed in the research community aim
          to limit the volume of congestion caused to a constant weight
          parameter. <xref target="MulTCP"></xref><xref
          target="WindowPropFair"></xref> are examples of weighted
          proportionally fair transports designed for cost-fair environments
          <xref target="I-D.briscoe-tsvarea-fair"></xref>. In this case, the
          transport requires a count (not a ratio) of marked bytes in the
          bit-congestible case and of marked packets in the packet congestible
          case.</t>
        </list></t>
    </section>

    <!-- ================================================================ -->

    <section anchor="pktb_SotA" title="The State of the Art">
      <t>The original 1993 paper on RED <xref target="RED93"></xref> proposed
      two options for the RED active queue management algorithm: packet mode
      and byte mode. Packet mode measured the queue length in packets and
      marked (or dropped) individual packets with a probability independent of
      their size. Byte mode measured the queue length in bytes and marked an
      individual packet with probability in proportion to its size (relative
      to the maximum packet size). In the paper's outline of further work, it
      was stated that no recommendation had been made on whether the queue
      size should be measured in bytes or packets, but noted that the
      difference could be significant.</t>

      <t>When RED was recommended for general deployment in 1998 <xref
      target="RFC2309"></xref>, the two modes were mentioned implying the
      choice between them was a question of performance, referring to a 1997
      email <xref target="pktByteEmail"></xref> for advice on tuning. This
      email clarified that there were in fact two orthogonal choices: whether
      to measure queue length in bytes or packets (<xref
      target="pktb_Measure_Status"></xref>) and whether the drop probability
      of an individual packet should depend on its own size (<xref
      target="pktb_Coding_Status"></xref>).</t>

      <!-- ________________________________________________________________ -->

      <section anchor="pktb_Measure_Status"
               title="Congestion Measurement: Status">
        <t>The choice of which metric to use to measure queue length was left
        open in RFC2309. It is 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 (see <xref
        target="pktb_Measure"></xref>).</t>

        <t>Where buffers are not configured or legacy buffers cannot be
        configured to the above guideline, we needn't have to make allowances
        for such legacy in future protocol design. If a bit-congestible buffer
        is measured in packets, the operator will have set the thresholds
        mindful of a typical mix of packets sizes. Any AQM algorithm on such a
        buffer will be oversensitive to high proportions of small packets<!-- ToDo: (e.g. a DoS attack)-->,
        and undersensitive to high proportions of large packets. But an
        operator can safely keep such a legacy buffer because any
        undersensitivity during unusual traffic mixes cannot lead to
        congestion collapse given the buffer will eventually revert to tail
        drop.</t>

        <t>Some modern router implementations give a choice for setting RED's
        thresholds in byte-mode or packet-mode. This may merely be an
        administrator-interface preference, not altering how the queue itself
        is measured but on some hardware it does actually change the way it
        measures its queue. Whether a resource is bit-congestible or
        packet-congestible is a property of the resource, so an admin SHOULD
        NOT ever need to, or be able to, configure the way it measures
        itself.</t>

        <t>We believe the question of whether to measure queues in bytes or
        packets is fairly well understood these days. The only outstanding
        issues concern how to measure congestion when the queue is bit
        congestible but the resource is packet congestible or vice versa (see
        <xref target="pktb_Measure"></xref>).</t>
      </section>

      <!-- ________________________________________________________________ -->

      <section anchor="pktb_Coding_Status" title="Congestion Coding: Status">
        <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->

        <section anchor="pktb_Network_Bias" title="Network Bias when Encoding">
          <t>The previously mentioned email <xref
          target="pktByteEmail"></xref> referred to by <xref
          target="RFC2309"></xref> said that the choice over whether a
          packet's own size should affect its drop probability "depends on the
          dominant end-to-end congestion control mechanisms". [This assumes
          the network should be changed to accommodate the predominant
          transport, without questioning whether the transport should be fixed
          instead.] The line of reasoning went on to say that congestion
          control in protocols such as TCP doesn't depend on the fraction of
          bytes or packets that are dropped from a flow, but merely on whether
          or not one or more drops were present in the most recent window
          [this is incorrect]. It argued 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 is packet-congestible, but advised
          that most scarce resources in the Internet were currently
          bit-congestible. The argument continued that if packet drops were
          inflated by packet size (byte-mode dropping), "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 was consistent with
          a referenced policing mechanism being worked on at the time for
          detecting unusually high bandwidth flows, eventually published in
          1999 <xref target="pBox"></xref>. [The problem could have been
          solved by making the policing mechanism count the volume of bytes
          randomly dropped, not the number of packets.]</t>

          <t>A few months before RFC2309 was published, an addendum was added
          to the above archived email referenced from the RFC, in which the
          final paragraph seemed to partially retract what had previously been
          said. It clarified that the question of whether the probability of
          marking a packet should depend on its size was not related to
          whether the resource itself was bit congestible, but a completely
          orthogonal question. However the only example given had the queue
          measured in packets but packet drop depended on the byte-size of the
          packet in question. No example was given the other way round. [One
          can only assume that the reasoning for byte-mode drop in this case
          was still to try to reverse engineer the network to allow for TCP
          not accounting for packet size.]</t>

          <t>In 2000, Cnodder et al <xref target="REDbyte"></xref> pointed out
          that there was an error in the part of the original 1993 RED
          algorithm that aimed to distribute drops uniformly, because it
          didn't correctly take into account the adjustment for packet size.
          They recommended an algorithm called RED_4 to fix this. But they
          also recommended a further change, RED_5, to adjust drop rate
          dependent on the square of relative packet size. This was indeed
          correct,... but only if one agrees with the original principle
          behind RED's byte mode drop&mdash;that we should reverse engineer
          the network in order to arrange for TCP flows with different packet
          sizes to achieve equal rates through the same bottleneck.</t>

          <t>By 2003, a further change had been made to the adjustment for
          packet size, 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', intended to be
          a static value representative of the `typical' packet size on the
          link. We have not been able to find a justification for this change
          in the literature, however Eddy and Allman conducted experiments
          <xref target="REDbias"></xref> that assessed how sensitive RED was
          to this parameter, amongst other things. No-one seems to have
          pointed out that this changed algorithm can often lead to drop
          probabilities of greater than 1 [which should ring alarm bells
          hinting that there's a mistake in the theory somewhere].</t>
        </section>

        <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->

        <section anchor="pktb_Transport_Bias"
                 title="Transport Bias when Decoding">
          <t>The above proposals to alter the network layer to fix TCP's
          insensitivity to segment size have largely carried on outside the
          IETF process (unless one counts a reference in an informational RFC
          to an archived email!).</t>

          <t>However, a recently approved experimental RFC adapts its
          transport layer protocol to take account of packet sizes relative to
          typical TCP packet sizes. This proposes a new small-packet variant
          of TCP-friendly rate control <xref target="RFC3448"></xref> called
          TFRC-SP <xref target="RFC4828"></xref>. Essentially, it proposes a
          rate equation that inflates the flow rate by the ratio of a typical
          TCP segment size (1500B including TCP header) over the actual
          segment size <xref target="PktSizeEquCC"></xref>. There are also
          other important differences of detail relative to TFRC, such as
          using virtual packets <xref target="CCvarPktSize"></xref> to avoid
          responding to multiple losses per round trip and using a minimum
          inter-packet interval.</t>

          <t>Section 4.5.1 of this TFRC-SP spec discusses the implications of
          operating in an environment where routers have been configured to
          drop smaller packets with proportionately lower probability than
          larger ones. But surprisingly, it only discusses TCP operating in
          such an environment, only mentioning TFRC-SP briefly when discussing
          how to define fairness with TCP. And it only discusses the byte-mode
          dropping version of RED as it was before Cnodder et al pointed out
          it didn't sufficiently bias towards small packets to make TCP
          independent of packet size.</t>

          <t>So the TFRC-SP spec doesn't address the issue of which of the
          network or the transport <spanx style="emph">should</spanx> handle
          fairness between different packet sizes. In its Appendix B.4 it
          discusses the possibility of both TFRC-SP and some network buffers
          duplicating each other's attempts to deliberately bias towards small
          packets. But the discussion is not conclusive, instead reporting
          simulations of many of the possibilities in order to assess
          performance rather than recommending any action.</t>

          <t>The paper originally proposing TFRC with virtual packets
          (VP-TFRC) <xref target="CCvarPktSize"></xref> proposed that there
          should perhaps be two variants to cater for the different variants
          of RED. However, as the TFRC-SP authors point out, there is no way
          for a transport to know whether some queues on its path have
          deployed RED with byte-mode packet drop (except if an exhaustive
          survey found that no-one has deployed it!&mdash;see <xref
          target="pktb_Coding_Status_Summary"></xref>). Incidentally, VP-TFRC
          also proposed that byte-mode RED dropping should really square the
          packet size compensation factor (like that of RED_5, but apparently
          unaware of it).</t>

          <t>Pre-congestion notification <xref target="PCN"></xref> is a
          proposal to use a virtual queue for AQM marking for packets within
          one Diffserv class in order to give early warning prior to any real
          queuing. The proposed PCN marking algorithms have been designed not
          to take account of packet size on routers. Instead the general
          principle has been to take account of the sizes of marked packets
          when monitoring the fraction of marking at the edge of the
          network.</t>
        </section>

        <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->

        <section anchor="pktb_Coding_Status_Summary"
                 title="Congestion Coding: Summary of Status">
          <t><?rfc needLines="6" ?> <texttable anchor="pktb_Tab_TFRC-SP"
              title="Dependence of flow bit-rate per RTT on packet size s and drop rate p when network and/or transport bias towards small packets to varying degrees">
              <ttcol align="right">transport cc</ttcol>

              <ttcol align="center">RED_1 (packet mode drop)</ttcol>

              <ttcol align="center">RED_4 (linear byte mode drop)</ttcol>

              <ttcol align="center">RED_5 (square byte mode drop)</ttcol>

              <c>TCP or TFRC</c>

              <c>s/sqrt(p)</c>

              <c>sqrt(s/p)</c>

              <c>1/sqrt(p)</c>

              <c>TFRC-SP</c>

              <c>1/sqrt(p)</c>

              <c>1/sqrt(sp)</c>

              <c>1/(s.sqrt(p))</c>
            </texttable></t>

          <t><xref target="pktb_Tab_TFRC-SP"></xref> aims to summarise the
          positions we may now be in. Each column shows a different possible
          AQM behaviour 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 <xref
          target="RFC2581"></xref> and TFRC <xref target="RFC3448"></xref> on
          the top row with TFRC-SP <xref target="RFC4828"></xref> below.
          Suppressing all inessential details the table shows that
          independence from packet size should either be achievable by not
          altering the TCP transport in a RED_5 network, or using the small
          packet TFRC-SP transport 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 in which
          bit-rate would become far too biased towards small packets. Of
          course, if any form of byte-mode dropping RED has been deployed on
          some congested routers, each path will present a different hybrid
          scenario to its transport.</t>

          <t>Whatever, we can see that the linear byte-mode drop column in the
          middle considerably complicates the Internet. It's a half-way house
          that doesn't bias enough towards small packets even if one believes
          the network should be doing the biasing. We argue below that <spanx
          style="emph">all</spanx> network layer bias towards small packets
          should be turned off&mdash;if indeed any router vendors have
          implemented it&mdash;leaving packet size bias solely as the preserve
          of the transport layer (solely the leftmost, packet-mode drop
          column). </t>

          <t>A survey is being conducted of over a hundred vendors to assess
          how widely drop probability based on packet size has been
          implemented in RED. Prior to the survey, an individual approach to
          Cisco received confirmation that, having checked the codebase for
          each of the product ranges, Cisco has not implemented any
          discrimination based on packet size in any AQM algorithm in any of
          its products. Also an individual approach to Alcatel-Lucent drew a
          confirmation that it was very likely that none of their products
          contained RED code that implemented any packet-size bias. </t>

          <t>Turning to our more formal survey, about 10% of those surveyed
          have replied so far, giving a sample size of only about a dozen.
          They range across the large network equipment vendors at L3 &amp;
          L2, firewall vendors, wireless equipment vendors, as well as large
          software businesses with a small selection of networking products.
          So far all have confirmed that they have not implemented the variant
          of RED with drop dependent on packet size. Where reasons have been
          given, the extra complexity of packet bias code has been most
          prevalent, though one vendor had a more principled reason for
          avoiding it&mdash;similar to, but not the same as the argument of
          this document. We have established that Linux does not implement RED
          with packet size drop bias, although we have not investigated a
          wider range of open source code.</t>

          <t>It is RECOMMENDED that adjusting drop probability relative to
          packet size (byte-mode dropping) SHOULD NOT be used in router AQM
          algorithms and SHOULD be turned off wherever it has been deployed.
          Note that RED as a whole SHOULD NOT be turned off, as without it, a
          drop tail queue also biases against large packets. Also note that
          turning off byte-mode may alter the relative performance of
          applications using different packet sizes, so it would be advisable
          to establish the implications before turning it off.</t>

          <t>Instead we argue that only transports, not AQM in the network,
          SHOULD make allowance for the size of dropped or marked packets. If
          a transport protocol doesn't take account of packet size when
          controlling the rate of a flow, it SHOULD be corrected in that
          transport protocol. No matter how predominant a transport protocol
          is (even if it's TCP), trying to correct for its failings in the
          network layer creates a perverse incentive to break down all flows
          from all transports into tiny segments.</t>

          <!-- ToDo: Add DDoS vulnerability incl of drop tail -->
        </section>
      </section>
    </section>

    <!-- ================================================================ -->

    <section anchor="pktb_Issues" title="Outstanding Issues and Next Steps">
      <!-- ________________________________________________________________ -->

      <section anchor="pktb_Bit-World" title="Bit-congestible World">
        <t>For a connectionless network with only bit-congestible resources we
        believe the recommended position is now unarguably clear&mdash;that
        the network should not make allowance for packet sizes and the
        transport should. This leaves two outstanding issues: <list
            style="symbols">
            <t>How to handle any legacy of AQM with byte-mode drop already
            deployed;</t>

            <t>The need to start a programme to update transport congestion
            control protocol standards to take account of packet size.</t>
          </list></t>

        <t>The sample of returns from our vendor survey <xref
        target="pktb_Coding_Status_Summary"></xref> suggest that byte-mode
        packet drop seems not to be implemented at all let alone deployed, or
        if it is, it is likely to be very sparse. Therefore, we do not really
        need a migration strategy from nearly nothing to nothing.</t>

        <t>A programme of standards updates to take account of packet size in
        transport congestion control protocols has started with TFRC-SP <xref
        target="RFC4828"></xref>, while weighted TCPs implemented in the
        research community <xref target="MulTCP"></xref><xref
        target="WindowPropFair"></xref> could form the basis of a future
        change to TCP congestion control <xref target="RFC2581"></xref>
        itself.</t>
      </section>

      <!-- ________________________________________________________________ -->

      <section anchor="pktb_Bit-Pkt-World"
               title="Bit- &amp; Packet-congestible World">
        <t>Nonetheless, a connectionless network with both bit-congestible and
        packet-congestible resources is a different matter. If we believe we
        should allow for this possibility in the future, this space contains a
        truly open research issue.</t>

        <t>The idealised wire protocol coding described in <xref
        target="pktb_Ideal_Coding"></xref> requires at least two flags for
        congestion of bit-congestible and packet-congestible resources. This
        hides a fundamental problem&mdash;much more fundamental than whether
        we can magically create header space for yet another ECN flag in IPv4,
        or whether it would work while being deployed incrementally. A
        congestion notification protocol must survive a transition from low
        levels of congestion to high. Marking two states is feasible with
        explicit marking, but much harder if packets are dropped. Also, it
        will not always be cost-effective to implement AQM at every low level
        resource, so drop will often have to suffice. Distinguishing drop from
        delivery naturally provides just one congestion flag&mdash;it is hard
        to drop a packet in two ways that are distinguishable remotely. This
        is the same problem we have distinguishing wireless transmission
        losses from congestive losses.</t>

        <t>We should also note that, strictly, packet-congestible resources
        are actually cycle-congestible because load also depends on the
        complexity of each look-up and whether the pattern of arrivals is
        amenable to caching or not. Further, this 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.</t>

        <t>The problem of signalling packet processing congestion is not
        pressing, as most if not all Internet resources are designed to be
        bit-congestible before packet processing starts to congest. However,
        given the task is to reach consensus on generic router mechanisms that
        are necessary and sufficient to support the Internet's future
        congestion control requirements, we must not give this problem no
        thought at all, just because it is hard and currently
        hypothetical.</t>
      </section>
    </section>

    <!-- ================================================================ -->

    <section title="Security Considerations">
      <t>This draft recommends that routers do not bias drop probability
      towards small packets as this creates a perverse incentive for
      transports to break down their flows into tiny segments. <!-- ToDo: Add DDoS vulnerability incl of drop tail -->Of
      course, this still involves transports being trusted to adjust their
      rate to take account of the size of dropped or marked packets. But, in
      the current Internet architecture, transports are already trusted to act
      against their own interests by reducing their rate in response to
      congestion. Therefore at least this recommendation makes the problem no
      worse.</t>

      <t>Much more importantly though, the ability of networks to police the
      response of <spanx style="emph">any</spanx> transport to congestion
      depends on networks only doing packet-mode not byte-mode drop, as we
      will now try to explain.</t>

      <t>Byte-mode drop was originally proposed alongside a RED-based approach
      to policing unusually high rate TCP flows <xref target="pBox"></xref>
      that has spawned other similar approaches in the research community. The
      idea was to place this policing function at any potential bottleneck. It
      was crafted specifically around policing the bit-rate (not packet rate)
      of TCP or TCP-friendly flows, by using its knowledge of its own local
      MTU. If these bottleneck TCP policers were effective against cheating
      (which <xref target="Re-TCP"></xref> has shown they are not), they would
      end up embedding a TCP-fairness policy throughout the network layer.</t>

      <t><xref target="I-D.briscoe-tsvarea-fair"></xref> has recently shown
      that TCP fairness is an insufficient basis for judging fairness because
      (amongst other criticisms) it is instantaneous, myopically not taking
      account of which individuals have congested resources more over time. If
      fairness did take account of factors like duration, instantaneous flow
      rates would necessarily have to be very <spanx
      style="emph">unequal</spanx> to be fair. So if TCP-fairness were to be
      embedded throughout the network layer, it would prevent these highly
      unequal rate allocations that would be essential for improving
      fairness.</t>

      <t>So far, the argument goes that we will need transports that are not
      TCP-`fair' in order to be more truly fair. So far this is only an
      argument against bottleneck TCP-policers, not against byte-mode packet
      drop.</t>

      <t>The argument continues that, to be able to police a transport's
      response to congestion when fairness can only be judged over time and
      over all an individual's flows, the policer has to have an integrated
      view of all the congestion an individual (not just one flow) is causing
      due to all traffic entering the Internet from that individual.</t>

      <t>But with byte-mode drop, one marked packet is not necessarily
      equivalent to another unless you know the MTU that caused it to be
      marked. If congestion policing has to be located at an individual's
      attachment point to the Internet, it cannot know the MTU of each remote
      router that caused each mark. Therefore it cannot take an integrated
      approach to policing all the responses to congestion of all the
      transports of one individual. Therefore it cannot police any of the
      flows.</t>

      <t>That has been quite a specialised although strong argument against
      byte-mode drop. The security/incentive argument <spanx
      style="emph">for</spanx> packet-mode drop is similar.</t>

      <t>Firstly, confining RED to packet-mode drop would not preclude
      bottleneck policing approaches such as <xref target="pBox"></xref> as it
      seems likely they could work just as well by monitoring the volume of
      dropped bytes rather than packets.</t>

      <t>Secondly packet-mode drop naturally allows the congestion marking on
      packets to be globally meaningful without relying on information held
      elsewhere. Given this congestion marking has an economic interpretation,
      it can be used as part of a globally distributed incentive system to
      ensure the parties responsible for congestion can be made accountable
      for it.</t>

      <t>Such a system has recently been proposed based on a protocol called
      re-ECN <xref target="Re-TCP"></xref>. Re-ECN was designed to be robust
      to the self-interest of the different parties providing and using the
      Internet, based on this economic interpretation of congestion. Re-ECN
      policers are specifically designed to allow evolution of new congestion
      control protocols operating across multiple domains by confining
      policing to the extreme edges of the Internet.</t>

      <t>Because a marked packet is taken to mean all the bytes in the packet
      are congestion marked the re-ECN system remains robust against bits
      being re-divided into different size packets or across different size
      flows <xref target="I-D.briscoe-tsvarea-fair"></xref>. Therefore it
      works naturally with just simple packet-mode drop in RED.</t>

      <t>In summary, making drop probability depend on the size of the packets
      that bits happen to be divided into simply encourages the bits to be
      divided into smaller packets. Byte-mode drop would therefore
      irreversibly complicate any attempt to fix the Internet's incentive
      structures.</t>
    </section>

    <!-- ================================================================ -->

    <section anchor="pktb_Conclusions" title="Conclusions">
      <t>The strong conclusion is that AQM algorithms such as RED SHOULD NOT
      use byte-mode drop. More generally, the Internet's congestion
      notification protocols (drop and ECN) SHOULD take account of packet size
      when the notification is read by the transport layer, NOT when it is
      written by the network layer. This approach offers sufficient and
      correct congestion information for all known and future transport
      protocols and also ensures no perverse incentives are created that would
      encourage transports to use inappropriately small packet sizes.</t>

      <t>The alternative of deflating RED's drop probability for smaller
      packet sizes (byte-mode drop) has no enduring advantages. It is more
      complex and creates the perverse incentive to fragment segments into
      tiny pieces. <!-- ToDo: Add DDoS vulnerability incl of drop tail -->It
      was proposed as a way for the network layer to make allowance for an
      omission from the design of TCP, effectively reverse engineering the
      network layer to contrive to make TCPs with different packet sizes run
      at equal bit rates (rather than packet rates) under the same path
      conditions. We SHOULD NOT hack the network layer to fix a problem with
      certain transport protocols, even one as prevalent as TCP.</t>

      <t>So far, our survey of over 100 vendors across the industry has drawn
      responses from about 10%, none of whom have implemented the byte mode
      packet drop variant of RED. </t>

      <t>If a vendor has implemented byte-mode drop, and an operator has
      turned it on, it is strongly RECOMMENDED that it SHOULD be turned off.
      Note that RED as a whole SHOULD NOT be turned off, as without it, a drop
      tail queue also biases against large packets. Turning off byte-mode may
      alter the relative performance of applications using different packet
      sizes, so it would be advisable to establish the implications before
      turning it off.</t>

      <t>Instead, the IETF transport area should continue its programme of
      updating congestion control protocols to take account of packet
      size.</t>

      <t>NOTE WELL that RED's byte-mode queue measurement is fine, being
      completely orthogonal to byte-mode drop. If a RED implementation has a
      byte-mode but does not specify what sort of byte-mode, it is most
      probably byte-mode queue measurement, which is fine. However, if in
      doubt, the vendor should be consulted.</t>

      <t>The above conclusions cater for the Internet as it is today with
      most, if not all, resources being primarily bit-congestible. A secondary
      conclusion of this memo is that we may see more packet-congestible
      resources in the future, so research may be needed to extend the
      Internet's congestion notification (drop or ECN) so that it can handle a
      mix of bit-congestible and packet-congestible resources.</t>
    </section>

    <!-- ================================================================ -->

    <section anchor="pktb_Acknowledgements" title="Acknowledgements">
      <t>Sally Floyd and Arnaud Jacquet gave very useful review comments.
      Bruce Davie and his colleagues provided a timely and efficient survey of
      RED implementation in Cisco's product range. Toby Moncaster, Will
      Dormann, John Regnault, Simon Carter and Stefaan De Cnodder further
      helped survey the current status of RED implementation and
      deployment.</t>
    </section>

    <!-- ================================================================ -->

    <section anchor="pktb_Comments_Solicited" title="Comments Solicited">
      <t>Comments and questions are encouraged and very welcome. They can be
      addressed to the IETF Transport Area working group mailing list
      &lt;tsvwg@ietf.org&gt;, and/or to the authors.</t>
    </section>
  </middle>

  <back>
    <!-- ================================================================ -->

    <section anchor="pktb_Scenarios" title="Example Scenarios">
      <!-- ________________________________________________________________ -->

      <section anchor="pktb_Notation" title="Notation">
        <t>To prove the two sets of assertions in the idealised wire protocol
        (<xref target="pktb_Ideal_Coding" />) are true, we will compare two
        flows with different packet sizes, s_1 and s_2 [bit/pkt], to make sure
        their transports each see the correct congestion notification.
        Initially, within each flow we will take all packets as having equal
        sizes, but later we will generalise to flows within which packet sizes
        vary. A flow's bit rate, x [bit/s], is related to its packet rate, u
        [pkt/s], by <list style="empty">
            <t>x(t) = s.u(t).</t>
          </list></t>

        <t>We will consider a 2x2 matrix of four scenarios:</t>

        <?rfc needLines="6" ?>

        <texttable anchor="pktb_Tab_Scenarios">
          <ttcol align="right">resource type and congestion level</ttcol>

          <ttcol align="center">A) Equal bit rates</ttcol>

          <ttcol align="center">B) Equal pkt rates</ttcol>

          <c>i) bit-congestible, p_b</c>

          <c>(Ai)</c>

          <c>(Bi)</c>

          <c>ii) pkt-congestible, p_p</c>

          <c>(Aii)</c>

          <c>(Bii)</c>
        </texttable>
      </section>

      <!-- ________________________________________________________________ -->

      <section anchor="pktb_Ai"
               title="Bit-congestible resource, equal bit rates (Ai)">
        <t>Starting with the bit-congestible scenario, for two flows to
        maintain equal bit rates (Ai) the ratio of the packet rates must be
        the inverse of the ratio of packet sizes: u_2/u_1 = s_1/s_2. So, for
        instance, a flow of 60B packets would have to send 25x more packets to
        achieve the same bit rate as a flow of 1500B packets. If a congested
        resource marks proportion p_b of packets irrespective of size, the
        ratio of marked packets received by each transport will still be the
        same as the ratio of their packet rates, p_b.u_2/p_b.u_1 = s_1/s_2. So
        of the 25x more 60B packets sent, 25x more will be marked than in the
        1500B packet flow, but 25x more won't be marked too.</t>

        <t>In this scenario, the resource is bit-congestible, so it always
        uses the bit-congestion field when it marks packets. Therefore the
        transport should count marked bytes not packets. But it doesn't
        actually matter. The ratio of marked to unmarked bytes seen by each
        flow will be p_b, as will the ratio of marked to unmarked packets.
        Because they are ratios (as used by TCP), the units cancel out.</t>

        <t>If a flow sent an inconsistent mixture of packet sizes, we have
        said it should count the ratio of marked and unmarked bytes not
        packets in order to correctly decode the level of congestion. But
        actually, if all it is trying to do is decode p_b, it still doesn't
        matter. For instance, imagine the two equal bit rate flows were
        actually one flow at twice the bit rate sending a mixture of one 1500B
        packet for every thirty 60B packets. 25x more small packets will be
        marked and 25x more will be unmarked. The transport can still
        calculate p_b whether it uses bytes or packets for the ratio. In
        general, for any algorithm which works on a ratio of marks to
        non-marks, either bytes or packets can be counted interchangeably,
        because the choice cancels out in the ratio calculation.</t>

        <t>However, where the absolute rather than relative volume of
        congestion caused is important, as it is for cost-fairness <xref
        target="I-D.briscoe-tsvarea-fair" />, the transport must count marked
        bytes not packets, in this bit-congestible case. Aside from the goal
        of cost-fairness, this is how the bit rate of a transport can be made
        independent of packet size; by ensuring the rate of congestion caused
        is kept to a constant weight <xref target="WindowPropFair" />, rather
        than merely responding to the ratio of marked and unmarked bytes.</t>

        <t>Note the unit of byte-congestion volume is the byte.</t>
      </section>

      <!-- ________________________________________________________________ -->

      <section anchor="pktb_Bi"
               title="Bit-congestible resource, equal packet rates (Bi)">
        <t>If two flows send different packet sizes but at the same packet
        rate, their bit rates will be in the same ratio as their packet sizes,
        x_2/x_1 = s_2/s_1. For instance, a flow sending 1500B packets at the
        same packet rate as another sending 60B packets will be sending at 25x
        greater bit rate. In this case, if a congested resource marks
        proportion p_b of packets irrespective of size, the ratio of packets
        received with the byte-congestion field marked by each transport will
        be the same, p_b.u_2/p_b.u_1 = 1.</t>

        <t>Because the byte-congestion field is marked, the transport should
        count marked bytes not packets. But because each flow sends
        consistently sized packets it still doesn't matter. The ratio of
        marked to unmarked bytes seen by each flow will be p_b, as will the
        ratio of marked to unmarked packets. Therefore, if the congestion
        control algorithm is only concerned with the ratio of marked to
        unmarked packets (as is TCP), both flows will be able to decode p_b
        correctly whether they count packets or bytes.</t>

        <t>But if the absolute volume of congestion is important, as it is to
        achieve cost-fairness, the transport must count marked bytes not
        packets. Then the lower bit rate flow using smaller packets will
        rightly be perceived as causing less byte-congestion even though its
        packet rate is the same.</t>

        <t>If the two flows are mixed into one, of bit rate x1+x2, with equal
        packet rates of each size packet, the ratio p_b will still be
        measurable by counting the ratio of marked to unmarked bytes (or
        packets because the ratio cancels out the units). However, if the
        absolute volume of congestion is required, the transport must count
        the sum of congestion marked bytes, which indeed gives a correct
        measure of the rate of byte-congestion p_b(x_1 + x_2) caused by the
        combined bit rate.</t>
      </section>

      <!-- ________________________________________________________________ -->

      <section anchor="pktb_Aii"
               title="Pkt-congestible resource, equal bit rates (Aii)">
        <t>Moving to the case of packet-congestible resources, we now take two
        flows that send different packet sizes at the same bit rate, but this
        time the pkt-congestion field is marked by the resource with
        probability p_p. As in scenario Ai with the same bit rates but a
        bit-congestible resource, the flow with smaller packets will have a
        higher packet rate, so more packets will be both marked and unmarked,
        but in the same proportion.</t>

        <t>This time, the transport should only count marks without taking
        into account packet sizes. Transports will get the same result, p_p,
        by decoding the ratio of marked to unmarked packets in either
        flow.</t>

        <t>If one flow imitates the two flows but merged together, the bit
        rate will double with more small packets than large. The ratio of
        marked to unmarked packets will still be p_p. But if the absolute
        volume of pkt-congestion marked packets is counted it will accumulate
        at the combined packet rate times the marking probability,
        p_p(u_1+u_2), 26x faster than packet congestion accumulates in the
        single 1500B packet flow of our example, as required.</t>

        <t>But if the transport is interested in the absolute volume of packet
        congestion, it should just count how many marked packets arrive. For
        instance, a flow sending 60B packets will see 25x more marked packets
        than one sending 1500B packets at the same bit rate, because it is
        sending more packets through a packet-congestible resource.</t>

        <t>Note the unit of packet congestion is packets.</t>
      </section>

      <!-- ________________________________________________________________ -->

      <section anchor="pktb_Bii"
               title="Pkt-congestible resource, equal packet rates (Bii)">
        <t>Finally, if two flows with the same packet rate, pass through a
        packet-congestible resource, they will both suffer the same proportion
        of marking, p_p, irrespective of their packet sizes. On detecting that
        the pkt-congestion field is marked, the transport should count
        packets, and it will be able to extract the ratio p_p of marked to
        unmarked packets from both flows, irrespective of packet sizes.</t>

        <t>Even if the transport is monitoring the absolute amount of packets
        congestion over a period, still it will see the same amount of packet
        congestion from either flow.</t>

        <t>And if the two equal packet rates of different size packets are
        mixed together in one flow, the packet rate will double, so the
        absolute volume of packet-congestion will accumulate at twice the rate
        of either flow, 2p_p.u_1 = p_p(u_1+u_2).</t>
      </section>
    </section>

    <!-- ================================================================ -->

    <references title="Normative References">
      <?rfc include="reference.RFC.2119" ?>

      <?rfc include="reference.RFC.2309" ?>

      <?rfc include="reference.RFC.2581" ?>

      <?rfc include="reference.RFC.3168" ?>

      <?rfc include="reference.RFC.3426" ?>

      <?rfc include="reference.RFC.3448" ?>

      <?rfc include='reference.RFC.4828'?>
    </references>

    <references title="Informative References">
      <?rfc include="localref.Floyd93.RED" ?>

      <?rfc include="localref.Floyd97.REDPktByteEmail" ?>

      <?rfc include="localref.Floyd99.Penalty_box" ?>

      <?rfc include="localref.Crowcroft98.MulTCP" ?>

      <?rfc include="localref.Gibbens99.Evol_cc" ?>

      <?rfc include="localref.Elloumi00.REDbyte" ?>

      <?rfc include="localref.Vasallo00.PktSizeEquCC" ?>

      <?rfc include="localref.Siris02a.Window_ECN" ?>

      <?rfc include="localref.Siris02.RscCtrlCDMA" ?>

      <?rfc include="reference.RFC.3714" ?>

      <?rfc include="localref.Eddy03.REDbias" ?>

      <?rfc include="localref.Widmer04.CCvarPktSize" ?>

      <?rfc include="localref.I-D.briscoe-tsvwg-re-ecn-tcp" ?>

      <?rfc include="localref.I-D.briscoe-tsvwg-cl-phb" ?>

      <?rfc include="reference.I-D.briscoe-tsvarea-fair" ?>

      <?rfc include="reference.I-D.ietf-tcpm-rfc2581bis" ?>

      <?rfc include="reference.I-D.falk-xcp-spec" ?>

      <?rfc include="reference.RFC.4782" ?>

      <?rfc include="localref.IESG.PCN_charter" ?>
    </references>
  </back>
</rfc>