The dark side of TCP -...

61
THE DARK SIDE OF TCP LIUPPA C. Pham http://www.univ-pau.fr/~cpham University of Pau, France LIUPPA laboratory DFMA 07 ENST, Paris, France July 5th, 2007 The dark side The dark side of TCP of TCP and moving forwards and moving forwards

Transcript of The dark side of TCP -...

Page 1: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

C. Phamhttp://www.univ-pau.fr/~cpham

University of Pau, FranceLIUPPA laboratory

DFMA 07ENST, Paris, France

July 5th, 2007

The dark side The dark side of TCPof TCP

and moving forwardsand moving forwards……

Page 2: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

••

• •

••

••

The The big-bang big-bang of of thetheInternetInternet

Page 3: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

# Internet host# Internet host

INTRODUCTION

Page 4: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

Towards Towards all IPall IP

INTRODUCTION

IP

Sensor networks

VoIP IP TelephonyIPTV

VOD INTERNET, HTTPMultimedia

Grid computing

Pervasivenetworking

High-perfnetworking

Interactivegaming

X.25 FR ATM PSTNE1/T1

Page 5: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

Internet

huge variety huge variety ofofcommunicatingcommunicating

devicesdevices!!

Wireless sensor nodes

INTRODUCTION

Page 6: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

11stst revolutionrevolution::Wireless Wireless NetworksNetworks

Access PointAccess Point

WiFi, WiMaxBlueTooth, ZigBee, IrDA…GSM, GPRS, EDGE, UMTS, 4G,…

INTRODUCTION

Page 7: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

22ndnd revolution: going revolution: goingopticaloptical

2x / 18 months2x / 7 months

Source « Optical fibers for Ultra-Large CapacityTransmission » by J. Grochocinski

INTRODUCTION

Page 8: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

DWDM, bandwidth forDWDM, bandwidth forfree?free?

DWDM: Dense Wavelength Division Multiplexing

< 0,1 nm

2Gbps10Gbps

10, 40, 160 Gbps are available!INTRODUCTION

Page 9: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

Fibers everywhereFibers everywhere??

offices

campus

residentials

Network Providermetro ring

Network Provider

FTTHFTTCFTTP

Core40, 160 Gbps

InternetDataCenter

2.5Gbps

1GbpsGigaEth

10Gbps

10Gbps2.5Gbps

NEWS of Dec 15th, 2004

Verizon and SBC aredeploying large optical fiber

infrastructures in the USusing FTTC or FTTP

scenario

INTRODUCTION

NEWS from Japan andSouth Korea

Japan is one of the firstcountry in FTTH technologywith 3.2 millions users at theend of 2005 (16 % of high-

speed access market). InSouth Korea, FTTH users

represents 11 %.

NEWS of May 31st, 2005

US Fiber-to-the-home(FTTH) installations havegrown 83% since October2004, now reaching 398communities in 43 states

Verizon is on track to passthree million homes withfiber by the end of 2005

NEWS of July, 2006

France Telecom will deployan FTTH test-bed

infrastructure in Paris. 2.5Gbps in download and

1.2Gbps in upload!

Page 10: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

Optical Fiber or Microwave Link MUXPDH/SDH

Digitalswitch

MUXPDH/SDH

Digitalswitch

n*30*64 Kb/s

n*2048 Kb/s

STM-1 : 155.520 Mb/sSTM-4 : 622.080 Mb/sSTM-16 : 2488.320 Mb/s

SDH :

SONET/SDH in the coreSONET/SDH in the core9595% of exploited OF use SONET/SDH% of exploited OF use SONET/SDH

INTRODUCTION

Page 11: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

SONET/SDH transportSONET/SDH transportnetwork infrastructurenetwork infrastructure

SONET/SDH now offersNative Ethernet interfaceGeneric Framing ProcedureVirtual Concatenation

Add Drop Multiplexer

rings

rings

Page 12: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

The The new networksnew networks

vBNSAbileneSUPERNETDRENCA*NETGEANTDATATAG…much more to come!

INTRODUCTION

Page 13: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

GEANTGEANT

INTRODUCTION

Page 14: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

Computational gridsComputational grids

user application

from Dorian Arnold: Netsolve Happenings

1PFlops

Virtually unlimited resources

INTRODUCTION

Page 15: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

