<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
     There has to be one entity for each item to be referenced. 
     An alternate method (rfc include) is described in the references. -->

<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2629 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2629.xml">
<!ENTITY RFC3552 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3552.xml">
<!ENTITY I-D.narten-iana-considerations-rfc2434bis SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.narten-iana-considerations-rfc2434bis.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="info" docName="draft-ksubram-lmap-router-buffer-sizes-01" ipr="noModificationTrust200902">
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN" 
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <front>
    <!-- The abbreviated title is used in the page header - it is only necessary if the 
         full title is longer than 39 characters -->

    <title abbrev="Router Buffer Sizes in the WAN">Router Buffer Sizes In The WAN</title>

    <!-- add 'role="editor"' below for the editors if appropriate -->

    <!-- Another author who claims to be an editor -->

    <author fullname="Kamala Subramaniam" initials="K.S." role="editor"
            surname="Subramaniam">
      <organization>Microsoft</organization>

      <address>
        <postal>
          <street></street>

          <!-- Reorder these if your country does things differently -->

          <city>Mountain View</city>

          <region>CA</region>

          <code>94043</code>

          <country>US</country>
        </postal>

        <email>kasubra@microsoft.com</email>

        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>
	<author fullname="Darren Loher" initials="D.L." 
            surname="Loher">
      <organization>Microsoft</organization>

      <address>
        <postal>
          <street></street>

          <!-- Reorder these if your country does things differently -->

          <city>Redmond</city>

          <region>WA</region>

          <code>98052</code>

          <country>US</country>
        </postal>

        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

    <date month="July" year="2015" />

    <!-- If the month and year are both specified and are the current ones, xml2rfc will fill 
         in the current day for you. If only the current year is specified, xml2rfc will fill 
	 in the current day and month for you. If the year is not the current one, it is 
	 necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the 
	 purpose of calculating the expiry date).  With drafts it is normally sufficient to 
	 specify just the year. -->

    <!-- Meta-data Declarations -->

    <area>General</area>

    <workgroup>Internet Engineering Task Force</workgroup>

    <!-- WG name at the upperleft corner of the doc,
         IETF is fine for individual submissions.  
	 If this element is not present, the default is "Network Working Group",
         which is used by the RFC Editor as a nod to the history of the IETF. -->

    <keyword>template</keyword>

    <!-- Keywords will be incorporated into HTML output
         files in a meta tag but they have no effect on text or nroff
         output. If you submit your draft to the RFC Editor, the
         keywords will be used for the search engine. -->

    <abstract>
      	<t>
		This draft identifies the set of data that needs to be collected, and analyzed to quantify router
		buffer sizes used in routers in the Wide Area Network (WAN). The scope of this draft is limited to 
		WAN links that have link latencies of 40 to 150 milliseconds. 
	</t>
	<t>
   		Reducing router buffer sizes has many advantages, the most important being cost. However, 
   		there is not much data available today to effectively calculate this. This draft details use cases 
		for the study, and lists data that needs to be taken into consideration to be able to quantify the 
		size of router buffers. The details of the individual measurement metrics 
		are beyond the scope of this document. Neither does the draft identify methods to gather
		the data. What it identifies is a need to be able to collect, and report this empirical data in a 
		readable fashion thus providing the ability to study and compare data in a more standardized method.		
	</t>
	</abstract>

  </front>

  <middle>
    <section title="Introduction">
	<t> 
	"How much buffering do core links need?" is a question that has been under study for a while. The question boils 
	down to quantify buffer sizes and yet achieve 100% utilization on links with maximum throughput at a feasible cost.
	</t>
	<t>
	Buffer design could substantially increase costs. While over-buffering seems intuitive it can complicate the design of high speed routers, 
	lead to higher power consumption, more board space, and lower density. It can actually increase end-to-end delay 
	in the presence of congestion. This can make congestion more persistent. Additionally, there is always a tradeoff
	between buffer sizes and the capacity of a router.
	</t>
	<t>
	On the other hand, under-buffering while doing away from the above cons of over-buffering could lead us away from our primary goal 
	of 100 percent link utilization. This could happen in a scenario using a simple Additive Increase Multiplicative Decrease (AIMD) 
	for TCP flows when the sender has packets to send but the window size advertised is less and as a result the receiver consumes far 
	less that it could.
	</t>
	<t>The rule of thumb for router buffers has been defined as <xref target="Villamizar"/> : B = RTT*C. 
	Where B, was the buffer size, RTT the Round Trip Time, and C the capacity of the bottleneck link. <xref target="RFC3429"/>  also talks 
	about the buffer size being at least one TCP window size. 
	</t>
	<t>
	However later studies <xref target="Appenzeller"/>, show that the rule of thumb works either for a single flow or 
	a perfectly synchronized large number of flows. Further they postulate that the buffer size is actually (2RTT * C)/sqrt(n), 
	where n is the number of flows. This indicates a significant reduction in the buffer chip promoting lower costs. 
	</t>
	<t> As seen, there have been proponents for large buffers and small. However, most of these studies 
	are based on theoretical models and simulations. Today, there is no model or protocol to mine big data from a providers 
	network to be able to answer this question efficiently. The nature of WAN traffic can be uncertain and varying. Furthermore the traffic could vastly 
	vary between individual ISPs. 
	This document implored the need for a model of mining empirical big data in a providers network to be able to build a network that drives down the $/GB and at the same time 
	maximizing link utilization.</t>
	<t>This document outlines use cases for the study of router buffer sizes in the WAN and identifies the data that needs to be collected and analyzed.
	It could be further extended to the edge and datacenters, but it is outside the scope of this draft.
	</t>
    </section>


      <section title="Terminology">
        <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">RFC 2119</xref>.</t>
      </section>

	<section anchor="use_case" title="Use Case">
	<t>
	From an operator's perspective it is imperative to monitor discards and link utilization over WAN links to be able to study the router buffer sizes. But these alone
	will be unable to provide an operator with enough information as to why the discards happened. The two use cases outlined here argue that more data needs to
	be collected, reported, and analyzed. 
	</t>
		<section title="Discards with small buffer sizes">
		<t>
		Trans-pacific and trans-atlantic links of latencies in the range of 150 ms and 90 ms respectively, with low link utilization of 30 percent, 
		and small buffers have seen dropped packets. The most intuitive method has been to increase the buffer sizes for these links on noticing packet discards.
		While this might alleviate the issue temporarily, unless the right problem has been identified this could readily lead to buffer bloat which has many issues on its own.
		</t>
		</section>
		
		<section title="Discards with large buffer sizes">
		<t>
		Operators have also observed dropped packets on WAN links within North America with as large buffers as 125 MB per port with link utilizations of 60%. If this happens
		even if the router has not been specifically configured to drop certain type of packets, or there are no routing misconfigurations, then clearly
		the issue here is not the size of the router buffer.
		</t>
		</section>
	</section>

