Core-Stateless Fair Queueing: Achieving Approximately Fair Bandwidth Allocations in High Speed Networks Scott shenker Hui Zhang CMU Xerox PARC CMU shenker@parc.xerox.com hehang@cs. cmu. edu Abstract some maintain that fair bandwidth allocation plays a ne essary, not just beneficial, role in congestion control [7, 19] Router mechanisms designed to achieve fair bandwidth al Until now, fair allocations were typically achieved by us- locations, like Fair Qucucing, have many desirable proper- ing per-flow queueing mechanisins- such as Fair Queueing ties for congestion control in the Internet. However, such [7, 18]and its many variants[2, 10, 20-or per-flow dropping mechanisms usually need to maintain state, manage buffers and /or perform packet scheduling on a per flow basis, and These mechanisms are more complex to implement than ti this complexity may prevent them from being cost-effectively ditional FiFo queueing with drop-tail, which is the most plemented and widely deployed. In this paper, we pro widely implemented and deployed mechanism in routers to- pose an architecture that significantly reduces this imple- day. In particular, fair allocation mechanisms inherently mentation complexity yet still achieves approximately fair require the routers to maint. ain state and perform opera- nd of routers- that is, a contiguous region of the net- router, the routers needs to classify the packet into a fo work- and we distinguish between edge routers and core pdate per Hlow state varables, and perform certain opera routers. Edge routers maintain per flow state; they estimate tions based on the per How state. The operations can be as he incoming rate of each fow and insert, a label into each simple as deciding whether to drop or queue the packet(e.g packet header based on this estimate. Core routers main FRED), or as complex as manipulation of priority queues tain no per flow state; they use FiFO packet scheduling aug- (e.g, Fair Queueing). While a number of techniques have nted by a probabilistic dropping algorithm that uses the been proposed to reduce the complexity of the per packet packet labels and an estimate of the aggregate traffic at the operations [1, 20, 21], and commercial implementations are router, We call the scheme Core-Stateless Fair Queueing. availablc in somc intcrmcdiatc class routers, it is still un We present simulations and analysis on the performance clear whether these algorithms can be cost-effectively impl this approach, and discuss an alternate approac mented in high-speed backbone routers because all these al 1 Introduction In this paper we start with the assumption that(1) fair A central tenet of the internet architecture is that conges- allocation mechanisms play an important, perhaps even ne on control is achieved mainly through end-host algorit hms essary, role in congestion control, and(2) the complexity However, starting with Nagle [16], many researchers ob- of existing fair allocation mechanisms is a substantial h erved that such end-to-end congestion control solutions are drance to their adoption. Both of these points are debat- reatly improved when routers have mechanisms that allo able; developments in router technology may make such al cate band width in a fair manner. Fair bandwidth allocation gorithms rather inexpensive to implement, and there may protects well-behaved Flows from ill-behaved ones, and al- be solutions to congestion control that do not require fair lows a diverse set of end-to-end congestion control policies allocation (we discuss this point more fully in Section 4) to co-exist in the network 7 As we discuss in Section 4 By usin two assumptions as our startin are not claiming hat Lhey ure Lrue, but rather alt unly This research was sponsored by DARPA under contract 6600196C8528,E30602972-0287, and DABT6394C0 looking at the implications if indeed they were true. If one ity problem in achieving fair allocation becomes a vitally policies, either expressed or implied, of DARPA, NSF, Inte To this end, we propose and an architecture anld Sun, or the U.S. government. set of algorithms that alloca width in an mately fai hile allowing digital or hard copies of all or port of this work for links to use FiFo queueing and maintain no per-flow state candidate for fairn s prior specifc permission and/ or a fee d,moreover, can be implemented with only tocal infornation 1998AcM158113003-1/80o08..5.00
Core-St at eless Fair Queueing: Achieving Approximately Fair Bandwidth Allocations in High Speed Networks* Ion Stoica Scott Shenker CMlJ Xerox PARC istoicaQcs.cmu.edu shenker@parc.xerox.com Hui Zhang CMlJ hzhang@cs.cmu.edu Abstract Router mechanisms designed to achieve fair bandwidth allocations, like Fair Queueing, have many desirable properties for congestion control in the Internet. However, such mechanisms usually need to maintain state, manage buffers, and/or perform packet scheduling on a per flow basis, and this complexity may prevent them from being cost-effectively implemented and widely deployed. In this paper, we propose an architecture that significantly reduces this implementation complexity yet st,ill achieves approximately fair bandwidth allocations. We apply this approach to an island of routers - that is, a contiguous region of the network and we distinguish between edge routers and core routers. Edge routers maintain per flow state; they estimate the incoming rate of each flow and insert a label into each packet header based on this estimate. Core routers maintain no per flow state; they use FIFO packet scheduling augmented by a probabilistic dropping algorithm that uses the packet labels and an estimate of the aggregate traffic at the router. We call the scheme Core-Stateless Fair Queueing. We present simulations and analysis on the performance of this approach, and discuss an alternate approach. 1 Introduction A central tenet of the Internet architecture is that congestion control is achieved mainly through end-host algorithms. However, starting with Nagle [16], many researchers observed that such end-to-end congestion control solutions are greatly improved when routers have mechanisms that allocate bandwidth in a fair manner, Fair bandwidth allocation protects well-behaved flows from ill-behaved ones, and allows a diverse set of end-to-end congestion control policies Lo co-exist in the network [7]. As we discuss in Section 4, * I’hls research was sponsored by DARPA under contract numbers N66001-96-C-8528, E30602-97-Z-0287, and DABT63-94-C-0073, and by a NSF Carerr Award under grant number NCR-9624979. Additlonal support was provided by Intel Corp., MCI, and Sun Microsysterns. Views and conclusions contained in this document are those of the authors and should no be interpreted as representing the official poliries, either expressed or implied, of DARPA, NSF, Intel, MCI, Sun, or the U.S. government Q ,998 ACM l-58113~003.l/98/0008.. $5.00 sorne maintain that fair bandwidth allocation’ plays a ueressary, not just beneficial, role in congestion control [7, 191. Until now, fair allocations were typically achieved by using per-flow queueing mechanisms - such as Fair Queueing [7, 181 and its many variants [2, 10, 20]- or per-flow dropping mechanisms such as Flow Random Early Drop (FRED) [14]. These mechanisms are more complex to implement than t,raditional FIFO queueing with drop-tail, which is the most widely implemented and deployed mechanism in routers today. In particular, fair allocation mechanisms inherently require the routers to maintain state and perform operations on a per flow basis. For each packet that arrives at the router, the routers needs t,o clnssi~$ the packet into a flow, update per flow state variables, and perform certain operations based on the per flow state. The operations can be as simple as deciding whether to drop or queue the packet (e.g., FRED), or as complex as manipulation of priority queues (e.g., Fair Queueing). While a number of techniques have been proposed to reduce the complexity of the per packet> operations [I, 20, 211, and commercial implementations are available in some intermediate class routers, it is still MIclear whether these algorithms can be cost-effectively implrmented in high-speed backbone routers because all these algorithms still require packet classification and per flow state management. In this paper we start with the assumption that (1) fair allocation mechanisms play an important, perhaps even necessary, role in congestion control, and (2) the complexity of existing fair allocation mechanisms is a substantial hindrance to their adoption. Both of these points are debatable; developments in router technology may make such algorithms rather inexpensive to implement, and there may be solutions to congestion control that do not require fair allocation (we discuss this point more fully in Sectiou 4). By using these two assumptions as our starting points we are not claiming that they are true, but rather are only looking at the implications if indeed they 2uere true. If one starts with these assumptions then overcoming the complexity problem in achieving fair allocation becomes a vitally important problem. To this end, we propose and examine an architecture and a set of algorithms that allocate bandwidth in an approximately fair manner while allowing the routers on high-speed links to use FIFO queueing and maintain no per-flow state. ‘We use the max.mm defimtmn of fairness [la] which, whole not the only possible candidate for fairness, LS certamly a reasonable one and, moreover, can be implemented with only local mformatlon 118
In this approach, we identify an island of routers" and dis- algurithm in which only edge routers Maintain per flow state tinguish between the edge and the core of the island. Edge while core(non-edge) routers do not maintain per flow state routers compute per-flow rate estimates and label the pack ut instead utilize the per -fow information carried via a la ets passing through them by inserting these estimates into bel in each packet's header. This label contains an estimate each packet header. Core routers use FIFO queueing and of the fow's rate; it is initialized by the edge router keep no per-flow state. They employ a probabilistic drop- on per-flow information, and then updated at each ping algorithm that uses the information in the packet la- along the path based only on aggregate information at bels along with the router's own measurement of the aggre. router The bandwidth thin this island of outers are approximately fair. Thus, if this approach were quired by Fair Queueing we use FIFO queueing with prob opted within the high speed interiors of ISP's, and fair al- abilistic dropping on in The probability of dropping a tion mechanisms were adopted for the slower links out- acket as it arrives to ueue is a function of the rate side of these high-speed interiors, then approximately fair estimate carried in the label and of the fair share rate at allocations could be achieved every where. However, thi that router. which is ated based on measurements of approach, like Fair Queneing [7 or RED[9, still provid the benefit if adopted in an incremental fa Thus, our approach avoids both the need to maintain incremental adoption must be done on an island-by-island per-flow state and the need to use complicated packet schedul the state that is carried p no per How state but instead use bit-by-bit or HudA th E basis, not on a router-by-router basis ing and buffering algorithms at core routers. To give a bet ter We call this approach Core-Stateless Fair Queueing(CSFQ) intuition about how this works, we first present the idealized rithm, and then extend the algorithm to a practical packet he details of this approach-such as the kate estimation by-packet version Igorithm and the packet dropping algorithm -in Section 2 Such a scheme cannot hope to achieve the nearly-perfect 2.1 Fluid Model Algorithm levels of fairness obtained by Fair Queueing and other so- phisticated and stateful queueing algorithms. However, or interest is not in perfection, but only in obtaining reasor output link speed C, where the flows are modelled as a con- able approximations to the fair bandwidth allocations. We tinuous stream of bits. We assume each flows arrival rate derive: a worst-Case bound for the performance of this algo- ri(t)is known precisely, Max-min fair bandwidth alloca- rithm in realized setting. This bound is presented tions are characterized by the fact that all Hows that are Section 2 ottlenecked (i.e, have bits dropped) by this router have to the typical functioning of CSFQ. In Section 3 we present the server; let a(t) be the fair share rate at time t. bEom This worst-case analysis does not give an adequate guide the same output rate. We call this rate the fair share rate results from simulation experiments to illustrate the perfo eral, if max-min bandwidth allocations are achieved, each mance of our approach and to compare it, to several other flow i receives service at a rate given by min(r:(t), a(t) schemes: DRR (a variant of Fair Queueing), FRED, RED, Let A(t)denote the total arrival rate: A(t)=2,ri(t).If nd FIFO. We also discuss, therein, the relative mechanistic A(t)>C then the fair share a(t)is the unique solution to plexities of the roaches The first 3 sections of the paper are narrowly on the details of the mechanism and its performance Absolute and relative), with the need for such a me ace a(bist min(r(t),a(t)) d In section 4 we return to the basic If A(t)sC then no bits are dropped and we will, by con- tion of why fair allocations are relevant to congestion con- vention, set a(t)= maxi ri (t) trol. Allocating bandwidth fairly is one way to address what If ri(t)sa(t), i.e., flow i sends we call the unfriendly flow problem; we also discuss an alter- fair share rate, all of its traffic will be forwarded. If r(t)> nate approach to addressing this probl ntification a(t), then a fraction T(t-a(t) of its bits will be dropped, so approach as described in [8. We conclude in Section 5. A longer version of this it will have an output rate of exactly a(t). This suggests a proofs of the theoretical results as well ple prohabilistic forv g algorit hm t hat. achieve pseudocodecanbefoundathttp://www.cs.cmuedu/-ist fair allocation of bandwidth: each incoming bit of flow i is dropped with the probability Ica, ce max(0,-(4) 2 Core-Stateless Fair Queueing (CSFQ (t) In this section, we propose an architecture that approxi- When these dropping probabilities are used, the arrival ates the service provided by an island of Fair Queueing rale of flow i at the next hup is given by min[r(c),a()] mplexity in the core routers. The architecture has two key aspects. First, to avoid mai 2.2 Packet Algorithm taining per Aow state at each router, we use a distributed defined for a bufferless fluid system t meal a contiguous portion of the network, in which the arrival rates are known exactly, Our task now is to extend this approach to the situation in real routers usly these core routers keep some state, but none of it is say“ stateless” we are referring to the where transmission is packetized, there is substantial buffer ing, and the arrival rates are not known
In this approach, we identify an island of routers’ and distinguish between the edge and the core of the island. Edge routers compute per-flow rate estimates and label the packets passing through them by inserting these estimates into each packet header. Core routers use FIFO queueing and keep no per-flow state. They employ a probabilistic dropping algorithm that uses the information in the packet labels along with the router’s own measurement of the aggregate traffic. The bandwidth allocations within this island of routers are approximately fair. Thus, if this approach were adopted within the high speed interiors of ISP’s, and fair allocation mechanisms were adopted for the slower links outside of these high-speed interiors, t,hen approximately fair allocations could be achieved everywhere. However, this approach, like, Fair Queueing [7] or RED [9], still provides benefit if adopted in an incremental fashion, although the incremental adoption must be done on an island-by-island basis, not on a router-by-router basis. We call this approach Core-Stateless Fair Queueing (CSFQ) since the core routers keep no per-flow state but instead use the state that is carried in the packet labels.3 We describe the details of this approach - such as the Rate estimation algorithm and the packet dropping algorithm - in Section 2. Such a scheme cannot hope t,o achieve the nearly-perfect levels of fairness obtained by Fair Queueing and other sophisticated and stateful queueing algorithms. However, our interest is not in perfect,ion, but only in obtaining reasonable approximations to the fair bandwidth allocations. We derivt, a worst-case bound for the performance of this algorithm in an idealized setting. This bound is presented in Section 2. This worst-case analysis does not give an adequate guide to the typical functioning of CSFQ. In Section 3 we present results from simulation experiments to illustrate the performance of our approach and to compare it to several other schemes: DR.R (a variant of Fair Queueing), FRED, RED, and FIFO. We also discuss, therein, the relative mechanistic complexities of these approaches. The first 3 sections of the paper are narrowly focussed on the details of the mechanism and its performance (both absolute and relative), with the need for such a mechanism taken for granted. In Section 4 we return to the basic question of why fair allocations are relevant to congestion control. Allocating bandwidth fairly is one way to address what we call the unfriendly flow problem; we also discuss an alternate approach to addressing this problem, the identification approach as described in [8]. We conclude with a summary in Section 5. A longer version of this paper, containing proofs of the theoretical results as well as more complete pseudocode, can be found at http: //www .cs .cmu. edu/-isto ica/csfq. 2 Core-Stateless Fair Queueing (CSFQ) In this section, we propose an architecture that approximates the service provided by an island of Fair Queueing routers, but has a much lower complexity in the core routers. The architecture has two key aspects. First, to avoid maintaining per flow state at each router, we use a distributed ‘By mland we meal, a contiguous portion of the network, with well-defined intenor and edges. 30bviously these core routers keep some state, but none of it is per-flow state, so when we say “stateless” we are referring to the absence of per-flow state. algorithm in which only edge routers maintain per flow state, while core (non-edge) routers do not maintain per flow state but instead utilize the per-flow information carried via a label in each packet’s header. This label contains an estimate of the flow’s rate; it is initialized by the edge router based on per-flow information, and then updated at each router along the path based only on aggregate information at t,hat, router. Second, to avoid per flow buffering and scheduling, as required by Fair Queueing, we use FIFO queueing with probabilistic dropping on input. The probability of dropping a packet as it arrives to the queue is a function of the rate estimate carried in the label and of the fair share rate at that router, which is estimated based on measurements of the aggregate traffic. Thus, our approach avoids both the need to maintain per-flow state and the need to use complicated packet scheduling and buffering algorithms at core routers. To give a better intuition about how this works, we first present the idealized bit-by-bit or fluid version of the probabilistic dropping algorithm, and then extend the algorithm to a practical packetby-packet version. 2.1 Fluid Model Algorithm We first consider a bufferless fluid model of a router with output link speed C, where the flows are modelled as a continuous stream of bits. We assume each flow’s arrival rate r,(t) is known precisely. Max-min fair bandwidth allocations are characterized by the fact that all flows that are bottlenecked (i.e., have bits dropped) by this router have the same output rate. We call this rate the fair share rate of the server; let a(t) be the fair share rate at time t. In general, if max-min bandwidth allocations are achieved, each flow i receives service at a rate given by min(r,(t),cw(t)). Let A(t) denote the total arrival rate: A(t) = ~~=, rl(t). If A(t) > C then the fair share a(t) is the unique solution to C=k min(r,(t), 4t)), (1) *cl If A(t) 5 C then no bits are dropped and we will, by convention, set cr(t) = max, r,(t). If rl(t) < a(t), i.e., flow i sends no more than the server’s fair share rate, all of its traffic will be forwarded. If r,(t) > a(t), then a fraction r’cz;ty(t) of its bits will be dropped, so it will have an output rate of exactly a(t). This suggests a very simple probabilistic forwarding algorithm that, achieves fair allocation of bandwidth: each incoming bit of flow i is dropped with the probability max(a,l- -$J) When these dropping probabilities are used, the arrival rate of flow i at the next hop is given by min[r,(t), cult)]. 2.2 Packet Algorithm The above algorithm is defined for a bufferless fluid system in which the arrival rates are known exactly. Our task now is to extend this approach to the situat,ion in real routers where transmission is packetized, there is substantial buffering, and the arrival rates are not known. 119
Flow I Core Router Packet Labeling F(a()=∑min(r(),a(t) (4) Note that F() is a continuous, nondecreasing, concave, and Flaw i packe labeling piecewise-linear function of a. If the link is congested(A(:)> C) we choose a(t)to be the unique solution to F(r)= If the link is not congested (A(t)<C)we take a(t) to be the largest rate among the flows that traverse the link,i,e Estimator c(l)=naxK<i<n(ri(c)). Fron Ey (4)note that if we knew the arrival rates ri(t) we could then compute a(t)directly To avoid having to keep such per-flow state, we seek instead to implicitly compute a(t) by using only aggregate mea ments of F and a Figure I: The architecture of the output port of an edge We use the following heuristic algorithm with thre router, and a core router, respectively. gregate state variables: a, the estimate for the fair share rate;A, the estimated aggregate arrival rate; F, the esti We still employ a drop-on-input. scheme, except that now mated rate of the accepted traffic. The last two variables we drop packets rather than bits. Because the ti- are updated upon the arrival of each packet. For A we use lalion(described below) incorporates the packet size, the exponential averaging with a parameter e-T/Ka where Tis the inter-arrival time between the current and the previous depends only, as above, on the rate r: (t)and fair share rate packet we are left with two remaining challenges: estimating Anew=(1 (5 the rates ri(t)and the fair share a(t). We address these two the rewriting of the labels. Pseudocode reflecting this algo- an analogous formula to update Ae the updating. We use where Aold is the value of a befo rithm is described in Figure 2. We should note, however The updating rule for a depends on whether the link is hat the main point of our paper is the overall architecture congested or not. 'lo hilter out the estimation inaccuracies and that the detailed algorithm presented below represents due to exponential smoothi only an init ial prot. ntype While it serves adequately as a A link is assumed to be congested, if A>C at all times dui proof-of-concept of our architecture, we fully expect that the ing an interval of length Kc. Conversely, a link is assumed details of this design will continue to evolve to be uncongested, if A< C at all times during an interval 2.2.1 Computation of Flow Arrival Rate interval in which the link is either congested or uncongested Recall that in our architecture, the rates ri(t) are estimated according to these definitions. If the link is congested then at the edge routers and then these rates are inserted int a is updated based on the equation F (ar)=C. We approxi- reaging to estimate the rate of a fow. Let tk and 4k be has slope F/aold. This yields the arrival time and length of the k packet of flow i. The estimated rate of Hlow i, ri, is updated every time a new aold )/ (3) If the link is not congested, aneto is set to the largest rate of any active fow(i. e, the largest label seen)during the last Ks time units. The value of anew is then used to com where tk=tt-tk-I and k is a constant. We discuss pute dropping probabilities, according to Eq(2). For com the rationale for using the form e-Ti/k for the exponential weight in Section 2.7. In the longer version of this paper We now describe two minor amendments to this algo- 22] we show that, under a wide range of conditions, this rith related to how the buffers are managed. The goal of estimation algorithm converges estimating the fair share a is to match the accepted rate to the link bandwidth. Due to estimation inaccuracies, load 2.2.2 Link Fair Rate Estimation fluctuations between ars updates, and the probabilistic na In this section, we present an estimation algorithm for a(t). exceed the link capacity. While ideally the router's buffers tion 2. 1 where the arrival rates are known exactly, and as- can accor lack of sume the system performs the tIc ping alg rithm according to Eq(2). Then, the rate with which the ffer space. Since drop-tail behavior will defeat the purp n. a rrent estl- ase of adaptive flows sucll as TCP mate of the fair share rate, which we denote by a(t). Letting to limit its effect. To do so, we use a simple heuristic: every F(a(t))denote this acceptance rate, we have
E:dge Router I Estimator Figure 1: The architecture of the output port of an edge rout,er, and a core router, respectively. We still employ a drop-on-input scheme, except that now we drop packets rather than bits. Because the rate estimation (described below) incorporates the packet size, the dropping probability is independent of the packet size and depends only, as above, on the rate r;(t) and fair share rate u(t). We are left with two remaining challenges: estimating the rates r,(t) and t,he fair share o(t). We address these two issues in turn in the next two subsections, and then discuss the rewriting of the labels. Pseudocode reflecting this algorithm is described in Figure 2. We should note, however, that, the main point, of our paper is the overall architecture and that the detailed algorithm presented below represents only an init,ial prototype. While it serves adequately as a proof-of-concept of our architecture, we fully expect that the details of this design will continue to evolve. 2.2.1 Computation of Flow Arrival Rate Recall that in our architecture, the rates rt(t) are estimated at t,he edge routers and then these rates are inserted into the packet labels. At each edge router, we use exponential averaging to estimate the rate of a flow. Let tf and 1: be the arrival time and length of the lath packet of flow i. The estimated rate of flow i, T,, is updated every time a new packet is received: where T,k = tt - tr-’ and K is a constant. We discuss the rationale for using the form e-Tak/Ji for the exponential weight in Section 2.7. In the longer version of this paper [22] we show that, under a wide range of conditions, this estimation algorithm converges. 2.2.2 Link Fair Rate Estimation In this section, we present an estimation algorithm for o(t). To give intuition, consider again the fluid model in Section 2. t where the arrival rates are known exactly, and assumr the system performs the probabilistic dropping algorithm according to Eq. (2). Then, the rate with which the algorithm accepts packets is a function of the current estimate of the fair share rate, which we denote by 6(t). Letting .“‘(&(t)) denote this acceptance rate, we have F(qt)) = 2 min (rl(t), G(t)) r=, Note that F(.) is a continuous, nondecreasing, concave, and piecewise-linear function of cr. If the link is congested (A(t) > C) we choose G(t) to be the unique solution to F(s) = C. If the link is not congested (A(t) < C) we take G(t) to be the largest rate among the flows that traverse the link, i.e., G(t) = maxi<,<,(r,(t)). From Eq (4) note that if we knew -- the arrival rates rl(t) we could then compute o(t) directly. To avoid having to keep such per-flow state, we seek instead to implicitly compute G(t) by using only aggregate measurements of F and A. We use the following heuristic algorithm with three aggregate state variables: G, the estimate for the fair share rate; A, the estimated aggregate arrival rate; F, the estimated rate of the accepted traffic. The last two variables are updated upon the arrival of each packet. For A we use exponential averaging with a parameter e -T/Xi, where T is the inter-arrival time between the current and the previous packet : where Aold is the value of A before the updating. We use an analogous formula to update F. The updating rule for ;i depends on whether the link is congested or not. To filter out the estimation inaccuracies due to exponential smoothing we use a window of size K,. A link is assumed to be congested, if A^ 2 C at all times during an interval of length EC,. Conversely, a link is assumed to be uncongested, if A^ < C at all times during an interval of length I(,. The value% is updated only at the end of an interval in which the link is either congested or uncongested according to these definitions. If the link is congested then G is updated based on the equation F(G) = C. We approximate F(‘) by a linear function that intersects the origin and has slope p/Gold. This yields h c CYnezLi = QoldT F (6) If the link is not congested, (r,,, is set to the largest rate of any active flow (i.e., the largest label seen) during the last Ii’, time units. The value of ;u^,,,,, is then used to compute dropping probabilities, according to Eq. (2). For completeness, we give the pseudocode of the CSFQ algorithm in Figure 2. We now describe two minor amendments to this algorithm related to how the buffers are managed. The goal of estimating the fair share G is to match the accepted rate to the link bandwidth. Due to estimation inaccuracies, load fluctuations between G’s updates, and the probabilistic nature of our algorithm, the accepted rate may occasionally exceed the link capacity. While ideally the router’s buffers can accommodate the extra packets, occasionally the router may be forced to drop the incoming packet, due to lack of buffer space. Since drop-tail behavior will defeat the purpose of our algorithm, and may exhibit undesirable properties in the case of adaptive flows such as TCP [9], it, is important to limit, its effect. To do so, we use a simple heuristic: every 120
inside the island, however, the packet labels are no longer on receiving packet p an accurate estimate of its rate, We cannot. rerun our es e ro classify(p) timation algorithm, because it involves per-flow state, For p Label estimate -rate(ri, P); / use Eq()*/ tunately, as note inl Section 2. 1 the oulguinIg rale: is Inertly he minimum bet ween the incoming rate and the fair rate prob=max(0, 1-a/p label) if rand(0, 1) a, Therefore, we rewrite thethe packet label L as r =estimate_ar (p, 1) Lnet= min( Lold, a), By doing so, the outgoing Row rates will be properly repre- rr =estimatec(p, 0 sented by the packet labels if(prob>0) 2.3 Weighted CSFQ p label a;/* relabel p* The CSFQ algorithm can be extended to support Flows with different weights, Let w; denote the weight of flow i. Re estinate_a(p, dropped) turning to our fluid model, the meaning of these weight estimate rate( A, p);/* est. arrival rate(use Eq. (5))+/ that we say a fair allocation is one in which all bottle- FALSE cked flows have the same value for i. Then, if A(t)>C. estimate- rate(F, p);/* est. accepted traffic rate * the normalized fair rate a(t)is the unique value such that 2i, wr min(a, Ui )=C. The expression for the drop- if(congested== FALSE) congested= TRUE ping probabilities in the weighted case is max(0, 1-a w) start_time=crt_time Tle unly other major change is that the label is now r:/ else instead simply ri. Finally, without going into details we if(crt timc> start-time +Kc) note that the weighted packet-by-packet version is virtual a=a×C/F; identical to the corresponding version of the plain CSF( t tame= crtt algorithm It is inportant wo nule that with weighted CSFQ we can else/*A<C+ only approximate islands in which each flow has the same if(congested = TRUE weight at all routers in an island. That is, our algorithm congested= FALSE cannot accommodate situations where the relative weight: tart_time = crt_time. of flows differ from router to router within an island. How tmpa=0;/+ use to compute nca a+/ ever, even with this limitation, weighted CSFQ may prove else if(crt_time start-time +Kc) a valuable mechanism in implementing differential services, such as the one proposed in [24] tmp-ax =max(tmp_a, p label) a= trrp_a: 2.4 Performance bounds start time crt time: We now present the main theoretical result of the paper tmp_o =0 For generality, this result is given for weighted CSFQ. The return ar proof is given in [22] Our algorithm is built, around several estimation proce- dures, and thus is inherently inexact, One natural concern Figure 2: The pseudocode of CSFQ is whether a How can purposely exploit"these inaccuracies o get. more than its fair share of bandwidth. We answer this question in full generality, but we can analyze a time the buffer overflows, a is decreased by a small fixed per- simplified situation where the normalized fair share rate or entage(taken to be 1% in our simulations). Moreover, is held fixed and there is no buffering, so the drop probabil- avoid overcorrection, we make by e updates a does not decrease by more than 25% that. when a packet arrives a fraction of that packet equal to In addition, since there is little reason to consider a link the fows forwarding probability is transmitted. Note that congested if the buffer is almost empty, we apply the fol during any time interval [t1, t2)a How with weight w is enti- lowing rule. If the link becomes uncongested by the test tled to receive at most wa(t2-t1)service time; we call al Figure 2, then we assume that it remains ingested amount above this the excess service. We can bound this ng as the buffer occupancy is less than some predefined ess service, and the bounds are independent of both the threshold. In this paper we use a threshold that is half of arrival process and the length of the time interval during he total buffer capacity which the flow is active. The bound does depend crucially on the maximal rate R at which a flows packets can arrive 2.2.3 Label Rewriting at a router(limited, for example, by the speed of the flows access link); the smaller this rate R the tighter the bound Our rate estimation al in Section 2.2.1 label packets with their flows rate as they ent land Theorem 1 Consider a link with a constant normalized fa Our packet dropping algorithm described in tc a, and a fow with weight w. Then, the ercess service allows us to limit Rows to their fair share of the bandwidth. received by a flow with weight w, that sends at a rate no After a flow experiences significant losses at a congested link larger than R is bounded above b 121
on receiving packet, p if (edge router) 2 =classify(p); p,label = estimate-rate(r,,p); /* ~dse Ep. (3) */ prob =max(O, 1 - a/p.label); if @rob >unifrand(O, 1)) 0 =estimate-cY (p, 1); drop(p); else 0 =estimate-rw (p, 0); tmqueue(p); if (prob > 0) p.label = cy; /+ relabel p */ estimate-u (p, dropped) estimate-rate(X,p); /* est. arrival rate (use Eq. (5)) */ if (dropped == Fz4-LSE) estimate-rate(F,p); /* est. accepted trafic rate */ if(A^>C) if (congested == FALSE) congested = TRUE; start-time = crt-time; else if (crt-time > start-time + Ii,) 6 = 2 x c/F; start-ti’me = crt-time; else /* 2 < C */ if (congested == TRUE) congested = FALSE; start-time = crt-time; tmp-cy = 0; /* use to compute new cy */ else if (crt-time < start-time + KC) tmp-cu =max(tmp-cu,l,.label); else Cu = tmp-ff ; start-time = crt-time; tmp-rw = 0; return G;; Figure 2: The pseudocode of CSFQ. time the bufl’er overflows, ;u^ is decreased by a small fixed percentage (taken to be 1% in our simulations). Moreover, to avoid overcorrection, we make sure that during consecutive updates su^ does not decrease by more than 25%. In addition, since there is little reason to consider a link congested if the buffer is almost empty, we apply the following rule. If the link becomes uncongested by the test in Figure 2, then we assume that it remains uncongested as long as the buffer occupancy is less than some predefined threshold. In this paper we use a threshold t,hat is half of the I,otal bufl’er capacity. 2.2.3 Label Rewriting Our rate estimation algorithm in Section 2.2.1 allows us to label packets with their flow’s rate as they enter the island. Our packet dropping algorithm described in Section 2.2.2 allows us to limit flows to their fair share of the bandwidth. After a flow experiences significant losses at a congested link inside the island, however, the packet labels are no 1o11gr1 an accurate estimate of its rate. We cannot rcr,m our estimation algorithm, because it involves per-flow state. IJor.- tunately, as note in Section 2.1 the outgoing rat,<! is merely the minimum between the incoming rate and the fair ra(,e N. Therefore, we rewrite the the packet, label I, as L new - min(Ldd, a), (7) By doing so, the outgoing flow rates will be properly reprcsented by the packet labels. 2.3 Weighted CSFQ 7’1~ CSFQ algorithm can be ext,ended to support, Hews with diH’erent weights. Let w, denote the weight of flow I. Returning to our Huitl model, the meaning of t,hese weights is that we say a fair allocat,ion is one in which all bottlenecked Hows have the same value for 2. l’hen, if A(t) > C, the normalized fair rate a(t) is the unique value such that CL w, min (0, 2) = C. The expression for the dropping probabilities in the weighted case is max (0, I - (Y?). The only other major change is that the label is now rlj$L, instead simply rz. Finally, without going into details we note that the weighted packet-by-packet version is virtually identical to the corresponding version of the plain CSFQ algorithm. It is import,ant to note that with weighted CSFQ we can only approximate islands in which each How has t,he same weight at all routers in an island. That is, our algorithm cannot accommodate situations where the relative weights of Hows differ from router to router within an island. However, even with this limitation, weighted CSFQ may prove a valuable mechanism in implementing differential services, such as the one proposed in [24] 2.4 Performance Bounds We now present the main theoretical result of the paper. For generality, this result is given for weighted CSFQ. The proof is given in [22]. Our algorithm is built around several estimat,ion procedures, and thus is inherently inexact. One natural concern is whether a flow can purposely “exploit” these inaccuracies to get more than its fair share of bandwidth. We cannot answer this question in full generality, but we can analyze a simplified situation where the normalized fair share rate N is held fixed and there is no buffering, so the drop probabilities are precisely given by Eq. (2). In addition, we assume that when a packet arrives a fraction of that, packet equal to the flow’s forwarding probability is transmitted. Note that during any time interval [tl, t2) a flow with weight w is entitled to receive at most, zua(tz - tl) service time; we call any amount above this the excess service. We can bound this excess service, and the bounds are independent of both the arrival process and the length of the time interval during which the How is active. The bound does depend crucially on the maximal rat,e R at which a Hows packets can arrive at, a router (limited, for example, by the speed of the flow’s access link); the smaller this rate R the tighter the bound. Theorem 1 Consider a link with a constant normalizedfair rute CY, and a flow with weight u). Then, the e.rcess seruzce received by a flow ,witla weight w, that sends at a ratr, no lurger than R is bounded above by 121
2. 7 Miscellaneous Details Tak(1+in=)+Imax (8) Having presented the basic CS algorithm, we now return We have used exponential averaging to estimate the ar- where ra= aw, and lmar represents the marimum length of al rate in Eq.(3). However, instead of using a consta exponential weight we used e-T/k where T is the inter packet arrival time and K is a constant. Our motivation By bounding the excess service, we have shown that in was that e-T/k more closely refects a Auid averaging pro his idealized setting the asymptotic throughput cannot. ex- cess which is independent of the packetizing structure. More system over short time scales; they are limited to their fair specifically, it can be shown that if a constant weight. ls sed the estimated rate will be sensitive to the packet length dis- share over long time scales tribution and there are pathological cases where the esti- 2.5 Implementation Complexity this would allow flows to exploit the estimation process and At core routers, both the time and space conplexity of our btain more than their fair share. In contrast by using a algorithm are constant with respect to the number of com- parameter of e-T/, the estimated rate will asymptotical peting flows and thus we think CSFQ could be implemented converge to the real rate, and this allows us to bound the excess service that can be achieved (as in Theorem 1. We g needs to maintain per flow state. upoassify the packet l on each arrival of each used a similar averaging process in Eq.(5)to estimate the Hlow,(2)update the fair share rate estimation for the cor- The choice of K in the above expression e-T/k presents responding out going link, (3)update the flow rate estima us with several tradeoffs. First, while a smaller K increases tion,and (4)label the packet. All these operations with the system responsiveness to rapid rate fluctuations, a larger the exception of packet classification can be efficiently im K better filters the noise and avoids potential system insta plemented today. ility. Second, k should be large enough guch t hat the esti- Ffficient and general-purpose packet classification algo- mated rate, calculated at the edge of the net work, remains rithins are still under active research, We expect to lever reasonabl r a packet traverses multiple links results. We also note that packet classification his is because the delay- jitter changes the packets'inter is needed for a number of other purpose arrival pattern, which may result in an increased discrep- ontext of Multiprotocol Label Switching ancy between thc estimated ratc (rcccivcd in the packets ing purposes; therefore, the classi labels) and the real rate. To counteract this effect, as a rule fication required for CSFQ may not be an extra cost. In ad of thumb, I should be one order of magnitude larger that dition, if the edge routers are typically not on the high-speed he delay-jitter experienced by a flow over a time interval of backbone links then there is no problem as classification at he same size, K. Third, K should be no larger than the average duration of a flow. Based on this constraints,an appropriate value for K would be between 100 and 500 ms A second issue relates to the requirement of CSFQ for a 2. 6 Architectural Considerations label to be carried in each packet. One possibility is to use he Type Of Service byte in the IP header. For example, by This was intentional, as the CSFQ approach can be applied using a floating point representation with four bits for man tutcs a flow is arbitrary as long as all packets in the io between 1 Kbps and 65 Mbps with an accuracy of 6. 25% follow the same path within the core. In this paper, for co Another possibility is to define an IP option in the case of venience, a flow is implicitly defined as a source-destination IPv4, or a hop-by-hop extension header in the case of IPv6 pair, but one could easily assign fair rates to many other granularities such as source-destination-ports. Moreover 3 Simulation as the rates are re-estimated when entering a new island the unit of How"can vary from island to island as long In this section we evaluate our algorithm by simulation. To Similarly, we have not been precise about the size of these provide some context, we compare CSFQ's performance to CSQ islands. In one extreme, we could take each router four additional algorithms. Two of these, FIFO and RED, as an island and estimate rates at every router; this would represent baseline cases where routers do not attempt to allow us to avoid the use of complicated per-How achcdulin chieve fair bandwidth allocations. The other two alg and dropping algorithms, but would require per-flow classi thms, FRED and DRR, represent different approach fication. Another possibility is that ISP's could extend their island of CSFQ routers to the very edge of their net work having their edge routers at the points where customer's FIFo(First In First Out).Packets are served in a packets enter the ISP's nctwork. Building on the prey first-in first-out order, and the buffers are scenario, multiple ISP's could combine their islands so that using a simple drop-tail strategy; i. e, incoming pack at ISP-ISP boundaries. The key obstacle here is one of trust RED(Random Early Detection in a first-in first-out order, but manage- an drop-tail
2.7 Miscellaneous Details Having presented the basic CSFQ algorithm, we now return to discuss a few aspects in more detail. We have used exponential averaging to estimate the arrival rate in Eq. (3). However, instead of using a constant exponential weight we used e-‘/Ii where T is the interpacket arrival time and li is a constant. Our motivation was that e-Tt1’ more closely reflects a fluid averaging process which is independent of the packetizing structure. More specifically, it can be shown that if a constant weight is used, the estimated rate will be sensitive to the packet length distribution and there are pathological cases where the estimated rate differs from the real arrival rate by a factor; this would allow flows to exploit the estimation process and obtain more than their fair share. In contrast, by using a parameter of e-‘/Ii, the estimated rate will asymptotically converge to the real rate, and this allows us to bound the excess service that can be achieved (as in Theorem 1). We used a similar averaging process in Eq. (5) to estimate the total arrival rate A. The choice of li in the above expression e-‘r”i presents us with several tradeoffs. First, while a smaller Ei increases the system responsiveness to rapid rate fluctuations, a larger I( better filters the noise and avoids potential system instability. Second, I< should be large enough such that the estimated rate, calculated at the edge of the network, remains reasonably accurate after a packet traverses multiple links. This is because the delay-jitter changes the packets’ interarrival pattern, which may result in an increased discrepancy between the estimated rate (received in the packets’ labels) and the real rate. To counteract this effect, as a rule of thumb, I< should be one order of magnitude larger that the delay-jitter experienced by a flow over a time interval of the same size, K. Third, I( should be no larger than the average duration of a flow. Based on this constraints, an appropriate value for li would be between 100 and 500 ms. A second issue relates to the requirement of CSFQ for a label to be carried in each packet. One possibility is to use the Type Of Service byte in the IP header. For example, by using a floating point representation with four bits for mantissa and four bits for exponent we can represents any rate between 1 Kbps and 65 Mbps with an accuracy of 6.25%. Another possibility is to define an IP option in the case of lPv4, or a hop-by-hop extension header in the case of IPv6. whew r a = ,IUJ, and l,,, represents the maximum length of a packet. By bounding the excess service, we have shown that. in this idealized setting the asymptotic throughput cannot exceed the fair share rate. Thus, flows can only exploit the system over short time scales; they are limited to their fair share over long time scales 2.5 Implementation Complexity At core routers, both the time and space complexity of our algorithm are constant with respect to the number of compet,iiig flows. and thus we think CSFQ could be implemented in very high speed core rout,ers. At each edge router CSFQ needs to maintain per flow state. Upon each arrival of each packet, the edge router needs to (1) classify the packet to a flow, (2) update the fair share rate estimation for the corresponding outgoing link, (3) update the flow rate estimat,ion, and (4) label the packet. All these operations with the exception of packet classification can be efficiently implemented today. E:fficient and general-purpose packet, classification algorithins are still under act,ive research. We expect to leverage lhese results. W e a 1 so note that packet classification at irigress nodes is needed for a number of other purposes, such as in the context of Multiprotocol Label Switching (MPLS) [4] or for accounting purposes; therefore, the classification required for CSFQ may not be an extra cost. In addition, if the edge routers are typically not on the high-speed backbone links then there is no problem as classification at rnoderate speeds is quite practical. 2.6 Architectural Considerations We have used the term flow wit,hout defining what we mean. This was int,entional, as the CSFQ approach can be applied to varying degrees of flow granularity; that is, what constitutes a flow is arbitrary as long as all packets in the flow follow the same path within the core. In this paper, for convenience, a flow is implicitly defined as a source-destination pair, but one could easily assign fair rates to many other granularities such as source-destination-ports. Moreover, the unit of Vlow” can vary from island to island as long as the rates are re-estimated when entering a new island. Similarly, we have not been precise about the size of these CSF’Q islands. In one extreme, we could take each router as an island and estimate rates at every router; this would allow us to avoid the use of complicated per-flow scheduling and dropping algorithms, but would require per-flow classification. Another possibility is that ISP’s could extend their island of CSFQ routers to the very edge of their network, having their edge routers at the points where customer’s packets enter the ISP’s network. Building on the previous scenario, multiple ISP’s could combine their islands so that classification and estimation did not have to be performed at ISP-ISI’ boundaries. The key obstacle here is one of trust between ISl’s. 3 Simulations In this section we evaluate our algorithm by simulation. To provide some context, we compare CSFQ’s performance to four additional algorithms. Two of these, FIFO and RED. represent baseline cases where routers do not attempt to achieve fair bandwidth allocations. The other two algorithms, FRED and DRR, represent different approaches to achieving fairness. l FIFO (First In First Out) - Packets are served in a first-in first-out order, and the buffers are managed using a simple drop-tail strategy; i.e., incoming packets are dropped when the buffer is full. l RED (Random Early Detection) - Packets are served in a first-in first-out order, but the buffer management is significantly more sophisticated than drop-tail. RED [9] starts to probabilistically drop packets long 122