Real-time Real-time interactive interactive large-large-scale scientific scale scientific collaborationscollaborations

Multimodality brain mapping

Large data transfersrequire very high bandwidth

require the ability to process, share,and interactively visualize multiple100Gbytes datasets!

Today, to visualize and explore eight3D images require 64Gb/s !

Page 16: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

••

• •

••

••

TCP

FTP

HTTP

SSH

SMTP

Page 17: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

Very High-Speed Very High-Speed NetworksNetworks

Today’s backbone links are optical, DWDM-based, and offer gigabit rates

Transmission time <<< propagation timeDuplicating a 10GB database should not be

a problem anymore

Optical fiber40 Gbps

200000km/s, delay of 5ms every 1000km

Page 18: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

The reality The reality check: TCP on a 200Mbps check: TCP on a 200Mbps linklink

Huge capacity in network linksdoes not mean end-to-end

performances!TCP is not adapted to exploit

Long Fat Networks!

Packet losses

Page 19: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

The things The things about TCP about TCP youryourmother never told youmother never told you!!

If you want to transfer a 1Go file with astandard TCP stack, you will need minuteseven with a 40Gbps (how much in $?) link!

40 GbpsTCP

0.3Gbps

vanilla TCP

Page 20: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

LetLet’’s go back to s go back to the originthe origin!!

From Computer Networks, A. Tanenbaum

Flow control is for receiversCongestion control is for the network

Congestioncollapse was firstobserved in 1986by V. Jacobson.

Congestion controlwas added to TCP

(TCP Reno) in1988.

Page 21: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

Flow Flow controlcontrolprevents receiverprevents receiver’’s buffer overfows buffer overfow

acknowledged sent to be sent outside window

Source Port Dest. PortSequence NumberAcknowledgment

HL/Flags WindowD. Checksum Urgent Pointer

Options..

Source Port Dest. PortSequence NumberAcknowledgment

HL/Flags WindowD. Checksum Urgent Pointer

Options..

Packet Sent Packet Received

App write

Page 22: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

TCP congestion control: TCP congestion control: the bigthe bigpicturepicture

cwnd grows exponentially (slow start), then linearly(congestion avoidance) with 1 more segment per RTT

If loss, divides threshold by 2 (multiplicative decrease) andrestart with cwnd=1 packet

From

Com

pute

r Net

wor

ks, A

. Tan

enba

um

Time

Seq

uenc

e N

o

Congestion windowdoubles every round-triptime

packetack

Page 23: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

From the From the control control theory theory point of point of viewview

Feedback should be frequent, but not too muchotherwise there will be oscillations

Can not control the behavior with a timegranularity less than the feedback period

ƒfeedback

Closed-loop control

Page 24: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

The The TCP TCP saw-tooth curvesaw-tooth curve

The TCP steady-state behavior isreferred to as theAdditive Increase-MultiplicativeDecrease process

N

N/2

3N/4.N/2Packets/cycle

TCP behavior in steady state

Isolated packet losses triggerthe fast recovery procedureinstead of the slow-start.

no loss:cwnd = cwnd + 1loss: cwnd = cwnd*0.5

Page 25: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

t0

Efficiency Line

x1+x2=C

Fairness Line

x1=x2

User 1’s Allocation x1

User 2’sAllocation

x2

AIMDAIMD

Assumption: decrease policy must (at minimum) reverse theload increase over-and-above efficiency line

Implication: decrease factor should be conservatively set toaccount for any congestion detection lags etc

Phase plot

Convergencepoint

Fairness is preservedunder MultiplicativeDecrease since theuser’s allocation ratioremains the same

Ex:

!

x2

x1

=x2.b

x1.b

Page 26: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

Tuning Tuning stand for TCPstand for TCP the dark side the dark side of speed!of speed!

TCP & network parameters• Congestion window size, ssthresh (threshold)• RTO timeout settings• SACKs• Packet size

System parameters• TCP and OS buffer size (in comm. subsys., drivers…)

TCP team TCP performancesdepend on

NEED ASPECIALIST!

Page 27: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

First problemFirst problem: : window window sizesize The default maximum window size is 64Kbytes.

Then the sender has to wait for acks.Sender Receiver

Packet #1Packet #2Packet #3

Packet #4Packet #5Packet #6

Packet #1 Ack.Packet #2 Ack.Packet #3 Ack.