<section anchor="data_list" title="List of required data for study of router buffer sizes">
<t>
This section talks about the absolute minimum requirements of the type of data that needs to be collected to be
able to effectively quantify router buffer size. 
</t>
<texttable anchor="data_list_table" title="List of required data for Router Buffer Sizes">
    <ttcol align='center'></ttcol>
    <ttcol align='center'>Data</ttcol>
    <ttcol align='center'>Details</ttcol>
    <c>1</c>
    <c>Number of concurrent flows, N</c>
    <c>For aggregate traffic</c>
    <c>2</c>
    <c>Length of the flow, L</c>
    <c>[Flow start time - flow end time]</c>
    <c>3</c>
    <c>Packet Discards, P</c>
    <c>Per Interface</c>
    <c>4</c>
    <c>Reason for Packet Discards, R</c>
    <c>Buffer overflow, configuration, etc.</c>
    <c>5</c>
    <c>Resolution of Time Interval, T</c>
    <c>[Flow start time - flow end time]</c>
    <c>6</c>
    <c>5 tuple flow identity, I</c>
    <c> Src IP, Dest IP, Src port, Dest Port, Protocol.</c>
</texttable>

<t>
A service provider needs to take into consideration several attributes to determine the right buffer size for its WAN routers.
This section enlists the details as to why the five above have been identified as the minimum essential data needed to aid
the study of router buffer sizes.
</t>

