tfc: token flow control in data center networksnns.cs.tsinghua.edu.cn/paper/eurosys16_jz.pdf ·...

14
TFC: Token Flow Control in Data Center Networks Jiao Zhang †§ , Fengyuan Ren †‡ , Ran Shu †‡ , Peng Cheng [ Department of Computer Science and Technology, Tsinghua University Tsinghua National Laboratory for Information Science and Technology § State Key Laboratory of Networking and Switching Technology, BUPT [ Microsoft Research Asia [email protected], {renfy, shuran}@csnet1.cs.tsinghua.edu.cn, [email protected] Abstract Services in modern data center networks pose growing per- formance demands. However, the widely existed special traf- fic patterns, such as micro-burst, highly concurrent flows, on-off pattern of flow transmission, exacerbate the perfor- mance of transport protocols. In this work, an clean-slate ex- plicit transport control mechanism, called Token Flow Con- trol (TFC), is proposed for data center networks to achieve high link utilization, ultra-low latency, fast convergence, and rare packets dropping. TFC uses tokens to represent the link bandwidth resource and define the concept of effective flows to stand for consumers. The total tokens will be explic- itly allocated to each consumer every time slot. TFC ex- cludes in-network buffer space from the flow pipeline and thus achieves zero-queueing. Besides, a packet delay func- tion is added at switches to prevent packets dropping with highly concurrent flows. The performance of TFC is eval- uated using both experiments on a small real testbed and large-scale simulations. The results show that TFC achieves high throughput, fast convergence, near zero-queuing and rare packets loss in various scenarios. Categories and Subject Descriptors C.2.2 [Computer- Communication Networks]: Network Protocols–TCP/IP Keywords Data Centers, Flow Control, Low Latency, Rare Loss, Fast Convergence 1. Introduction The performance demand of services is growing in modern data center networks. For example, streaming computing Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on servers, or to redistribute to lists, contact the Owner/Author(s). Request permissions from [email protected] or Publications Dept., ACM, Inc., fax +1 (212) 869-0481. EuroSys ’16, April 18 - 21, 2016, London, United Kingdom Copyright c 2016 held by owner/author(s). Publication rights licensed to ACM. ACM 978-1-4503-4240-7/16/04. . . $15.00 DOI: http://dx.doi.org/10.1145/http://dx.doi.org/10.1145/2901318.2901336 like Storm [4] supporting online data processing is more sensitive to average and tail latency than batch models like MapReduce for offline processing. In memcached systems [18], zero packets loss is a key performance metric since the retransmission after loss severely impacts the transmission performance. However, the special traffic characteristics, such as short traffic bursts [13, 22], highly concurrent transport protocols [2, 12], on-off pattern of flow transmission [34], significantly deteriorate the performance of flows. Traffic bursts easily lead to severe congestion and packets dropping, which will result in long flow completion time [15]. Highly concurrent flows might cause network congestion even if the congestion window of each flow is only one Maximum Segment Size (MSS). Many transport protocols designed for data centers could not deal with these issues properly [7, 35]. The on- off pattern of flow transmission possibly causes wastage of allocated bandwidth [37]. What are the desirable properties for an applicable da- ta center transport protocol? First, fast convergence. A short flow usually consists of only several packets. The sluggish- ness of a congestion window evolution algorithm will post- pone the transmission of short flows. Besides, the on-off transmission pattern of flows also needs transport protocol- s quickly response to dynamic loads. Second, zero packet loss. Packets dropping possibly result in a series of problem- s, such as TCP Incast [36], TCP Outcast [32], long query completion time [7]. Avoiding packets dropping can effec- tively solve these problems [15]. Third, low latency. Keep- ing zero-queueing can reduce the network latency caused by congestion to the extreme extent. Most of the proposed transport protocols for data cen- ters could only satisfy some of the desirable properties de- scribed above. For example, the congestion window adjust- ment mechanism involved in TCP and its variants (i.e. D- CTCP) incline to aggressively probe the available bandwidth through injecting excessive packets to networks, which re- sults in persistent queue backlog and thus fundamentally

Upload: others

Post on 14-Jul-2020

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: TFC: Token Flow Control in Data Center Networksnns.cs.tsinghua.edu.cn/paper/eurosys16_jz.pdf · Keywords Data Centers, Flow Control, Low Latency, Rare Loss, Fast Convergence 1. Introduction

TFC: Token Flow Control in Data Center Networks

Jiao Zhang†§, Fengyuan Ren†‡, Ran Shu†‡, Peng Cheng†[

†Department of Computer Science and Technology, Tsinghua University‡Tsinghua National Laboratory for Information Science and Technology§State Key Laboratory of Networking and Switching Technology, BUPT

[Microsoft Research [email protected], {renfy, shuran}@csnet1.cs.tsinghua.edu.cn, [email protected]

AbstractServices in modern data center networks pose growing per-formance demands. However, the widely existed special traf-fic patterns, such as micro-burst, highly concurrent flows,on-off pattern of flow transmission, exacerbate the perfor-mance of transport protocols. In this work, an clean-slate ex-plicit transport control mechanism, called Token Flow Con-trol (TFC), is proposed for data center networks to achievehigh link utilization, ultra-low latency, fast convergence, andrare packets dropping. TFC uses tokens to represent the linkbandwidth resource and define the concept of effective flowsto stand for consumers. The total tokens will be explic-itly allocated to each consumer every time slot. TFC ex-cludes in-network buffer space from the flow pipeline andthus achieves zero-queueing. Besides, a packet delay func-tion is added at switches to prevent packets dropping withhighly concurrent flows. The performance of TFC is eval-uated using both experiments on a small real testbed andlarge-scale simulations. The results show that TFC achieveshigh throughput, fast convergence, near zero-queuing andrare packets loss in various scenarios.

Categories and Subject Descriptors C.2.2 [Computer-Communication Networks]: Network Protocols–TCP/IP

Keywords Data Centers, Flow Control, Low Latency, RareLoss, Fast Convergence

1. IntroductionThe performance demand of services is growing in moderndata center networks. For example, streaming computing

Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without feeprovided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice andthe full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored.Abstracting with credit is permitted. To copy otherwise, to republish, to post on servers, or to redistribute to lists, contactthe Owner/Author(s). Request permissions from [email protected] or Publications Dept., ACM, Inc., fax +1 (212)869-0481.

EuroSys ’16, April 18 - 21, 2016, London, United KingdomCopyright c© 2016 held by owner/author(s). Publication rights licensed to ACM.ACM 978-1-4503-4240-7/16/04. . . $15.00DOI: http://dx.doi.org/10.1145/http://dx.doi.org/10.1145/2901318.2901336

like Storm [4] supporting online data processing is moresensitive to average and tail latency than batch models likeMapReduce for offline processing. In memcached systems[18], zero packets loss is a key performance metric since theretransmission after loss severely impacts the transmissionperformance.

However, the special traffic characteristics, such as shorttraffic bursts [13, 22], highly concurrent transport protocols[2, 12], on-off pattern of flow transmission [34], significantlydeteriorate the performance of flows. Traffic bursts easilylead to severe congestion and packets dropping, which willresult in long flow completion time [15]. Highly concurrentflows might cause network congestion even if the congestionwindow of each flow is only one Maximum Segment Size(MSS). Many transport protocols designed for data centerscould not deal with these issues properly [7, 35]. The on-off pattern of flow transmission possibly causes wastage ofallocated bandwidth [37].

What are the desirable properties for an applicable da-ta center transport protocol? First, fast convergence. A shortflow usually consists of only several packets. The sluggish-ness of a congestion window evolution algorithm will post-pone the transmission of short flows. Besides, the on-offtransmission pattern of flows also needs transport protocol-s quickly response to dynamic loads. Second, zero packetloss. Packets dropping possibly result in a series of problem-s, such as TCP Incast [36], TCP Outcast [32], long querycompletion time [7]. Avoiding packets dropping can effec-tively solve these problems [15]. Third, low latency. Keep-ing zero-queueing can reduce the network latency caused bycongestion to the extreme extent.

Most of the proposed transport protocols for data cen-ters could only satisfy some of the desirable properties de-scribed above. For example, the congestion window adjust-ment mechanism involved in TCP and its variants (i.e. D-CTCP) incline to aggressively probe the available bandwidththrough injecting excessive packets to networks, which re-sults in persistent queue backlog and thus fundamentally

Page 2: TFC: Token Flow Control in Data Center Networksnns.cs.tsinghua.edu.cn/paper/eurosys16_jz.pdf · Keywords Data Centers, Flow Control, Low Latency, Rare Loss, Fast Convergence 1. Introduction

limits latency improvements. The explicit rate-based con-gestion control protocols, such as D3 [37], cannot deal withsilent flows, i.e. flows are held not closed and wait for datato resume. To better adapt to these intermittent flows, appli-cation modifications are inevitable. In Fastpass [31], the s-calability is restricted by the capacity of the centralized con-troller which limits its deployment.

To satisfy all above-mentioned properties in data centernetworks, the injected traffic in total by end hosts shouldfill the network bottleneck link but eliminate in-networkpersistent queue backlogs.

In this paper, a novel window-based transport control pro-tocol is proposed for data center networks, which is calledToken Flow Control (TFC). Two important concepts, To-ken and the Number of effective flows, are defined in TFC.Specifically, Token represents the amount of traffic that canbe transmitted by a link in a time slot. The number of effec-tive flows stands for how many full windows of data packetswill be injected by all the flows in a time slot. By transform-ing the link transmission capacity to tokens and dynamicallyallocating these tokens to passing flows, TFC excludes thebuffer space from the flow pipeline and thus prevents build-ing up persistent queues. If we could get the accurate valueof tokens and the number of effective flows in a time slot,then we could allocate the total tokens to flows according toany allocation policies.

To achieve both fast convergence and accurate congestionwindow computation, the time interval of a time slot isfinally set to the Round Trip Time (RTT) of a flow. Besides,to achieve zero queueing delay, the RTT used to computethe token value and the RTT used to count the number ofeffective flows are decoupled. End hosts mark the first sentdata packet during each round to facilitate switches to getthe two kinds of RTT values.

What’s more, to prevent the performance deficienciesunder the micro-burst traffic pattern, a window acquisitionphase is added after the flow establishment phase. And toavoid buffer overwhelming when the number of active flowsis too large, if the computed congestion window is smallerthan one MSS, packets will be delayed at switches .

The advantages of the proposed TFC mechanism aremainly threefold. 1) Ultra-low latency. Since buffer is ex-cluded from the flow pipeline, TFC can achieve near zeroqueueing delay by guaranteeing the summation of the in-jected traffic by end hosts not exceeding the capacity ofthe pipeline. Besides, each flow could quickly converge toits proper congestion window after two RTTs. Therefore,the flow completion time could be decreased dramatical-ly. 2) Achieving near-zero loss. By deliberately designingthe window acquisition phase and packet delay function atswitches, TFC could avoid packets loss caused by burstytraffic and large-scale concurrent flows in data center net-works. 3) Switches do not need to maintain states for each

flow and the transport control function at end hosts becomemore simple.

The performance of TFC is evaluated in our testbed withDell end hosts and NetFPGA [1] switches. The experimentalresults show that TFC guarantees high throughput, near zeroqueuing, fast convergence and rare packet loss. The windowacquisition phase and the packet delay function at switchesenable TFC to work well with burst traffic and when thenumber of active flows is rather large. Simulation resultson the ns-2 platform also indicate that TFC exhibits goodscalability.

2. Design SpaceDifferent from traditional networks, services in data centernetworks have many special characteristics, which results innew requirements for transport protocols besides high linkutilization.

Fast Convergence. In data center networks, about 90 per-cent of flows are quite short [5]. A short flow is generallyconsisted of only several packets. To reduce the completiontime, transport protocols should enable flows to quickly con-verge to a proper share of bandwidth. TCP and its variants letflows evolve to their fair share from a quite small initial con-gestion window, which is not responsive enough to this kindof flows and causes them not to obtain their fair bandwidthshare before ending.

Furthermore, a flow could keep silent during some timeafter establishment. For example, in the Storm computingframework, a TCP connection exchanges messages for sev-eral executors [34]. It is likely that the connection will trans-mit data intermittently. To keep full link utilization, the band-width occupied by silent flows should be taken up by otheractive flows as quickly as possible. TCP or TCP variants failto work well in this kind of scenarios due to slow conver-gence. Although some explicit transport protocols proposedfor data center networks, such as D3 [37], could enable flowsto quickly converge to a proper rate, they rely on SYN andFIN to count flows. The silent flow will cause some band-width wastage.

Zero Packet Loss. In large-scale data center networks,TCP suffers from a growing number of performance issues,including TCP Incast [14, 39], TCP outcast [32], long querycompletion time [37], out-of-order, etc.. Avoiding packet-s dropping or providing quick packet loss notification caneffectively solve or alleviate these problems [15]. Manyrecently proposed transport protocols can significantly re-duce the number of dropped packets by limiting the queuinglength [7, 35] or controlling the sending rate [21, 37]. How-ever, most of them could not work well in scenarios withhighly concurrent flows. For example, in DCTCP, the exper-imental results show that when the number of senders is solarge that a sender’s congestion window is smaller than t-wo packets in the Incast communication pattern, some flowswill suffer packets dropping or even timeouts [7]. Highly

Page 3: TFC: Token Flow Control in Data Center Networksnns.cs.tsinghua.edu.cn/paper/eurosys16_jz.pdf · Keywords Data Centers, Flow Control, Low Latency, Rare Loss, Fast Convergence 1. Introduction

concurrent flows widely exist in today’s data centers. Lotsof services in data center networks are completed by a largenumber of cooperated servers based on the parallel comput-ing frameworks, such as MapReduce [16] or Storm [4]. Forexample, both Google and Microsoft report that each inter-active web-search service consists of 10s-1000s of serverson average [12, 35]. Thus, many servers will synchronous-ly transmit data to the same server in data center networks.Therefore, it is desirable to design a transport protocol withzero packets dropping even there are massive concurrentflows.

Low Latency. Large latency brings great negative impacton the profits of cloud service providers. Microsecond com-puting has been identified as a great challenge that hampersthe development of highly responsive, massively scaled datacenters [3]. Many cloud services are conducted using dis-tributed realtime computation systems, such as Storm [4].Network latency is a substantial component of the coordina-tion delay in the computing frameworks. Besides, in interac-tive applications such as web services, a HTTP request willgenerally trigger several hundreds of internal requests in da-ta centers. For example, a Facebook HTTP request will trig-ger an average of 130 internal requests inside the Facebooksite [10]. The internal requests are sequentially dependent,which causes a large cumulative latency. Thus, reducing thenetwork latency is critical to decrease the response time ofservices. Network end-to-end latency could be reduced fromdifferent perspectives, including packet processing delays inthe OS stack, network interface card and network switches,and delays caused by network congestion [29]. In data centernetworks, the round trip delay is extremely low, typically onthe order of a few hundred microseconds [36]. In contrast,queueing delay could be quite large [7]. Thus, keeping zero-queueing is a desirable requirement of transport protocolsto reduce the network congestion delay to the extreme extentin data center networks.

3. Basic Idea and Challenges3.1 Basic IdeaBroadly, the existing transport control protocols could beclassified into window-based or rate-based approaches.Window-based solutions offer many advantages, such asdata-driven clocking and inherent stability [33]. In contrast,rate-based protocols are harder to be implemented since cor-rectly using timer to control rate is non-trivial [33]. Fromanother perspective, current transport protocols could alsobe classified into explicitly allocating bandwidth by net-work devices or implicitly probing available bandwidth atend hosts. However, due to limited information at each host,implicitly probing bandwidth hardly meets the goals of fastconvergence, zero-queueing and rare packets loss. There-fore, we will design an explicit window-based transport con-trol protocol for data center networks in this work.

There are some typical explicit window-based transportprotocols [17, 23]. Unfortunately, the convergence rate ofthem are not fast enough [40] since they rely on windowevolution round by round to achieve fairness and efficien-cy. Also, they hardly achieve zero-queueing and rare packet-s loss in various scenarios since the evolved window feed-back is possibly not accurate. In history, there is a well-known credit-based flow control mechanism designed forATM networks [26], which can achieve rare packets drop-ping by strictly controlling that a receiver can notify a senderto transmit a certain amount of traffic only when the receiv-er has the corresponding space (credit) to accommodate thetraffic. However, it could not achieve zero buffering.

Enlightened by the previous explicit transport protocolsand the credit-based flow control mechanism, we aim to de-sign a transport control protocol that satisfies the above threegoals by obtaining the flow pipeline capacity without bufferspace (credit) and then explicitly allocating the capacity topassing flows. In this way, first, since the total credit value tobe allocated does not include the buffer space, there will beno queuing delay. Second, since each sender will inject traf-fic strictly according to the obtained credit value and no moretraffic will be gradually increased like implicit transport pro-tocols, rare packets dropping can be achieved. Third, if aswitch could obtain the exact flow pipeline capacity withoutbuffer space, then a flow will get its proper window in oneround. Thus, fast convergence can be satisfied.

However, how to exactly measure the flow pipeline ca-pacity without buffer space, the number of passing activeflows, and how to deal with the work-conserving problemand highly concurrent flows are extremely challenging.

3.2 ChallengesExcluding buffer space from the flow pipeline capacity.Implicitly probing appropriate window size for flows, liketraditional TCP, usually treats the buffer space as part ofthe flow pipeline. More and more packets will be injectedto the network until some packets are dropped or the queuelength exceeds a threshold. To guarantee zero-queueing andhigh link utilization, the ideal congestion window size isc×RTT and the buffer only needs to absorb the bursts with-in a round. However, in practice the buffer space is usuallyan order larger than c×RTT . The packets in buffer only in-crease the round trip time which harms the responsiveness ofcongestion control. Thus, the flow pipeline capacity withoutbuffer space is the resource that we want to allocate to eachsender. HULL [8] probes the flow pipeline without buffer s-pace by constructing phantom queues. However, it sacrificesabout 10% of bandwidth. Since most switches along a pathhas their own buffer space, without the whole path informa-tion, it is challenging to exactly know the capacity of theflow pipeline without buffer space. What’s more, the flowpipeline capacity varies for flows with different RTTs. Thus,for a switch that accommodates different kinds of passing

Page 4: TFC: Token Flow Control in Data Center Networksnns.cs.tsinghua.edu.cn/paper/eurosys16_jz.pdf · Keywords Data Centers, Flow Control, Low Latency, Rare Loss, Fast Convergence 1. Introduction

flows, learning the flow pipeline capacity without buffer s-pace is also challenging.Accurately estimating the number of flows. Estimating thenumber of flows by counting the flow handshaking messages[37] will cause cumulative errors, e.g., once a SYN packet islost, then the retransmission will cause a switch count twicein the path before the packet loss location. Besides, the flowsthat do not send messages could not be excluded. Anotherexisting method estimates the number of flows accordingto historical information, such as using the result of thelink capacity dividing the allocated flow rate in last timeslot. However, under this method, only the bottleneck switchcan obtain the correct number of flows. As a result, theconvergence to efficiency process is slow [40]. Therefore,we need to design a novel method to accurately estimate thenumber of active flows during each round.Work-conserving. Two main scenarios will cause the work-conserving problem. First, at a switch, a flow injects lesstraffic than the allocated value by the switch since the flowobtains less bandwidth at another switch. This is commonin topologies with multiple bottlenecks. Second, some flowswill not send any traffic even if they are allocated somebandwidth. Thus, the bandwidth allocated to these silentflows should be taken back and allocated to other activeflows. How to adapt to these scenarios that will cause thework-conserving problem and do not waste bandwidth ischallenging.Window of less than one. Due to the small round trippropagation delay and highly concurrent flows in data centernetworks, it is likely that congestion will happen even ifeach flow only injects one MSS sized packet. Many existingtransport protocols could not well deal with this problem[7, 37]. Thus, it is challenging to avoid dramatical packetsdropping when the congestion window of one flow becomesless than one MSS.

4. Design of TFCIn this section, we will first describe a basic abstract model,then present how to design TFC based on the basic abstractmodel to achieve high link utilization, fast convergence,zero-queueing and rare packets loss.

4.1 Basic ModelIn TFC, we define two concepts, Token and the Numberof Effective Flows, to represent the total resource and con-sumers in a time slot, respectively. The time slot period t isset to an arbitrary value here, and the proper value will bediscussed in 4.3.

Token T [n]. T [n] represents how many data can betransmitted by a link in time slot n(n = 0, 1, ...). T [n] canbe computed as c× t, where c is the link bandwidth and t isthe duration of a time slot. Token represents the bandwidthresource provided by a link in a time slot.

S1 S2c

token=c*t

f1

f2 Data pkt!

" #$

f1

f2

Ne=3

W=2

Ne=3

W=2

Ne=3

W=2

Assume token = 6 pkts

time

time

Figure 1: Illustrating the basic model of TFC. Two flows, f1and f2, passing port A. Assume rtt1 = 2 × rtt2 and thetoken value is 6 packets. Since there are three effective flowsin a time slot, the congestion window is 2 packets for eachflow.

Number of effective flows E[n]. E[n] stands for thenumber of full windows of data packets injected by all thepassing flows in time slot n. Effective flows can be consid-ered as the consumer of the bandwidth resource. Effectiveflows are active. Considering that some flows possibly donot transmit any data during some time, inactive flows needto be excluded when counting the number of consumers. Forexample, many flows transmit data intermittently in Stormsystem [34]. Thus, during the silent time, the flows are noteffective.

We only consider the basic objective of fair bandwidthshare with RTT bias, that is, we allocate an equal windowto every flow passing the same port of a switch. Then thenumber of consumers should equal the number of the roundsof all the flows in a time slot. Next, we will show how TFCjust allocates tokens to all senders no matter how long a timeslot is. Formally, denote f as the ID of arrival flows in timeslot n and rttf as the RTT of flow f , then we have

E[n] =∑f

t

rttf(1)

Once we have obtained the token value, T [n], and thenumber of effective flows, E[n], we can compute the con-gestion window of each flow during next time slot

W [n+ 1] =T [n]

E[n](2)

Figure 1 gives a simple example to illustrate the basic ideaof TFC. At port A of switch S2, the passing flows includef1 and f2. The link bandwidth connecting to port A is c.Assume the round trip time of f1 is twice of that of f2, thatis, rtt1 = 2×rtt2. Besides, assume the time interval t equalsrtt1 and the tokens equal c × t = 6 packets. During a timeslot, flow f1 injects 1 full window of data packets and flowf2 injects 2 full windows of data packets. Thus, the numberof effective flows equals 3 and the congestion window is 2.The tokens can be exactly exhausted.

Page 5: TFC: Token Flow Control in Data Center Networksnns.cs.tsinghua.edu.cn/paper/eurosys16_jz.pdf · Keywords Data Centers, Flow Control, Low Latency, Rare Loss, Fast Convergence 1. Introduction

The basic model guarantees fast convergence since thenumber of effective flows is updated every time slot andeach active flow can obtain its proper congestion windowafter one time slot. Besides, since the total arrival ratesof all the flows in time slot (n + 1) is

∑f

W [n+1]rttf [n+1] =∑

f1

rttf [n+1]c∑

i1

rtti[n]

. Thus, as long as the RTT of each

flow keeps stable in time slot n and slot (n + 1), then thetotal injected traffic rate equals the link capacity c, whichensures full link utilization.

4.2 Measuring the Number of Effective FlowsIn TFC, switches explicitly assign congestion window foreach passing flow. The minimum congestion window alongthe path of a flow will be carried back to the sender by ACKs.1. According to Eq. (2), switches need to determine theaccurate number of effective flows in a time slot to computethe congestion window, that is, switches need to know thenumber of full windows of data packets injected by all theflows in a time slot.

There are several possible methods. First, each flow send-s a special packet during each round. Switches measure thenumber of special packets in a time slot to acquire the num-ber of effective flows. However, this method brings largecommunication overhead. For example, if each round lastsfor about 100 microseconds, 50 flows pass a switch and eachspecial packet takes 64 Bytes (the minimum Ethernet framesize), then the bandwidth taken by the special packets alonga path with 1 Gbps rate is about 50× 64×8

1Gbps×100us = 25.6%.Second, recording the total arrival traffic amount in time slotn, A[n]. The number of effective flows in time slot n, E[n],can be computed as A[n]

W [n−1] . However, the congestion win-dow of a flow equals the minimal congestion window alongthe path. Thus, only the bottleneck switch maintains correctcongestion window of last time slot W [n− 1] and could getaccurate number of effective flows in this way.

In TFC, we combine the advantage of above two meth-ods. That is, each sender marks one specific packet duringeach round instead of sending an extra packet. Then switch-es could obtain the number of effective flows by countingthe number of marked packets. By this method, no per-flowstate is needed to get an accurate E in TFC and there is nowasted bandwidth for the measuring.

As shown in Figure 2, in time slot n − 1, flow f2 injectstwo windows of data packets, and flow f1 is being estab-lished. According to the number of the marked data packetsand marked SYN packet, we can infer that the number ofeffective flows E[n − 1] = 3. According to the duration ofone time slot, t, and the link capacity c, we can compute thetokens in a time slot. Suppose T [n−1] = 6 packets, then thecongestion window during next time slot W [n] = 2 packet-s. Similarly, in time slot n, the number of effective flows is

1 This may cause work-conserving problem which existing schemes like[37] also have to solve. We solve it by the token adjustment mechanismdescribed in 4.5

S1 S2 c

token=c*t

f1

f2

Data pkt

!

" #$

f1

f2

Ne[n]=3

TK[n] =6

W[n+1]=2

Marked pkt

time

time

x

x

Slot n

x x

Ne[n+1]=2

TK[n+1] =6

W[n+2]=3

x xx x

x

x Marked SYN

Slot n-1 Slot n+1Ne[n-1]=3

TK[n-1] =6

W[n]=2

Figure 2: Framework of TFC. Senders mark the first packetof each full window of data packets to facilitate switches tomeasure E.

still E[n] = 3, thusW [n+1] = 2 packets. However, in timeslot (n+1), flow f1 does not send data packets due to somereasons, such as the flow has finished or the correspondingapplication does not have data to send. Thus, E[n + 1] be-comes 2, and the congestion window is 3 packets.

The method of determining E[n] in TFC has several ad-vantages. First, it excludes inactive flows. In practice, it ispossible that some flows are inactive for a while intermit-tently after establishment. Using marked packets to countthe number of effective flows can ensure switches quicklyknow the flows variations and compute the proper conges-tion window size. Second, it avoids cumulative errors. Us-ing handshaking packets is a simple method of counting thenumber of flows [37]. However, if a SYN packet is lost af-ter it is counted, the retransmission will cause accumulatedcounting error of flow number. In our method, the numberof effective flows in time slot n is irrelative to the previousmeasured value. Thus, even if the number of effective flowshas some deviations in a time slot, accurate number of effec-tive flows still could be obtained in afterwards time slots.

4.3 Duration of a Time SlotTheoretically, the duration of a time slot, t, in the basic mod-el of computing the congestion window could be any values.Besides, the duration of different time slots could change.However, in practice, we need to determine a proper value toallow end users quickly converge to their appropriate band-width. Also, the duration of a time slot should not affect theaccuracy of counting the number of effective flows in a timeslot.

On one hand, the duration of one time slot should not betoo large. Otherwise, once some new flows arrive, or someexisting flows finish or become inactive, switches could notupdate the congestion window according to the new numberof effective flows. Thus, TFC could not achieve the require-ment of fast convergence.

On the other hand, the duration of one time slot should notbe too small. Otherwise, the number of effective flows will

Page 6: TFC: Token Flow Control in Data Center Networksnns.cs.tsinghua.edu.cn/paper/eurosys16_jz.pdf · Keywords Data Centers, Flow Control, Low Latency, Rare Loss, Fast Convergence 1. Introduction

fluctuate dramatically. For example, in the scenario shownin Figure 1, if the duration of a time slot t = rtt1, then themeasured number of effective flows is 3, which equals thetheoretical result t

rtt1+ t

rtt2= 3. If the duration of a time

slot t = rtt2, then the measured number of effective flowsbecomes 1 and 2 alternatively. The average of the measuredvalues of two adjacent time slots equals the theoretical resultt

rtt1+ t

rtt2= 1.5. However, if the duration of one time slot is

smaller than rtt2, then during some time slots, the number ofeffective flows will vary among 0, 1, and 2. If the measurednumber of effective flow is 0, then we could not compute thecongestion window value.

Thus, to make a tradeoff between fast convergence andaccuracy of estimating the number of effective flows, theduration of a time slot is set to one RTT of a flow. InTFC, the marked packets in each round make switches couldeasily measure the RTT of any flows. A switch only needs tomeasure the interval of two marked packets belonging to thesame flow to obtain the RTT value of the flow.

Then which flow should be chosen to measure the dura-tion of a time slot? Choosing the flows with smaller RTTlead to quicker response to flow variation, while choosingthe flows with larger RTT results in more accurate measurednumber of effective flows. To answer this question, we firstinvestigate the RTT values of different kinds of flows in datacenter networks.

The typical topologies in data center networks are 3-layer,multi-rooted trees with single or multiple paths between twoend servers. In the tree-based topologies [6, 19], generallythere are at most three kinds of connections between a pairof servers. One is intra-rack connections, one is cross-rackconnections passing core switches, and the last one is cross-rack connections only passing edge and aggregation switch-es, but not passing core switches. The RTT value of a flowis mainly consisted of processing delay at end hosts, linkpropagation delay, and store-and-forward delay at switches.Thus, the maximum round trip time of a flow is at most threetimes of the minimum value in data center networks, even ifRTT is dominated by transmission delays. 2 This indicatesthat the impact of using which flow’s RTT on the perfor-mance of TFC is quite small. Besides, if a specific kind offlows is chosen, the implementation of switches will becomemore complex since they have to identify different kinds offlows and measure the RTT of the specific kind of flows. Al-so, it is possible that not all the kinds of flows will pass aswitch. Based on these reasons, the duration of a time slot isdetermined as the RTT of any flow in TFC. The selected flowto indicate the duration of a time slot is called the delimiterflow.

2 Actually, the maximum RTT is about twice of the minimum value in ourtestbed.

4.4 Decoupling E[n] and T [n]The obtained RTT value by measuring the interval of twomarked packets is related with the queueing delay. However,to keep zero-queueing, the queueing delay should be elim-inated. Otherwise, larger RTT leads to larger token value,while the number of effective flows during the measured RT-T does not change. Correspondingly, the congestion windowof each flow increases, which will further increase the queuebuildup. Thus, the duration of a time slot used to computethe tokens T [n] and the interval of measuring the numberof effective flows E[n] should be decoupled. The RTT ofa flow without queueing delay should be used to computeT [n], while the instantaneous RTT of a flow should be usedto count the number of effective flows E[n].

Then how to get the RTT of a flow without queueing de-lay? Each switch can only know whether itself has queueingdelay, but it could not know the queue length of other switch-es along the path. Thus, switches at TFC use the minimumof the measured RTT values as the RTT of a flow withoutqueueing delay. Note that in store-and-forward switches, themeasured RTT value may be different for packets with dif-ferent size. Thus, only the marked packets with frame lengthlarger than 1500 Bytes are used to measure RTT in TFC.

Let rttim represent the measured instantaneous RTT valueof flow i. Besides, rttm and rttb stand for the instantaneousRTT value and the minimum measured RTT value of the de-limiter flow in TFC. Then the congestion window algorithmof TFC becomes

T [n] = c× rttb[n] (3)

E[n] =∑i

rttm[n]

rttim[n](4)

W [n+ 1] =c× rttb[n]E[n]

(5)

In this way, the summation of the arrival rate of all flowsbecomes

∑i

ri[n+ 1] =∑i

Wi[n+ 1]

rttim[n+ 1]

=∑i

1

rttim[n+ 1]

c× rttb[n]rttm[n]∑

j1

rttjm[n]

(6)

In statistics∑

i1

rttim[n+1] =∑

j1

rttjm[n]. On the other hand,

rttb[n] ≤ rttm[n] is always true. Consequently, the totalarrival rate of all flows do not exceed the capacity whichindicate that TFC has no consistent queueing. In this way,TFC can achieve zero-queueing.

4.5 Token AdjustmentThe link might be underutilized due to two main reasons.First, work-conserving problem. In topologies with multiple

Page 7: TFC: Token Flow Control in Data Center Networksnns.cs.tsinghua.edu.cn/paper/eurosys16_jz.pdf · Keywords Data Centers, Flow Control, Low Latency, Rare Loss, Fast Convergence 1. Introduction

bottlenecks, it is possible that a flow does not inject the traf-fic allocated by a bottleneck switch since another bottleneckswitch allocates a smaller congestion window. Second, sincethe RTT of a flow includes a random processing delay at endhosts, the minimum measured RTT value of a flow used tocompute the token value must be smaller than the averageRTT value without queueing delay of the flow. According toEq. (6), the link may be underutilized.

Therefore, to keep high link utilization as well as avoidbuffer backlog, at the end of time slot n, the token valueT [n] used to compute W [n+ 1] is adjusted according to thelink utilization in time slot n.

T [n] = c× rttb[n]×ρ0ρ[n]

(7)

where ρ0 is the expected link utilization and ρ[n] = A[n]c×rttm[n]

(A[n] is the arrival traffic during the instananeous round triptime rttm[n]). Furthermore, to keep stable link utilization,we use the moving average method to tolerate noisy points.

T [n] = α× T [n− 1] + (1− α)× T [n] (8)

where α is the weight of the history token value. By using thetoken adjustment mechanism, not only the work-conservingproblem is solved, the potential waste capacity caused byensuring zero-queueing is compensated.

4.6 Achieving Rare Packets LossIn data center networks, traffic bursts are likely to causea large number of packets dropping. To achieve near zeropacket loss, TFC adds a window acquisition phase and de-liberately deals with the issue that the congestion window ofone flow is smaller than MSS.

Traffic Bursts. Note that we do not allocate window atthe establishment phase since the new arriving flows arenot counted in the current congestion window computation.Assume that the SYN packet of a new flow arrives at aswitch at time slot n. Then at the end of time slot n, theswitch will update the number of effective flows E[n] andW [n + 1]. Thus, the flow needs another round to take backthe new congestion window W [n + 1]. Therefore, in TFC,a flow will send a marked packet without any payload afterthe flow establishment phase to take back proper congestionwindow. In this way, the packets dropping caused by newarrival highly concurrent flows can be avoided.

Window of Less Than One Packet. When the numberof senders is quite large, congestion will happens even ifeach sender only sends one packet. Most of prior work failsto properly deal with this issue [7, 35, 38]. However, thissituation is common in large-scale data centers. There is asimple solution to the problem, that is reducing MSS at thetransport layer. However, the overhead caused by packetsheader will become quite large as the MSS decreases. Oneother method is that source i sends one packet every MSS

Wi

RTTs. However, to implement this solution, RTT needs to be

exactly estimated and a high resolution timer to count RTTWi

is required. Using high resolution timer to control everypacket will incur lots of interruption.

TFC solves this problem at switches enlightened by thetraffic shaping mechanism, token bucket algorithm. Eachswitch maintains a counter for a port, which represents howmany data can be sent. The counter will increase as timeelapses. On a marked ACK packet arrival, if the carriedcongestion window is smaller than a packet and the countervalue is larger than a packet, then the carried congestionwindow in the ACK header will be modified to one packetand the counter decreases by a packet. Otherwise, the ACKwill be put into a delay queue to wait for a large enoughcounter. If the arrival ACK carries a congestion window thatis larger than a packet, then it will be directly sent out andthe counter subtracts the congestion window carried by theACK packet. In this way, the number of flows that transmitspackets during each time slot will not exceed the token value.Therefore, near zero-queueing as well as high goodput canstill be achieved.

5. ImplementationWe implemented the end host part of TFC in GNU/Linuxkernel 2.6.38.3. Only the header and the congestion controlmechanism are modified. The TFC header is similar to theTCP header except that it uses two reserved bits in the flagsfield to mark the first packet in each full window of packetsand its ACK. The two marked bits are respectively named asRM (Round MArk) and RMA (Round MArk Acknowledg-ment). The switch part is implemented in NetFPGA [1].

5.1 SenderDuring the establishment phase, the sender and receiver ne-gotiate whether to use TFC or not. Then at the data trans-mission phase, the sender sets the RM bit in the TFC headerof the first data packet to 1. After receiving a RMA markedpacket, the sender sets the RM bit in the TFC header of thenext sending data packet to 1. In this way, the first packet ofeach round has the RM indicator. TFC uses the window fieldin the packet header to carry the congestion window. Beforetransmitting a data packet, the sender modifies its windowfield to be 0xffff as the initial window value.

After receiving a RMA marked packet, the sender deter-mines its congestion window according to the window valuecarried in the ACK header.

5.2 SwitchThe functions of switches mainly include computing tokens,measuring the number of effective flows, and updating con-gestion windows. Figure 3 depicts the implementation struc-ture. A TFC switch uses 58% more logic slices (from 12807to 20235) than the reference switch of NetFPGA project.49.2% of the overhead is due to the use of divider. We usetotally 8 dividers (each port holding two, one for window

Page 8: TFC: Token Flow Control in Data Center Networksnns.cs.tsinghua.edu.cn/paper/eurosys16_jz.pdf · Keywords Data Centers, Flow Control, Low Latency, Rare Loss, Fast Convergence 1. Introduction

Input Arbiter

Output Queues

Output Port Lookup

RTT TimerFIFO

Header Parser

Header Modifier

N Counter Rho Counter

Window Calculator

Token Allocator

Queue 1

Queue 2

Queue 3

Mux

Delay Arbiter

Delay QueueNormal Queue

Queue 0

Data Path Control Path

Figure 3: Implementation structure of TFC switches onNetFPGA. Packets are forwarded through the data path, andthe control path forwards signals to trigger correspondingmodules.

computation and the other for token adjustment). Throughmultiplexing, this number could then be reduced to 1. Thus,the optimized implementation of the TFC switch will intro-duce about 30% more logic usage compared to the referencedesign.

Init: Set rttb = 160 us, E = 1. Catch the first RM datapacket, record its five tuples as the delimiter flow, and recordthe current time tstart = tnow. Set the total arrival trafficA = 0.

Event 1: On a data packet arrival, add the length ofthe data packet to the total arrived traffic A (Rho CounterModule). If the packet has the RM mark and does not belongto the delimiter flow, E++ (N Counter Module). Else ifthe RM data packet belongs to the delimiter flow, computecurrent round trip time rttm = tnow − tstart and updaterttb = min{rttb, rttm} (RTT Timer Module), computethe link utilization during the current round trip time (RhoCounter Module), adjust the token value according to eq.(7) and compute the congestion window W = T

E (WindowCalculator Module). Let E = 1 and tstart = tnow.

Event 2: On an ACK packet with a RMA mark arrival,if the carried congestion window is less than MSS, it will bedelayed according to the algorithm described in Section 4.6(Delay Arbiter Module).

When the current delimiter flow ends. If the curren-t delimiter flow ends, then switches will never catch a RMmarked packet with the same five tuples of the current de-limiter flow and thus the congestion window will never beupdated. In TFC, the FIN packet and a timer are used to solvethis problem. If a FIN packet is received or 2k × rttlast has

NF0

H1

NF3NF1 NF2

H2 H3 H4 H5 H6 H7 H8 H9

Figure 4: Testbed.

1 2 3 4

f1

f2

F3

S1 S2

Figure 5: Work-conserving s-cenario.

past (k is the miss times) and no boundary RM flow comes,TFC will catch another proper RM packet as the new delim-iter flow. Thus, at the first time, a new RM will be catchedafter 2 × rttlast; at the second time, a new RM packet willbe catched after 4×rttlast, and so on. The maximum k is setto 7. The function is implemented in the RTT Timer Module.

5.3 ReceiverAfter receiving a data packet with a RM mark, the minimumof the advertised congestion window size, awnd, at the re-ceiver and the window value carried in the header of the RMdata packet is assigned to the window field of the correspond-ing ACK header. Besides, the RMA bit in the ACK header isset to 1.

6. Evaluation6.1 Small-Scale Experiment6.1.1 Experimental SetupThe performance of TFC is evaluated in a small testbedas shown in Figure 4. The testbed is consisted of 4 NetF-PGA boards and 9 servers. Each server is a DELL Opti-Plex 360 desktop with Intel 2.93 GHz dual-core CPU, 6 GBDRAM, 300 GB hard disk, and Intel Corporation 82567LM-3 Gigabit Network Interface Card. The operating system isCentOS-5.5. Each NetFPGA board hosting in a DELL serverhas a buffer of 256 KB per port and four 1 Gbps ports.

The performance of TFC is evaluated in different scenar-ios and is compared with TCP NewReno and DCTCP. Thethreshold of marking packets, K, is set to 32 KB in DCTCPand the weighted averaging factor, g, is set to 1/16 as rec-ommended in [7]. The parameter of TFC, ρ0, is set to 0.97,α is set to 7

8 .The performance evaluation mainly includes four parts.

First, the mechanisms of measuring the token value and Ne

are evaluated to check whether the measured results are ac-curate. Second, the basic performance of TFC is evaluatedusing a series of micro-benchmarks. Third, we evaluate TFCusing the benchmark traffic generated from the measured da-ta in [7]. Finally, large-scale ns-2 simulations are conductedto validate that TFC can work well in large-scale topology.

6.1.2 Experimental ResultsAccuracy of Measuring rttb and Ne. First, a series ofexperiments are conducted to validate that TFC is able toobtain relatively accurate rttb and Ne.

Page 9: TFC: Token Flow Control in Data Center Networksnns.cs.tsinghua.edu.cn/paper/eurosys16_jz.pdf · Keywords Data Centers, Flow Control, Low Latency, Rare Loss, Fast Convergence 1. Introduction

40 60 80 1000

0.5

1

RTT (us)

CD

F

Measured RTTb

Referenced RTT

Figure 6: Measured rttb.

0 10 204

6

8

10

12

14

Time (second)

Ne

Measured Ne

Referenced Ne

Figure 7: Accuracy of Ne with inactiveflows.

0 5 100

100

200

300

Time (s)

Queue L

en (

KB

)

TFC

DCTCP

TCP

Figure 8: Queue length.

0 2 4 6 8 10 120

200

400

600

800

1000

Time (s)

Go

od

pu

t (M

bp

s)

flow 1

flow 2

flow 3

flow 4

(a) TFC

0 2 4 6 8 10 120

200

400

600

800

1000

Time (s)

Go

od

pu

t (M

bp

s)

flow 1

flow 2

flow 3

flow 4

(b) DCTCP

0 2 4 6 8 10 120

200

400

600

800

1000

Time (s)

Go

od

pu

t (M

bp

s)

flow 1

flow 2

flow 3

flow 4

(c) TCP

Figure 9: High Goodput and Fairness.

6.02 6.03 6.04 6.05 6.06 6.07100

200

300

400

500

600

Time (s)

Go

od

pu

t (M

bp

s)

flow 1

flow 2

flow 3

(a) TFC

6.02 6.03 6.04 6.05 6.06 6.07100

200

300

400

500

600

Time (s)

Go

od

pu

t (M

bp

s)

flow 1

flow 2

flow 3

(b) DCTCP

6.02 6.03 6.04 6.05 6.06 6.070

200

400

600

800

1000

Time (s)

Go

od

pu

t (M

bp

s)

flow 1

flow 2

flow 3

(c) TCP

Figure 10: Convergence rate.

First, hostsH1 andH2 send 2 long-lived flows to hostH3,respectively. rttb is measured at the interval of 1 second, thatis, rttb is set to the minimum of the measured rttm during 1second. Besides, we let host H1 send one packet with MTUof 1500 Bytes to H3 per round trip time and get referencedrtt values. Figure 6 shows the CDF of the measured rttband the referenced rtt. It shows that the measured rttb isaround 59 microseconds, while the referenced rtt is about65 microseconds. This is because the round trip time of aflow varies due to random processing time at end hosts. Themeasured rttb does not include the random processing delay.However, we can see that the difference between rttb andthe referenced rtt is relatively constant. Thus, we could usethe token adjustment mechanism to get the precise value oftokens.

Then we let hosts H1 and H4 set up n1 and n2 flowsto host H6. Switch NF2 measures the number of effectiveflows at the port connecting to host H6. The delimiter flowof counting Ne is a flow sent from host H4. To investi-gate whether the method can exclude inactive flows, we letn2 = 5, and n1 gradually increase from 1 to 10 and thengradually become inactive at the interval of 1 second. Fig-ure 7 depicts the measured number of effective flows. Themeasured value is sampled every 0.1 second. The round triptime of flows from hostH1 is about 1.5 times of the delimiterflow from hostH4 according to our experimental data. Thus,the expected number of effective flows is n1

1.5 +n2 accordingto eq. (1). The plotted results show that the measured Ne isquite close to the computed value. Also, the variance of thesamples is small.

Page 10: TFC: Token Flow Control in Data Center Networksnns.cs.tsinghua.edu.cn/paper/eurosys16_jz.pdf · Keywords Data Centers, Flow Control, Low Latency, Rare Loss, Fast Convergence 1. Introduction

0 10 20900

910

920

930

940

950

Time (s)

Go

od

pu

t (M

bp

s)

S1

S2

(a) Goodput

0 10 200

2

4

6

Time (s)

Qu

eu

e L

en

(K

B)

S1

S2

(b) Queue

Figure 11: Work-conserving.

High Goodput. Let hosts H1 and H2 establish 2 flowsto host H3 at the interval of 3 seconds, respectively. Figure9 draws the goodput curves of different flows. The goodputvalues are sampled every 20 milliseconds. The results indi-cate that all of TFC, DCTCP and TCP are able to fully utilizethe bottleneck bandwidth. In terms of fairness among flows,TFC flows fairly share the whole bandwidth even if in smalltimescale, while the goodput of TCP flows is quite unstable.DCTCP performs much better than TCP since it avoids largenumbers of packets loss by limiting the queue length.

Zero Queueing. Figure 8 shows the queue length varia-tion with different mechanisms in the above scenario. At thefirst 3 seconds, all the three mechanisms have zero queuelength since one flow does not accumulate data packets. Af-terwards, TFC indeed achieves near zero queueing delay.Several instantaneous queue length is a little large, but themaximum queue length is only about 9 KBytes. DCTCP lim-its the queue length at about 30 KBytes. TCP flows fill up thewhole buffer and the queue length is about 256 KB.

Fast Convergence. To investigate the convergence ratein detail, we amplify the goodput curves from the start offlow 3 in Figure 10. TFC flows converge to the expectedgoodput quite quickly since they can get their fair share ofbandwidth in one round. In DCTCP, flow 3 spends about 20microseconds to converge to the fair share. While most ofshort flows in data centers can be finished in 10 milliseconds[7]. TCP flows hardly converge to the fair share in a shorttime.

Work-Conserving. To validate that TFC does not havethe work-conserving problem, we conducted experiments inthe topology as shown in Figure 5. we let host 1 initiate n1flows to host 4 and n2 flows to host 3. Host 2 sends n3 flowsto host 3. Therefore, two bottleneck links form. One is theuplink connecting switch S1, the other one is the downlinkconnecting S2. Let n1 = 8 and n2 = n3 = 2. The goodputof each flow is sampled and the queue length variation atthe bottleneck ports is measured. Since switch S2 allocateshigher congestion window to n2 flows than S1 does, thelink of S2 could not be fully utilized if the work-conservingproblem happens. Figure 11 shows the aggregated goodputand queue length variation at switches S1 and S2. BothS1 and S2 achieve high goodput, which indicates that TFCdoes not suffer the work-conserving problem. Note that the

0 50 1000

500

1000

Number of Senders

Goodput (M

bps)

TFC

DCTCP

TCP

(a) Goodput

10 20 30 40 50 60 70 80 901000

100

200

Number of Senders

Queue L

en (

KB

)

TFC

DCTCP

TCP

(b) Queue

Figure 12: Incast: goodput and queue length.

goodput of S1 is a little smaller than S2. This is becauseeach flow has the same congestion window and flows n3pass fewer hops than flows n2. Thus, the goodput of flows n3is a little larger than flows n2. Figure 11b shows the queuelength variation at S1 and S2. We can see that the queuelength varies around 2 KB, which is about one packet. TFCachieves near-zero queueing.

Bursty Fan-in traffic. The incast communication pat-tern likely causes throughput deterioration due to the fan-in bursts. We generate the Incast traffic according to thedescription in previous work [36]. A receiver requests da-ta blocks to a certain number of senders. The senders syn-chronously respond data blocks to the receiver. The receivercould not request the next round data blocks until it receivesall the current transmitted data blocks. In our experiment,the block size is 256 KB. The receiver requests data block-s to all the senders for 1000 times. Figure 12a depicts thegoodput with different number of senders in the incast com-municaiton pattern. Note that a server possibly acts as sev-eral senders in the experiment since the number of physicalservers is limited in our testbed. We can see that the goodputof TFC with different number of senders is about 800-900Mbps. DCTCP achieves high goodput when the number ofsenders is smaller than 50 and suffers goodput collapse as thenumber of senders is more than 50. TCP exhibits the worstperformance. Its goodput decreases dramatically as the num-ber of senders is larger than 10.

Figure 12b draws the average and maximum queue lengthvs. the number of senders. TFC almost has no buffer back-log. The maximum queue length of TCP is close to the bufferlength per port, 256 KB, since the window decrease of TCPis loss-driven. The average and maximum queue length ofDCTCP is smaller than 100 KB and 200 KB when the num-ber of senders is smaller than 40, respectively. However, asthe senders increase, the queue length of DCTCP is similarto TCP.

Benchmark. To evaluate the performance of TFC withmore realistic workload. We conducted experiments in thesmall testbed shown in Figure 4. First, we generated realis-tic traffic, including query, short messages and backgroundflows, based on the cumulative distribution function of theinterval time between two arrival flows and the probabilitydistribution of background flow sizes in [7]. The distribution

Page 11: TFC: Token Flow Control in Data Center Networksnns.cs.tsinghua.edu.cn/paper/eurosys16_jz.pdf · Keywords Data Centers, Flow Control, Low Latency, Rare Loss, Fast Convergence 1. Introduction

Mean 95th 99th 99.9th99.99th10

0

101

102

103

104 0.2s →

FC

T (

us)

TFC

DCTCP

TCP

(a) Query flows

100

105

<1KB

1−10KB

10KB−100KB

100KB−1MB

1−10MB>10MB

99

.9th

F

CT

(u

s)

TFC

DCTCP

TCP

(b) Background flows

Figure 13: FCT of flows.

0.90 0.92 0.94 0.96 0.98 1.00

500

1000

ρ0

Go

od

pu

t (M

bp

s)

(a) Goodput

0.90 0.92 0.94 0.96 0.98 1.00

2

4

6

ρ0

Queue L

en (

KB

)

(b) Queue

Figure 14: Impact of ρ.

curves are gotten based on a large amount of measured datafrom 6000 servers in a real data center network [7]. The sizeof each query message is 2 KB. Then servers in the smalltestbed transmit data according to the time interval and flowsize in the generated traffic.

Figure 13a depicts the flow completion time of queryflows. The average and tail flow completion time under T-FC is much smaller than DCTCP and TCP. Especially, the99.99th percentile flow completion time of TCP is quitelarge since some flows suffer timeouts. Figure 13b showsthe flow completion time of background flows. TFC flowsthat are smaller than 10KB finish quickly than DCTCP andTCP. While other flows finish a little slower than DCTCP.This is because the link capacity is constant. Query flowstake more bandwidth. Thus some background flows use lessbandwidth.

Parameters. Hosts H1-H5 establishes a flow to host H6,respectively. Let ρ0 vary from 0.9 to 1.0. Figure 14 depictsthe goodput at the receiver and the queue length at theport connecting to host H6. We can see that the goodputat the receiver matches the expected link utilization, ρ0. Asρ0 increases from 0.90 to 1.0, the goodput of the receiverincreases from 880 Mbps to 940 Mbps. The packet headertakes the additional bandwidth. Figure 14b shows that onlyless than 1 KBytes queue length exists when ρ0 < 0.98.This small queue length is unavoidable due to the storeand forward process at switches. When ρ0 is larger than0.98, the queue length gets larger. Especially when ρ0 =1.0, the average queue length becomes about 6 KB. This isbecause the instantaneous round trip time rttm varies, if theexpected link utilization is 100%, possibly some packets willbe accumulated in the buffer if the current round trip time issmaller than the average round trip time.

0 200 4000

5

10

Number of Senders

Thro

ughput (G

bps)

TFC−64KB

TFC−128KB

TFC−256KB

TCP−64KB

TCP−128KB

TCP−256KB

(a) Throughput

0 200 4000

0.5

1

Number of Senders

Max T

O p

er

Blo

ck

TFC−64KB

TFC−128KB

TFC−256KB

TCP−64KB

TCP−128KB

TCP−256KB

(b) Timeout

Figure 15: Incast communication pattern.

6.2 Large-Scale SimulationTo evaluate the performance of TFC in large-scale networks,TFC is implemented on the ns-2 platform and simulationsare conducted with higher bandwidth and larger number offlows.

6.2.1 Bursty Fan-in TrafficWe generate the Incast communication pattern in large-scalesimulation platform to emulate bursty fan-in traffic. Eachlink has the rate of 10 Gbps. The switch buffer size is 512KB. The synchronized block size is 256 KB. At start, thereceiver sends a request to all the senders, then each sendertransmits 256 KB data to the receiver. After successfullyreceiving the blocks from all the senders, the receiver willsend requests to all the senders for the next round of blocks.The simulation lasts for 2 seconds, and we analyzed theaveraged goodput, the total number of timeouts, and theinstantaneous queue length.

Figure 15a depicts the averaged throughput at the receiverwith different block size. The link utilization of TFC isalways around 90% with different number of senders, whilethe throughput of TCP dramatically decreases with morethan 50 senders. Note that the link utilization in both TFCand TCP is a little low when the number of senders is quitesmall. This is because the time used to transmit blocks isquite small. For example, if there is one sender and the datablock size is 256 KB, then the data only needs two rounds tofinish. However, the request sent by the receiver to notify allthe senders transmit data will waste a round. Thus, the linkcan not be used to transmit blocks all the time.

Figure 15b depicts the maximum timeouts suffered byone flow per block. In TFC, the number of timeouts is al-ways around zero no matter how many senders concurrent-ly transmit data blocks since TFC could achieve near-zeropacket loss. This explains why TFC achieves high through-put with different number of senders. While TCP flows suf-fer lots of timeouts. When the number of senders is largerthan 300, one block will suffer 0.8 timeout on average.

6.2.2 BenchmarkThe topology is similar to the real testbed as shown in

Figure 4 except that the number of leaf switches increases to18 from 3. And each leaf switch is connected to 20 servers.

Page 12: TFC: Token Flow Control in Data Center Networksnns.cs.tsinghua.edu.cn/paper/eurosys16_jz.pdf · Keywords Data Centers, Flow Control, Low Latency, Rare Loss, Fast Convergence 1. Introduction

Mean 95th 99th 99.9th99.99th10

0

102

FC

T (

ms)

TFC

DCTCP

TCP

(a) Query flows

100

105

<1KB1−10KB

10KB−100KB

100KB−1MB

1−10MB>10MB

TFC

DCTCP

TCP

(b) Background flows

Figure 16: Simulation: FCT of flows.

Each leaf switch and its connected servers constitutes a rack.Each leaf switch has 20 1Gbps downlinks to the servers and1 10Gbps uplink to the top switch. The latency of each linkis 20 us. Thus, the end-to-end round trip latency of 4 hops(inter-rack flows) is 160 us and the end-to-end round triplatency of 2 hops (intra-rack flows) is 80 us.

The benchmark workload is generated using the samemethod as that in the experiment. Figure 16a shows the flowcompletion time of different kinds of flows. On average, theflow completion time of one DCTCP query flow is about 30times more than one TFC flow, and one TCP query flow us-es about 8 times more time to finish than one DCTCP queryflow. Besides, the tail latency of TFC is quite small. How-ever, DCTCP and TCP suffer much high tail latency. This isbecause there are 360 servers in our simulation. One queryrequest will cause 359 servers transmit a query response tothe last server concurrently. This 359 concurrently flows like-ly overwhelm the bottleneck buffer under DCTCP and TCP.However, TFC can effectively deal with this high traffic burstdue to its delay function at switches.

Figure 16b depicts the flow completion time of back-ground flows. When the flow size is larger than 1 KB, T-FC performs a little worse. This is because TFC query flowsdo not suffer timeouts and thus they can take more band-width compared with DCTCP and TCP. While in DCTCPand TCP, a large number of timeouts suffered by query flowscause that query data could not fill network links all the time.Therefore, background flows can take more bandwidth.7. Related WorkData Center Transport Control. DCTCP[7] and D2TCP[35] follow the framework of TCP and leverage the ECNmarking scheme to keep the queue length low. However, theyare not responsive for short flows due to slow convergence.

D3 [37] allocate bandwidth to flows according to theirdeadline demand and distribute the rest fairly to every flow.However, D3 is a clean slate design which not only needspecialized switch, but also need to modify the application.Besides, D3 will lead to cumulative error in counting thenumber of flows.

Fastpass [31] uses a centralized arbiter to determine thetime at which each packet should be transmitted as well asthe path to use for that packet. However, the scalability of

Fastpass is limited by the centralized arbiter that needs todeal with all the packets.

There are several work use flow scheduling to optimizeflow completion time in data center [9, 11, 20, 21, 30].These work focus on the benefits of scheduling and uselegacy protocol or simple congestion control to simplifytheir design. While, TFC is a new which is orthometric tothem.

HULL achieves near zero buffer through phantom queue,while it based on DCTCP which cannot provide extreme fastconvergence and rare packet loss.

Credit-Based Flow Control. Kung et al. proposed a se-ries of work on credit-based flow control mechanisms forATM networks to to achieve near zero loss ratio [24–28].The credit-based flow control mechanism works hop-by hop.Each receiver notifies its sender to transmit a certain amountof data cells by sending credit cells. After having receiveda credit cell, the sender can forward data cells according tothe received credit value. In this way, the credit-based flowcontrol achieves near zero loss ratio. However, the credit-based flow control mechanism requires to maintain a sepa-rate buffer space for each session (VC) passing through thelink. The number of connections sharing a path is usuallylarge in data centers. Maintaining the buffer space for allconnections will introduce high overhead.

Explict Flow Control. There are some typical explicittransport protocols designed for traditional Internet [17, 23].However, they are not suitable for data center networks.For example, XCP [23] is designed for networks with highbandwidth-delay product, the convergence rate of it is quiteslow with respect to the fast convergence requirement in datacenter networks [17]. RCP [17] has large buffer requirementduring flow join and hardly deals with large-scale concurrentflows [40]. Besides, the convergence rate of it is also slow[40].

8. ConclusionIn this work, an explicit window-based transport protocol,called TFC, is proposed for data center networks to achievehigh link utilization, fast convergence, zero-queueing andrare packets loss. Two concepts, Token and Effective Flows,are defined to represent the network resource to be allocat-ed and resource consumers in a time slot. By excluding in-network buffer from tokens and decoupling the measuringmechanisms for determining tokens and the number of effec-tive flows in a time slot, TFC achieves near zero-queueing.Besides, by adding a window acquisition phase after the flowestablishment phase and a delay function at switches, TFCprevents packets dropping with traffic bursts and highly con-current flows and thus achieves rare packets loss. The exper-imental results in our testbed and simulation results indicatethat TFC achieves its goals.

Page 13: TFC: Token Flow Control in Data Center Networksnns.cs.tsinghua.edu.cn/paper/eurosys16_jz.pdf · Keywords Data Centers, Flow Control, Low Latency, Rare Loss, Fast Convergence 1. Introduction

AcknowledgmentsWe gratefully appreciate our shepherd Prof. Jon Crowcroftfor his constructive suggestions, and acknowledge the anony-mous reviewers for their valuable comments. This workis supported in part by National Natural Science Founda-tion of China (NSFC) under Grant No. 61225011 and No.61502049, National Basic Research Program of China (973Program) under Grant No.2012CB315803, and NationalHigh-Tech Research and Development Plan of China (863Plan) under Grant No. 2015AA020101.

References[1] NetFPGA project. http://netfpga.org/.

[2] Yahoo! M45 supercomputing project.http://research.yahoo.com/node/1884, 2009.

[3] Google Research: Three things that MUST BEDONE to save the data center of the future.http://www.theregister.co.uk/2014/02/11/google researchthree things that must be done to save the data centerof the future/?page=3, Feb. 2014.

[4] Storm: Distributed and fault-tolerant realtime computation.http://storm-project.net/, January 2014.

[5] D. Abts and B. Felderman. A Guided Tour through Data-center Networking. ACM Queue, 10(5):10, 2012.

[6] M. Al-Fares, A. Loukissas, and A. Vahdat. A scalable, com-modity data center network architecture. In Proceedings ofthe ACM SIGCOMM, 2008.

[7] M. Alizadeh, A. Greenberg, D. A. Maltz, J. Padhye, P. Patel,B. Prabhakar, S. Sengupta, and M. Sridharan. Data CenterTCP (DCTCP). In Proceedings of the ACM SIGCOMM, 2010.

[8] M. Alizadeh, A. Kabbani, T. Edsall, B. Prabhakar, A. Vahdat,and M. Yasuda. Less is More: Trading a little Bandwidth forUltra-Low Latency in the Data Center. In Proceedings of theUSENIX NSDI, 2012.

[9] M. Alizadeh, S. Yang, M. Sharif, S. Katti, N. McKeown,B. Prabhakar, and S. Shenker. pfabric: Minimal Near-OptimalDatacenter Transport. In Proceedings of the ACM SIGCOMM,2013.

[10] B. Atikoglu, Y. Xu, E. Frachtenberg, S. Jiang, andM. Paleczny. Workload Analysis of a Large-Scale Key-ValueStore. In Proceedings of the ACM SIGMETRICS, 2012.

[11] W. Bai, L. Chen, K. Chen, D. Han, C. Tian, and H. Wang.Information-Agnostic Flow Scheduling for Commodity DataCenters. In Proceedings of the USENIX NSDI, 2015.

[12] L. A. Barroso, J. Dean, and U. Holzle. Web Search for aPlanet: The Google Cluster Architecture. Micro, 23(2):22–28,2003.

[13] T. Benson, A. Anand, A. Akella, and M. Zhang. MicroTE:Fine Grained Traffic Engineering for Data Centers. In Pro-ceedings of the ACM CoNEXT, 2011.

[14] Y. Chen, R. Griffith, J. Liu, R. H. Katz, and A. D. Joseph.Understanding TCP Incast Throughput Collapse in Datacen-ter Networks. In Proceedings of the 1st ACM workshop onResearch on enterprise networking, 2009.

[15] P. Cheng, F. Ren, R. Shu, and C. Lin. Catch the Whole Lotin an Action: Rapid Precise Packet Loss Notification in DataCenter. In Proceedings of the USENIX NSDI, 2014.

[16] J. Dean and S. Ghemawat. MapReduce: Simplified DataProcessing on Large Clusters. In Proceedings of the USENIXOSDI, 2004.

[17] N. Dukkipati, M. Kobayashi, R. Zhang-Shen, and N. McKe-own. Processor Sharing Flows in the Internet. In Quality ofService–IWQoS 2005. 2005.

[18] B. Fitzpatrick. Distributed Caching with Memcached. Linuxjournal, 2004(124):5, 2004.

[19] A. Greenberg, J. R. Hamilton, N. Jain, S. Kandula, C. Kim,P. Lahiri, D. A. Maltz, P. Patel, and S. Sengupta. VL2: aScalable and Flexible Data Center Network. In Proceedingsof the ACM SIGCOMM, 2009.

[20] M. P. Grosvenor, M. Schwarzkopf, I. Gog, R. N. Watson,A. W. Moore, S. Hand, and J. Crowcroft. Queues Dont MatterWhen You Can JUMP Them! In Proceedings of the USENIXNSDI, 2015.

[21] C.-Y. Hong, M. Caesar, and P. B. Godfrey. Finishing FlowsQuickly with Preemptive Scheduling. In Proceedings of theACM SIGCOMM, 2012.

[22] S. Kandula, S. Sengupta, A. Greenberg, P. Patel, andR. Chaiken. The Nature of Data Center Traffic: Measurements& Analysis. In Proceedings of the 9th ACM SIGCOMM con-ference on Internet measurement conference, 2009.

[23] D. Katabi, M. Handley, and C. Rohrs. Congestion Control forHigh Bandwidth-delay Product Networks. Proceedings of theACM SIGCOMM, 2002.

[24] H. Kung and K. Chang. Receiver-Oriented Adaptive BufferAllocation in Credit-Based Flow Control for ATM Networks.In IEEE INFOCOM, pages 239–252, 1995.

[25] H. Kung and A. Chapman. The FCVC (Flow-ControlledVirtual Channels) Proposal for ATM Networks: A Summary.In IEEE ICNP, pages 116–127, 1993.

[26] H. Kung and R. Morris. Credit-Based Flow Control for ATMNetworks. IEEE Network, 9(2):40–48, 1995.

[27] H. Kung and S. Y. Wang. Client-Server Performance on Flow-Controlled ATM Networks: a Web Database of SimulationResults. In IEEE INFOCOM, pages 1218–1226, 1997.

[28] H. Kung and S. Y. Wang. Zero Queueing Flow Control andApplications. In IEEE INFOCOM, pages 192–200, 1998.

[29] Y. J. Liu, P. X. Gao, B. Wong, and S. Keshav. Quartz: a NewDesign Element for Low-Latency DCNs. In Proceedings ofthe ACM SIGCOMM, 2014.

[30] A. Munir, G. Baig, S. M. Irteza, I. A. Qazi, A. X. Liu, and F. R.Dogar. Friends, not Foes: Synthesizing Existing TransportStrategies for Data Center Networks. In Proceedings of theACM SIGCOMM, 2014.

[31] J. Perry, A. Ousterhout, H. Balakrishnan, D. Shah, and H. Fu-gal. Fastpass: A Centralized Zero-Queue Datacenter Network.In Proceedings of the ACM SIGCOMM, 2014.

[32] P. Prakash, A. Dixit, Y. C. Hu, and R. Kompella. The TCPOutcast Problem: Exposing Unfairness in Data Center Net-works. In Proceedings of the USENIX NSDI, 2012.

Page 14: TFC: Token Flow Control in Data Center Networksnns.cs.tsinghua.edu.cn/paper/eurosys16_jz.pdf · Keywords Data Centers, Flow Control, Low Latency, Rare Loss, Fast Convergence 1. Introduction

[33] R. Rejaie, M. Handley, and D. Estrin. RAP: An End-to-End Rate-based Congestion Control Mechanism for RealtimeStreams in the Internet. In Proceedings of the IEEE INFO-COM, 1999.

[34] A. Toshniwal, S. Taneja, A. Shukla, K. Ramasamy, J. M. Patel,S. Kulkarni, J. Jackson, K. Gade, M. Fu, J. Donham, et al.Storm@ Twitter. In Proceedings of the ACM SIGMOD, 2014.

[35] B. Vamanan, J. Hasan, and T. Vijaykumar. Deadline-AwareDatacenter TCP (D2TCP). In Proceedings of the ACM SIG-COMM, 2012.

[36] V. Vasudevan, A. Phanishayee, H. Shah, E. Krevat, D. G. An-dersen, G. R. Ganger, G. A. Gibson, and B. Mueller. Safeand Effective Fine-grained TCP Retransmissions for Datacen-ter Communication. In Proceedings of the ACM SIGCOMM,2009.

[37] C. Wilson, H. Ballani, T. Karagiannis, and A. Rowtron. BetterNever than Late Meeting Deadlines in Datacenter Networks.In Proceedings of the ACM SIGCOMM, 2011.

[38] H. Wu, Z. Feng, C. Guo, and Y. Zhang. ICTCP: IncastCongestion Control for TCP in Data Center Networks. InProceedings of the 6th ACM CoNEXT, 2010.

[39] J. Zhang, F. Ren, and C. Lin. Modeling and UnderstandingTCP Incast in Data Center Networks. In Proceedings of theIEEE INFOCOM, 2011.

[40] Y. Zhang, S. Jain, and D. Loguinov. Towards ExperimentalEvaluation of Explicit Congestion Control. Computer Net-works, 53(7):1027–1039, 2009.