Packet #4 Ack.Packet #5 Ack.Packet #6 Ack.

RT

T

TIM

E Tim

e to

tran

smit

3 pa

cket

s

Page 28: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

First problemFirst problem: : window window sizesize The default maximum window size is 64Kbytes.

Then the sender has to wait for acks.

RTT=200ms Link is 0C-48 = 2.5 Gbps

Waiting time

Page 29: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

Rule Rule of of thumb thumb on on Long FatLong FatNetworksNetworks

High-speed networkcapacity

RTT

…01001011

Transmissiontime is small

0010100101010101001010100101101010101010101001001111101001101110101001001001011101010101000101001010101010101010001110111010 1011010001010011110101011

Propagationtime is large

The optimal window size should be set to thebandwidthxRTT product to avoid blocking at

the sender side

Need lots ofmemory forbuffers!

Page 30: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

Side effect Side effect of largeof largewindowswindows

Packet losses

Large congestion windowcreate burst/congestion

TCP becomes very sensitive topacket losses on LFN

Con

gest

ion

win

dow

size

Page 31: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

Pushing the limits Pushing the limits of TCPof TCP

Standard configuration (vanilla TCP) is notadequate on many OS, everything is under-sizedReceiver bufferSystem bufferDefault block size

Will manage to get near 1Gbps if well-tuned

Page 32: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

Pushing the limits Pushing the limits of TCPof TCP

Standard configuration (vanilla TCP) is notadequate on many OS, everything is under-sizedReceiver bufferSystem bufferDefault block size

Will manage to get near 1Gbps if well-tuned

Source: M. Goutelle, GEANT test campaign

Large congestion windowSocket buffer=64Mo

Page 33: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

Some Some TCP TCP tuning tuning guidesguides

http://www.psc.edu/networking/projects/tcptune/

http://www.web100.org/http://rdweb.cns.vt.edu/public/notes/win2

k-tcpip.htmhttp://www.sean.de/Solaris/soltune.htmlhttp://datatag.web.cern.ch/datatag/howto

/tcp.html

Page 34: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

Problem Problem on on high capacity linkhigh capacity link??Additive Additive increase is still too increase is still too slow!slow!

With 100ms of round trip time, aconnection needs 203 minutes(3h23) to send at 10Gbpsstarting from 1Mbps!

From S. Floyd

Once you gethigh throughput,maintaining it isdifficult too!

Take ages to getto full speed

Page 35: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

TCP rules:TCP rules:slow increase, big decreaseslow increase, big decrease

Packet loss

Time (RTT)Congestion avoidance

Packet loss Packet losscwnd

Slow start

Packet loss

A TCP connection with 1250-Byte packet size and 100ms RTT isrunning over a 10Gbps link (assuming no other connections, and nobuffers at routers)

100,000 10Gbps

50,000 5Gbps

1.4 hours 1.4 hours 1.4 hours

TCP

bigdecrease

slowincrease

From

Injo

ng R

hee,

Lis

ong

Xu

Page 36: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

Going faster Going faster ((cheatingcheating?)?)nn flows is better than flows is better than 11

The CC limits the throughput of aTCP connection: so why not use morethan 1 connection for the same file?

Verybig file

Seg 1 Seg 2 Seg 3 Seg nSeg n-1

10 Gbps link

TCP connection TCP connection

Page 37: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

Some results fromSome results fromIEPM/SLACIEPM/SLAC

http://www-iepm.slac.stanford.edu/monitoring/bulk/window-vs-streams.html

More streams is better than larger congestion windows

Page 38: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

Multiple Multiple streamsstreams