<section title="Number of concurrent flows, N">
	<t>
	Studies <xref target="Feldmann"/>  and <xref target="Stevens"/> show that 95% of 
	flows in the internet today are attributed to TCP <xref target="Postel"/> flows.
	The nature of these flows can vary significantly not only with various time 
	periods, but also between providers. Flows that spend most of their time in slow-start
	require significantly less buffering than flows that live mostly in congestion avoidance.
	Due to this it is important to identify the type of concurrent flows that can live on a WAN link.
	</t>
	<t> Short (non-persistent) flows are those that live for less than one RTT, 
	and large (persistent) flows are those
	whose lifetime is larger that one RTT with congestion overhead. Internet measurements
	<xref target="Avra"/> show that while a smaller number of large flows contribute to 
	maximum packet transfer, short flows dominate most TCP sessions and large flows are 
	known to have a larger effect on buffer sizes. These combination flows could in turn 
	have an effect on Round Trip Time (RTT), loss probability and flow lengths. The ability 
	to detect large flows is necessary because while the flows can be constant in
	steady state, the aggregate traffic can keep changing due to various arrival and departure rates. 
	There needs to be a way for the number of concurrent flows to be collected and analyzed 
	with the granularity of the lifetime of short flows, as low as one millisecond.		
	</t>
</section>

<section title="Length of a flow, L">
	<t>
	Length of a flow can be defined as its duration: [flow stop time - flow start time], or the number of packets/bytes
	sent in this time duration. Identifying the length of flow in a provider's network will give information of the mix
	of short and large flows that are present in the WAN. This will lead to
	modeling implications in TCP flow control. 	
	</t>
</section>
<section title="Packet Discards, D">
	<t>
	Number of packet discards per interface is probably the most important metric. Of this the number of outward (WAN)
	facing interface discards would be more intuitive to the study of buffer sizes. Interface discards can be referred 
	to in <xref target="RFC2893"/>	
	</t>
</section>
<section title="Reason for Packet Discards, R">
	<t>
	There can be several reasons for packet discards especially when it is observed on less utilized links. Some of them
	could be due to routing misconfigurations, or designed to drop certain packets due to configurations. Clearly
	stating a reason as insufficient buffer will help narrow down the data required. This is especially true in the case
	of smart buffer allocations when some ports run out of buffers but not others. We could observe that a port has
	been allocated only, say, 30 percent of the available total buffer space but is experiencing the highest utilization
	and as a result of that is seeing packet drops pointing to the fact that dynamic buffers' smart allocations scheme
	is not adaptive and predictive to the nature of the WAN traffic.	</t>
</section>
<section title="Resolution of time interval, T">
	<t>
	The time interval should be granular such that it captures not only the number of concurrent flows in steady state
	but also the aggregate traffic over the lifetime of a short flow. It should also be able to correlate the 
	discards per interface to the number of concurrent flows. 
	</t>
	<t>
	Today via IPFIX we can calculate the number of concurrent flows. Via Sflow counters or flows, we can calculate 
	the discards. Using counters requires upto two times the granularity set for any changes to be visible due to 
	Nyquist rate. Reducing the counter export interval would increase the responsiveness, but at the cost of increased 
	overhead and reduced scalability. On the other hand, packet sampling automatically allocates monitoring resources 
	to busy links, providing a highly scaleable way to quickly detect traffic flows wherever they occur in the network.
	Responsiveness is important for a more stable control.	
	</t>
</section>
<section title="5 Tuple Flow Identity, I">
	<t>
	5 tuple flows have a source IP, destination IP, source port, destination port, and protocol to identify endpoints 
	for unidirectional flows. Having this functionality gives the network operator a way to identify the offending flows,
	legitimate elephant flows, and high priority flows which may happen at certain periods during the
	day. Being able to separate traffic using the 5 tuple, further increases the strength of the sample set of empirical
	data available for the study of router buffer sizes.
	</t>
	<t>
		
	</t>
</section>
</section>

<section anchor="codeExample"
             title="XML Representation of an Information Model for Calculating Router Buffer Sizes">
      <figure>
        <preamble>The below is an example information model representing the data that needs to be measured in order to
		  make buffer size estimations easier. The methods/algorithms to determine this date is out of the scope of
		  draft.</preamble>

        <artwork><![CDATA[

<?xml version="1.0" encoding="utf-8" ?>
<Router_Buffer_Schema>
  <Router>
    <!-- READ_ONLY -->
    <IPV4Address></IPV4Address>
    <Interface>
      <InterfaceID></InterfaceID>
      <InterfaceDirection></InterfaceDirection>
      <Capacity></Capacity>
      <FlowInformation>
        <NumConFlows></NumConFlows>
        <LengthOfFlow></LengthOfFlow>
        <SamplingRate></SamplingRate>
        <FiveTupleFlowInfo>
          <IPProtocol></IPProtocol>
          <SrcIPAddress></SrcIPAddress>
          <DestIPAddress></DestIPAddress>
          <SrcPort></SrcPort>
          <DestPort></DestPort>
        </FiveTupleFlowInfo>
        <FlowEndReason>
          <IdleTimeout></IdleTimeout>
          <ForcedTimeout></ForcedTimeout>
          <LackOfResources></LackOfResources>
          <ForcedEnd></ForcedEnd>
          <EndOfFlowDetected></EndOfFlowDetected>
        </FlowEndReason>
      </FlowInformation>
      <PacketDiscards>
        <EgressIfDiscard></EgressIfDiscard>
        <IngressIfDiscard></IngressIfDiscard>
        <ReasonPacketDiscards>
          <BufferOverrun></BufferOverrun>
          <RouterMisConfig></RouterMisConfig>
          <NetworkCongestion></NetworkCongestion>
        </ReasonPacketDiscards>
        <SamplPcktDiscRate></SamplPcktDiscRate>
        <PktDiscardHistogram></PktDiscardHistogram>
      </PacketDiscards>
      <LinkUtil></LinkUtil>
      <RoundTripTime></RoundTripTime>
      <!-- READ_WRITE -->
      <EnableRtrBuffCal></EnableRtrBuffCal>
      <BufferSize>
        <Percentage></Percentage>
        <Latency></Latency>
        <SizeInBytes>
          <BytesTotal></BytesTotal>
          <BytesUsed></BytesUsed>
          <BytesAvail></BytesAvail>
        </SizeInBytes>
        <HistogramSamplingRate></HistogramSamplingRate>
        <BufferSizeHistogram></BufferSizeHistogram>
      </BufferSize>
    </Interface>
  </Router>
</Router_Buffer_Schema>

            ]]></artwork>
      </figure>
    </section>
	
   <section anchor="conclusion" title="Conclusion">
	<t>We see that there are numerous issues at different layers that have an effect (directly or indirectly) on the 
	sizing of router buffers. We also notice that there is no study that takes empirical data into consideration. Ideally, 
	what would be required is an all knowing oracle that sees the traffic flow on an end-to-end network across all layers. 
	Due to a lack of the resource, the first step to the study of router buffer sizes is to effectively mine 
	the big data repository of a provider for the data identified in this draft.
	</t>