No/few modifications to transportprotocols (i.e. TCP)Parallel socket librariesGridFTP (http://www.globus.org/datagrid/gridftp.html)

bbFTP (http://doc.in2p3.fr/bbftp/)

Page 39: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

New transport New transport protocolsprotocols

New transport protocols are thosethat are not only optimizations of TCP

New behaviors, new rules, newrequirements! Everything is possible!

New protocols are then notnecessarily TCP compatible!

BEYOND TCP

Page 40: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

The The new transport new transport protocol stripprotocol strip

HS-TCPFAST TCP

XCP

S-TCP

BIC TCP

TSUNAMI

H-TCP

BEYOND TCP

Page 41: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

Response functionResponse functionThroughput = f(p, RTT)TCP’s response function

(N/2)2+1/2(N/2)2

, from (N+N/2)/2

!

Throughput =W

RTT=

3

2

MTU

RTT p

BEYOND TCP

Page 42: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

TCPTCP’’s response function s response function ininimageimage

!

Throughput =W

RTT=

3

2

MTU

RTT p

MTU: Packet SizeRTT: Round-Trip TimeP : Packet Loss Probability

10Gbps requires a packet loss rate of10-10, which is an unrealistic (or atleast hard) requirement for currentnetworks.

From

Injo

ng R

hee,

Lis

ong

Xu

BEYOND TCP

Page 43: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

AIMD, AIMD, general general casecase

5.0

2.1

pRTT

MSSR = TCP:

5.0

5.15

pRTT

MSSR = AIMD:

The throughput of AIMDis always about 13times larger than that ofTCP

Inspired from Injong Rhee, Lisong Xu

NOT TCPFriendly!!!

cwnd = cwnd * (1-1/2)

cwnd = cwnd * (1-1/8)

cwnd = cwnd + 1

cwnd = cwnd + 32

What’s wrong?

BEYOND TCP

Page 44: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

High High Speed TCP [Speed TCP [FloydFloyd]]

Modifies the response function to allow for morelink utilization in current high-speed networkswhere the loss rate is smaller than that of thenetworks TCP was designed for (at most 10-2)

TCP Throughput (Mbps) RTTs Between Losses W P --------------------- ------------------- ---- ----- 1 5.5 8.3 0.02 10 55.5 83.3 0.0002 100 555.5 833.3 0.000002 1000 5555.5 8333.3 0.00000002 10000 55555.5 83333.3 0.0000000002

Table 1: RTTs Between Congestion Events for Standard TCP, for 1500-Byte Packets and a Round-Trip Time of 0.1 Seconds.

From draft-ietf-tsvwg-highspeed-01.txt

BEYOND TCP

Page 45: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

Modifying the responseModifying the response Packet Drop Rate P Congestion Window W RTTs Between Losses ------------------ ------------------- ------------------- 10^-2 12 8 10^-3 38 25 10^-4 120 80 10^-5 379 252 10^-6 1200 800 10^-7 3795 2530 10^-8 12000 8000 10^-9 37948 25298 10^-10 120000 80000

Table 2: TCP Response Function for Standard TCP. The average congestion window W in MSS-sized segments is given as a function of the packet drop rate P.

To specify a modified responsefunction for HighSpeed TCP, weuse three parameters, Low_Window,High_Window, and High_P. ToEnsure TCP compatibility, theHighSpeed response function usesthe same response function asStandard TCP when the currentcongestion window is at mostLow_Window, and uses the HighSpeedresponse function when the currentcongestion window is greater thanLow_Window. In this document weset Low_Window to 38 MSS-sizedsegments, corresponding to a packetdrop rate of 10^-3 for TCP.

Packet Drop Rate P Congestion Window W RTTs Between Losses ------------------ ------------------- ------------------- 10^-2 12 8 10^-3 38 25 10^-4 263 38 10^-5 1795 57 10^-6 12279 83 10^-7 83981 123 10^-8 574356 180 10^-9 3928088 264 10^-10 26864653 388

Table 3: TCP Response Function for HighSpeed TCP. The average congestion window W in MSS-sized segments is given as a function of the packet drop rate P.

From draft-ietf-tsvwg-highspeed-01.txt

BEYOND TCP

Page 46: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

See it See it in imagein image

BEYOND TCP

TCP Friendlyregion

Page 47: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

Relation Relation with with AIMDAIMD

TCP-AIMDAdditive increase: a=1Multiplicative decrease: b=1/2

HSTCP-AIMDLink a & b to congestion window sizea = a(cwnd), b=b(cwnd)General rules

• the larger cwnd, the larger the increment• The larger cwnd, the smaller the decrement

no loss:cwnd = cwnd + 1

loss:cwnd = cwnd*0.5

BEYOND TCP

Page 48: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

Quick to Quick to grab bandwidthgrab bandwidth,,slow to slow to give some give some back!back!

No loss:cwnd=cwnd+a

Loss:cwnd=cwnd*b

BEYOND TCP

Page 49: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

Talking Talking about about dark sidedark side……

SETUP RTT=100msBottleneck BW=50Mbps

Qsize=BW*RTTQtype=DropTail

1 HSTCP and 1 TCP flow 2 TCP flows

Starvation of TCP flow(>10x)

BEYOND TCP

Page 50: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

XCP [Katabi02]XCP [Katabi02]

XCP is a router-assisted solution, generalized the ECNconcepts (FR, TCP-ECN)

XCP routers can compute the available bandwidth bymonitoring the input rate and the output rate

Feedback is sent back to the source in special fields of thepacket header

Input rate: Ir Output rate: Or

source

H_feedback (initialized to sender’sdemands)

H_rtt (set to sender’s RTT estimate)

H_cwnd (set to the sender’s current cwnd)

XCP packet header

feedback=α.rtt.(Or-Ir)-βQα=0.4, β=0.226Q: persistent queue size

QH_feedback ECFC

BEYOND TCP

Page 51: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

XCP in actionXCP in action

Ir=250Mbps Or=100Mbpssource

feedback=α.rtt.(Or-Ir)-βQα=0.4, β=0.226Q: persistent queue size

Q

Case without βQ contributionOr-Ir=100-250=-150feedback=-6

H_feedback=0

H_rtt=100ms

H_cwnd=200

Feedback value represents a window increment/decrement

cwnd=200

H_feedback=-6

H_rtt=100ms

H_cwnd=200

cwnd=194

BEYOND TCP

Page 52: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

XCPXCPVariable Variable bandwidth environmentsbandwidth environments

Good fairness andstability even in

variable bandwidthenvironments

BEYOND TCP

Page 53: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

XCP-r XCP-r [Pacheco&Pham05][Pacheco&Pham05]A more A more robust robust version of XCPversion of XCP

Fast recovery afterthe timeouts andbetter fairnesslevel

10 flows sharinga 1Gbps link

BEYOND TCP

Page 54: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

XCP-r XCP-r performanceperformanceAmount of data transfered in 50s, 10 flows, 1Gbps link, 200ms RTT

BEYOND TCP

Page 55: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

XCP-r fairnessXCP-r fairness

TCP and HSTCPare not reallyfair...

BEYOND TCP

Page 56: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

Nothing is perfect Nothing is perfect :-(:-(

Multiple or parallel streamsHow many streams?Tradeoff between window size and

number of streamsNew protocol

Fairness issues?Deployment issues?Still too early to know the side effects

BEYOND TCP

Page 57: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

Where Where to to find the find the newnewprotocolsprotocols??

HSTCP• http://www.icir.org/floyd/hstcp.html

STCP on Linux 2.4.19• http://www-lce.eng.cam.ac.uk/˜ctk21/scalable/

FAST• http://netlab.caltech.edu/FAST/

XCP• http://www.ana.lcs.mit.edu/dina/XCP/• http://www.isi.edu/isi-xcp/#software

BEYOND TCP

Page 58: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

Web100 Web100 projectproject

www.web100.org « The Web100 project will provide thesoftware and tools necessary for end-hosts to automatically andtransparently achieve high bandwidthdata rates (100 Mbps) over the highperformance research networks »

Actually it’s not limited to 100Mbps!Recommended solution for end-users to

deploy and test high-speed transportsolutions

BEYOND TCP

Page 59: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

Hostile Hostile environmentsenvironments

Asymetric networksSatellite links & terrestrial links

Wireless (WiFi, WiMax)High loss probabilityLosses ≠ congestions

Ad-Hoc (PDA)Small capacity

Wireless Sensor NetworksAll of the above mentioned problems!

Page 60: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

New New sensor sensor applicationsapplicationsdisaster disaster relief - relief - securitysecurity

Rapid deployment of firedetection systems in high-risk places

Real-time organization andoptimization of rescue in largescale disasters

Page 61: The dark side of TCP - univ-pau.frcpham.perso.univ-pau.fr/Paper/TUTORIAL/DFMA-07/DFMA-tutorial-TCP.pdf · THE DARK SIDE OF TCP LIUPPA t 0 Efficiency Line x 1+x 2=C Fairness Line x

THE DARK SIDE OF TCP LIUPPA

ConclusionsConclusions

Understanding the dark side allows tomove forwards!

However…40 Gbps

vanilla TCP

10GB file

MAY THE FORCEBE WITH YOU!