</section>

 <section anchor="Acknowledgements" title="Acknowledgements">
      <t></t>
    </section>
 
    <!-- Possibly a 'Contributors' section ... -->

    <section anchor="IANA" title="IANA Considerations">
      <t>This memo includes no request to IANA.</t>

      <t>All drafts are required to have an IANA considerations section (see
      <xref target="I-D.narten-iana-considerations-rfc2434bis">the update of
      RFC 2434</xref> for a guide). If the draft does not require IANA to do
      anything, the section contains an explicit statement that this is the
      case (as above). If there are no requirements for IANA, the section will
      be removed during conversion into an RFC by the RFC Editor.</t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>This document does not introduce new security issues.
	</t>
    </section>

    
  </middle>
  <!--  *****BACK MATTER ***** -->

  <back>
    <!-- References split into informative and normative -->

    <!-- There are 2 ways to insert reference entries from the citation libraries:
     1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
     2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
        (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

     Both are cited textually in the same manner: by using xref elements.
     If you use the PI option, xml2rfc will, by default, try to find included files in the same
     directory as the including file. You can also define the XML_LIBRARY environment variable
     with a value containing a set of directories to search.  These can be either in the local
     filing system or remote ones accessed by http (http://domain/dir/... ).-->

	<references title="Normative References">
      <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->
      &RFC2119;
	    </references>


    <references title="Informative References">

      <!-- A reference written by by an organization not a person. -->

	&I-D.narten-iana-considerations-rfc2434bis;

	<reference anchor="Feldmann"
                 target="IEEE/ACM Trans. Networking, vol. 6, pp. 673-685">
        <front>
          <title>Efficient policies for carrying Web traffic over flow-switched networks</title>

          <author>
            <organization>A. Feldmann, J. Rexford, and R. Caceres</organization>
          </author>

          <date year="Dec. 1998" />
        </front>
      </reference>

	<reference anchor="RFC2893"
                 target="RFC 2893">
        <front>
          <title>The Interfaces Group MIB</title>

          <author>
            <organization>K. McCloghrie, F. Kastenholz</organization>
          </author>

          <date year="Jun. 2000" />
        </front>
      </reference>	

	<reference anchor="Postel"
                 target="RFC 793">
        <front>
          <title>Transmission Control Protocol </title>

          <author>
            <organization>J. Postel</organization>
          </author>

          <date year="Sep. 1981" />
        </front>
      </reference>

	<reference anchor="Villamizar"
                 target="ACM Computer Communications Review, 24(5):45-60">
        <front>
          <title>High performance tcp in ansnet </title>

          <author>
            <organization>C. Villamizar and C. Song</organization>
          </author>

          <date year="1994" />
        </front>
      </reference>

	<reference anchor="RFC3429"
                 target="RFC 3429">
        <front>
          <title>Some Internet Architectural Guidelines and Philosophy </title>

          <author>
            <organization>R. Bush and D. Meyer</organization>
          </author>

          <date year="Dec. 2002" />
        </front>
      </reference>
	
	
	<reference anchor="Appenzeller"
                 target="SIGCOMM '04 Proceedings of the 2004 conference on Applications, technologies, architectures, and protocols for computer communications">
        <front>
          <title>Some Internet Architectural Guidelines and Philosophy </title>

          <author>
            <organization>G. Appenzeller, I. Klesassy, and N. McKeown </organization>
          </author>

          <date year="2004" />
        </front>
      </reference>

	<reference anchor="Stevens"
                 target="TCP/IP Illustrated. Reading, MA: Addison-Wesley, vol. 1">
        <front>
          <title>Transmission Control Protocol</title>

          <author>
            <organization>W. R. Stevens</organization>
          </author>

          <date year="1994" />
        </front>
      </reference>

	<reference anchor="Avra"
                 target="IEEE INFOCOMM">
        <front>
          <title>Differentiation Between Short and Long TCP Flows:
		Predictability of the Response Time</title>

          <author>
		
            <organization>Konstantin Avrachenkov, INRIA Sophia Antipolis</organization>
          </author>

          <date year="2004" />
        </front>
      </reference>

</references>
    <section anchor="app-additional" title="Additional Stuff">
      <t>This becomes an Appendix.</t>
    </section>

    <!-- Change Log

v00 2006-03-15  EBD   Initial version
 -->
  </back>
</rfc>

