44
1 Chapter 12 Chapter 12 TCP Traffic TCP Traffic Control Control

1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Embed Size (px)

Citation preview

Page 1: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

1

Chapter 12Chapter 12

TCP Traffic TCP Traffic ControlControl

Page 2: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control2

Introduction Introduction

1.1. Performance implications of TCP Performance implications of TCP Flow and Error ControlFlow and Error Control

2.2. Performance implications of TCP Performance implications of TCP Congestion ControlCongestion Control

3.3. Performance of Performance of TCP/IP over ATMTCP/IP over ATM

Page 3: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control3

TCP Flow and Error Control TCP Flow and Error Control Uses a form of Uses a form of sliding window (~GBN)sliding window (~GBN) Differs from mechanism used in LLC, Differs from mechanism used in LLC,

HDLC, X.25, and others:HDLC, X.25, and others: DecouplesDecouples acknowledgement of received data acknowledgement of received data

units from granting permission to send moreunits from granting permission to send more

TCP’s flow control is known as a TCP’s flow control is known as a credit credit allocation schemeallocation scheme::

Each transmitted octet is considered to have a Each transmitted octet is considered to have a sequence numbersequence number

Each acknowledgement can grant permissionEach acknowledgement can grant permission to to send a specific amount of additional data send a specific amount of additional data

TCP Window Size <= Min (CongWin, TCP Window Size <= Min (CongWin, RcvWin)RcvWin)

Page 4: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control5

TCP Credit Allocation TCP Credit Allocation MechanismMechanism Note: trailing edge

advances each time A sends data, leading edge advances only when B grants additional credit.

Page 5: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control9

Effect of TCP Window Size Effect of TCP Window Size on Performanceon PerformanceWW = TCP window size (octets) = TCP window size (octets)RR = Data rate (bps) at TCP source = Data rate (bps) at TCP sourceDD = Propagation delay (seconds) = Propagation delay (seconds) between source and destinationbetween source and destination After TCP source begins After TCP source begins

transmitting, it takes D seconds for transmitting, it takes D seconds for first bits to arrive, and D seconds first bits to arrive, and D seconds for acknowledgement to return for acknowledgement to return (RTT)(RTT)

TCP source TCP source could transmit at most could transmit at most 2RD bits, or 2RD bits, or RD/4 octetsRD/4 octets

Page 6: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control10

Maximum Normalized Maximum Normalized Throughput SThroughput S

1 W 1 W RD / 4 RD / 4 4W W 4W W RD / 4RD / 4 RDRD

S = S =

Where:Where:W = window size (octets)W = window size (octets)R = data rate (bps) at TCP sourceR = data rate (bps) at TCP source

D = dD = dpropprop (seconds) between TCP source and (seconds) between TCP source and destination, 2D = RTTdestination, 2D = RTT

Note: RD (bits) known as “Note: RD (bits) known as “rate-delay productrate-delay product””

Page 7: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control11

Window Scale Parameter Window Scale Parameter (Optional header item)(Optional header item)

W = 216 - 1

W = 220 - 1

RD

W = RD/4

Page 8: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control12

Complicating FactorsComplicating Factors Multiple TCP connections are Multiple TCP connections are

multiplexed multiplexed over same network over same network interface, reducing data rate, R, per interface, reducing data rate, R, per connection connection ((SS))

For For multi-hopmulti-hop connections, D is the sum connections, D is the sum of delays across each network plus of delays across each network plus delays at each router, increasing D delays at each router, increasing D ((SS))

If source data rate R at source exceeds If source data rate R at source exceeds data rate on one of the hops, that hop data rate on one of the hops, that hop will be a will be a bottleneck bottleneck ((SS))

Lost segments are Lost segments are retransmittedretransmitted, , reducing throughput. Impact depends reducing throughput. Impact depends on on retransmission policy retransmission policy ((SS))

Page 9: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control13

Retransmission StrategyRetransmission Strategy

TCP relies exclusively on TCP relies exclusively on positive positive acknowledgementsacknowledgements and and retransmission on retransmission on acknowledgement timeoutacknowledgement timeout

There is no explicit negative There is no explicit negative acknowledgement (NAK-less)acknowledgement (NAK-less)

Retransmission required when:Retransmission required when:1.1. Segment arrives Segment arrives damageddamaged, as , as

indicated by checksum error, causing indicated by checksum error, causing receiver to discard segmentreceiver to discard segment

2.2. Segment Segment fails to arrive fails to arrive (implicit (implicit detection scheme)detection scheme)

Page 10: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control14

TCP TimersTCP Timers

A A timer is associated with each timer is associated with each segmentsegment as it is sent as it is sent

If a timer expires before the segment is If a timer expires before the segment is acknowledged, sender must retransmitacknowledged, sender must retransmit

Key Design Issue: Key Design Issue: value of retransmission timer…value of retransmission timer…

Too smallToo small: many unnecessary : many unnecessary retransmissions, wasting network retransmissions, wasting network bandwidthbandwidth

Too largeToo large: delay in handling lost : delay in handling lost segmentsegment

Page 11: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control22

TCP Implementation Policy TCP Implementation Policy Options (per RFC 793/1122)Options (per RFC 793/1122) SendSend: free to transmit when convenient: free to transmit when convenient DeliverDeliver: free to deliver to application when : free to deliver to application when

convenientconvenient AcceptAccept: how data are accepted: how data are accepted

In-order (out of order data is discarded)In-order (out of order data is discarded) In-window (accept and buffer any data in window)In-window (accept and buffer any data in window)

RetransmitRetransmit: how to handle queued, but not yet : how to handle queued, but not yet acknowledged, dataacknowledged, data

First-only (timer per queue, retransmit segment FIFO)First-only (timer per queue, retransmit segment FIFO) Batch (timer per queue, retransmit whole queue)Batch (timer per queue, retransmit whole queue) Individual (timer per segment, retransmit by segment)Individual (timer per segment, retransmit by segment)

AcknowledgeAcknowledge: : immediate (send immediate ack for each good segment)immediate (send immediate ack for each good segment) cumulative (timed wait, and piggyback cumulative ack)cumulative (timed wait, and piggyback cumulative ack)P

erf

orm

an

ce im

plic

ati

on

s?

Page 12: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control28

TCP Congestion Control TCP Congestion Control MeasuresMeasures

Note:TCP Tahoe and TCP Reno from Berkeley Unix TCP implementations

Page 13: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control29

Retransmission Timer Retransmission Timer ManagementManagement

Three Techniques to calculate Three Techniques to calculate retransmission time out (RTO) retransmission time out (RTO) value:value:

1.1. RTT Variance EstimationRTT Variance Estimation2.2. Exponential RTO BackoffExponential RTO Backoff3.3. Karn’s AlgorithmKarn’s Algorithm

Page 14: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control30

RTT Variance EstimationRTT Variance Estimation(Jacobson’s Algorithm)(Jacobson’s Algorithm)3 sources of high variance in RTT3 sources of high variance in RTT If If data rate is relatively low, then data rate is relatively low, then

transmission delay will be transmission delay will be relatively largerelatively large, with larger , with larger variance due to variance in variance due to variance in packet packet sizesize

Load may change abruptly due to Load may change abruptly due to other sourcesother sources

Peer may not Peer may not acknowledge acknowledge segments segments immediatelyimmediately

Page 15: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control31

Jacobson’s AlgorithmJacobson’s Algorithm

SRTT(K + 1) = (1 – g) SRTT(K + 1) = (1 – g) × SRTT(K) + g × RTT(K + 1)× SRTT(K) + g × RTT(K + 1)

SERR(K + 1) = RTT(K + 1) – SRTT(K)SERR(K + 1) = RTT(K + 1) – SRTT(K)

SDEV(K + 1) = (1 – h) SDEV(K + 1) = (1 – h) ×× SDEV(K) + h SDEV(K) + h ××|SERR(K + |SERR(K + 1)|1)|

RTO(K + 1) = SRTT(K + 1) + f × SDEV(K + 1)RTO(K + 1) = SRTT(K + 1) + f × SDEV(K + 1)

– g = 0.125 (g = 0.125 ())– h = 0.25 (h = 0.25 ())– f = 2 or f = 4 f = 2 or f = 4 – (most current implementations use f = 4)(most current implementations use f = 4)

Page 16: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control32

Jacobson’s RTO CalculationsJacobson’s RTO Calculations

Increasing function

Decreasing function

Page 17: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control33

Two Other FactorsTwo Other Factors

Jacobson’s algorithm can significantly Jacobson’s algorithm can significantly improve TCP performance, but:improve TCP performance, but:

What RTO should we use for What RTO should we use for retransmitted segmentsretransmitted segments?? ANSWERANSWER: exponential RTO backoff : exponential RTO backoff

algorithmalgorithm Which Which round-trip samplesround-trip samples should should

we use as input to Jacobson’s we use as input to Jacobson’s algorithm?algorithm?ANSWERANSWER: Karn’s algorithm: Karn’s algorithm

Page 18: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control34

Exponential RTO BackoffExponential RTO Backoff

Increase RTO each time the same Increase RTO each time the same segment is retransmitted – segment is retransmitted – backoff processbackoff process

Multiply RTO by constant:Multiply RTO by constant:

RTO = q RTO = q × RTO× RTOq = 2 is called binary exponential q = 2 is called binary exponential

backoff (like Ethernet CSMA/CD)backoff (like Ethernet CSMA/CD)

Page 19: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control35

Which Round-trip Samples?Which Round-trip Samples?

If an ack is received for a If an ack is received for a retransmitted segmentretransmitted segment, there , there are 2 possibilities:are 2 possibilities:

1.1. Ack is for first transmissionAck is for first transmission2.2. Ack is for second transmissionAck is for second transmission

TCP TCP source cannot distinguishsource cannot distinguish between these two casesbetween these two cases

No valid way to calculate RTT:No valid way to calculate RTT:– From first transmission to ack, orFrom first transmission to ack, or– From second transmission to ack?From second transmission to ack?

Page 20: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control36

Karn’s AlgorithmKarn’s Algorithm

Do not use measured RTT for Do not use measured RTT for retransmitted segments to update retransmitted segments to update SRTT and SDEVSRTT and SDEV

Calculate exponential Calculate exponential backoff RTObackoff RTO when a retransmission occurswhen a retransmission occurs

Use backoff RTO for segments Use backoff RTO for segments until an ack arrives for a segment until an ack arrives for a segment that has not been retransmittedthat has not been retransmitted

Then use Jacobson’s algorithm to Then use Jacobson’s algorithm to calculate RTOcalculate RTO

Page 21: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control37

Window ManagementWindow Management

Slow startSlow startDynamic window sizing on Dynamic window sizing on

congestioncongestionFast retransmitFast retransmitFast recoveryFast recoveryECNECNOther MechanismsOther Mechanisms

Page 22: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control38

Slow StartSlow Startawnd = MIN[ credit, cwnd]awnd = MIN[ credit, cwnd]

wherewhereawnd = allowed window in segmentsawnd = allowed window in segmentscwnd = congestion window in segments cwnd = congestion window in segments

(assumes MSS bytes per segment)(assumes MSS bytes per segment)credit = amount of unused credit credit = amount of unused credit

granted in most recent ack granted in most recent ack (rcvwindow)(rcvwindow)

cwndcwnd = 1 for a new connection and = 1 for a new connection and increased by 1 (except during slow increased by 1 (except during slow start) for each ack received, up to a start) for each ack received, up to a maximummaximum

Page 23: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control40

Dynamic Window Sizing on Dynamic Window Sizing on CongestionCongestion A A lost segmentlost segment indicates indicates congestioncongestion Prudent (conservative) to reset Prudent (conservative) to reset

cwnd to 1 and begin slow start cwnd to 1 and begin slow start processprocess

May not be conservative enough: May not be conservative enough: “easy to drive a network into “easy to drive a network into saturation but hard for the net to saturation but hard for the net to recover” (Jacobson)recover” (Jacobson)

Instead, use slow start with Instead, use slow start with linear linear growthgrowth in cwnd after reaching a in cwnd after reaching a threshold valuethreshold value

Page 24: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control42

Illustration of Slow Start and Illustration of Slow Start and Congestion AvoidanceCongestion Avoidance

Page 25: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control43

Fast Retransmit (TCP Fast Retransmit (TCP Tahoe)Tahoe) RTO is generally noticeably longer than RTO is generally noticeably longer than

actual RTTactual RTT If a segment is lost, TCP may be slow to If a segment is lost, TCP may be slow to

retransmitretransmit TCP rule:TCP rule: if a segment is received out of if a segment is received out of

order, an ack must be issued order, an ack must be issued immediately for the last in-order immediately for the last in-order segmentsegment

Tahoe/Reno Fast Retransmit rule: if 4 Tahoe/Reno Fast Retransmit rule: if 4 acks received for same segment (I.e. acks received for same segment (I.e. 3 3 duplicate acksduplicate acks), highly likely it was lost, ), highly likely it was lost, so retransmit immediately, rather than so retransmit immediately, rather than waiting for timeoutwaiting for timeout

Page 26: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control45

Fast Recovery (TCP Reno)Fast Recovery (TCP Reno) When TCP retransmits a segment using Fast When TCP retransmits a segment using Fast

Retransmit, a segment was assumed lostRetransmit, a segment was assumed lost Congestion avoidanceCongestion avoidance measures are measures are

appropriate at this pointappropriate at this point E.g., slow-start/congestion avoidance E.g., slow-start/congestion avoidance

procedureprocedure This may be unnecessarily conservative This may be unnecessarily conservative

since multiple ACKs indicate segments are since multiple ACKs indicate segments are actually getting throughactually getting through

Fast RecoveryFast Recovery: retransmit lost segment, cut : retransmit lost segment, cut threshold in half, set congestion window to threshold in half, set congestion window to threshold +3threshold +3, proceed with linear increase , proceed with linear increase of cwndof cwnd

This This avoids initial slow-startavoids initial slow-start

Page 27: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control46

Fast Recovery Fast Recovery ExampleExample

RenoFast Recovery(simplified)

TahoeSlow Start

Page 28: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control47

Explicit Congestion Explicit Congestion Notification in TCP/IP – RFC Notification in TCP/IP – RFC 31683168 ECN capable router sets congestion ECN capable router sets congestion

bits in the IP header of packets to bits in the IP header of packets to indicate congestionindicate congestion

TCP receiver sets bits in TCP ACK TCP receiver sets bits in TCP ACK header to return congestion indication header to return congestion indication to peer (sender)to peer (sender)

TCP senders respond to congestion TCP senders respond to congestion indication as if a packet loss had indication as if a packet loss had occurred occurred

DSCP0 1 2 3 4 5 6 7

ECNIPv4 TOS field, IPv6 Traffic Class field

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

U A P R S FR C S S Y IG K H T N N

C EW CR EHLEN RSVD

TCP Header flag field

Page 29: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control48

Explicit Congestion Explicit Congestion Notification in TCP/IP – RFC Notification in TCP/IP – RFC 31683168

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

U A P R S FR C S S Y IG K H T N N

C EW CR EHLEN RSVD

DSCP0 1 2 3 4 5 6 7

ECN0 0 00Not ECN Capable TransportNot ECN Capable Transport0 0 11ECT (1)ECT (1)1 1 00ECT (0)ECT (0)1 1 11Congestion ExperiencedCongestion Experienced

0 0 00Set-up: not ECN Capable responseSet-up: not ECN Capable response0 0 11Receiver ECN-Echo: CE packet receivedReceiver ECN-Echo: CE packet received1 1 00Sender Congestion Window Reduced Sender Congestion Window Reduced

acknowledgementacknowledgement1 1 11Set-up: with SYN to indicate ECN Set-up: with SYN to indicate ECN

capabilitycapability

Page 30: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control49

TCP/IP ECN ProtocolTCP/IP ECN Protocol

Hosts negotiate ECN capabilityduring TCP connection setup

TCPSender

TCPReceiver

SYN + ECE + CWR

SYN ACK + ECE

Receiver TCPAcks packets with ECN-Echo set if CE bits set in IP header.

Sender IP marks data packets as ECN CapableTransport

Routers mark ECN-capable IP packets if CongestionExperienced.

Sender TCPreduces window size and marks next packet with CWR

Routers mark ECN-capable IP packets if CongestionExperienced.

Page 31: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control50

TCP/IP ECN – Some Other TCP/IP ECN – Some Other ConsiderationsConsiderations Sender sets CWR only on Sender sets CWR only on first data first data

packet after ECEpacket after ECE CWR also set for window reduction for CWR also set for window reduction for

any other reasonany other reason ECT must ECT must notnot be set in be set in retransmitted retransmitted

packetspackets Receiver continues to send ECE in Receiver continues to send ECE in all all

ACKs until CWR receivedACKs until CWR received– Delayed ACKs: if any data packet has CE Delayed ACKs: if any data packet has CE

set, send ECEset, send ECE– Fragmentation: if any fragment has CE set, Fragmentation: if any fragment has CE set,

send ECEsend ECE

Page 32: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control51

Some Other Mechanisms for Some Other Mechanisms for TCP Congestion ControlTCP Congestion Control Limited TransmitLimited Transmit – for small – for small

congestion windows; triggers fast congestion windows; triggers fast retransmit for < 3 dup ACKsretransmit for < 3 dup ACKs

Appropriate Byte Counting (ABC)Appropriate Byte Counting (ABC) – – congestion window modified based congestion window modified based number of bytes acknowledged by number of bytes acknowledged by each ACK, rather than by the each ACK, rather than by the number of ACKs that arrive number of ACKs that arrive

Selective AcknowledgementSelective Acknowledgement – – defines use of TCP selective defines use of TCP selective acknowledgement optionacknowledgement option

Page 33: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control52

Performance of TCP over Performance of TCP over ATMATM How best to manage TCP’s How best to manage TCP’s

segment size, window segment size, window management and congestion management and congestion control mechanisms…control mechanisms…

……at the same time as at the same time as ATM’s ATM’s quality of service and traffic quality of service and traffic control policiescontrol policies

TCP may operate end-to-end over TCP may operate end-to-end over one ATM network, or there may be one ATM network, or there may be multiple ATM LANs or WANs with multiple ATM LANs or WANs with non-ATM networksnon-ATM networks

Page 34: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control53

TCP/IP over AAL5/ATMTCP/IP over AAL5/ATM

TCP

IP

AAL5

ATM

Convergence S/L

SAR S/L

CPCS Trailer:•CPCS-UU Indication•Common Part Indicator•PDU Payload Length•Payload CRC

Page 35: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control54

Performance of TCP over Performance of TCP over UBRUBRBuffer capacity at ATM switchesBuffer capacity at ATM switches is a is a

critical parameter in assessing TCP critical parameter in assessing TCP throughput performance (throughput performance (why?why?))

Insufficient bufferInsufficient buffer capacity results in capacity results in lost TCP segments and lost TCP segments and retransmissionsretransmissions

No segments lostNo segments lost if each ATM switch if each ATM switch has buffer capacity equal to or has buffer capacity equal to or greater than the sum of the greater than the sum of the rcvwindows for all TCP connections rcvwindows for all TCP connections through the switch (through the switch (practical?practical?))

Page 36: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control55

Effect of Switch Buffer Size Effect of Switch Buffer Size (example - Romanow & Floyd)(example - Romanow & Floyd)

Data rate of 141 MbpsData rate of 141 Mbps End-to-end propagation delay of 6 End-to-end propagation delay of 6 μμss IP packet sizes of 512 – 9180 octetsIP packet sizes of 512 – 9180 octets TCP window sizes from 8 Kbytes to 64 TCP window sizes from 8 Kbytes to 64

KbytesKbytes ATM switch buffer size per port from ATM switch buffer size per port from

256 – 8000 cells256 – 8000 cells One-to-one mapping of TCP One-to-one mapping of TCP

connections to ATM virtual circuitsconnections to ATM virtual circuits TCP sources have infinite supply of TCP sources have infinite supply of

data readydata ready

Page 37: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control56

Performance of TCP over UBRPerformance of TCP over UBR

(UBR)

Page 38: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control57

ObservationsObservations

If a If a single cellsingle cell is dropped, other cells is dropped, other cells in the same IP datagram are in the same IP datagram are unusable, yet ATM network forwards unusable, yet ATM network forwards these useless cells to destinationthese useless cells to destination

Smaller bufferSmaller buffer increases probability increases probability of dropped cellsof dropped cells

Larger segment sizeLarger segment size increases increases number of useless cells transmitted number of useless cells transmitted if a single cell droppedif a single cell dropped

Page 39: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control58

Partial Packet and Early Partial Packet and Early Packet DiscardPacket Discard Reduce the transmission of useless cellsReduce the transmission of useless cells Work on a Work on a per-virtual-channelper-virtual-channel basis basis

Partial Packet DiscardPartial Packet Discard– If a cell is dropped, then drop all subsequent If a cell is dropped, then drop all subsequent

cells in that segment (i.e., up to and cells in that segment (i.e., up to and including the first cell with SDU type bit set including the first cell with SDU type bit set to one)to one)

Early Packet DiscardEarly Packet Discard– When a switch buffer reaches a threshold When a switch buffer reaches a threshold

level, preemptively discard all cells in a level, preemptively discard all cells in a segmentsegment

Page 40: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control59

Performance of TCP over UBRPerformance of TCP over UBR

(UBR)

Page 41: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control60

ATM Switch Buffer Layout – ATM Switch Buffer Layout – Selective Drop and Fair Buffer Selective Drop and Fair Buffer AllocationAllocation

Page 42: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control61

EPD Fairness - Selective EPD Fairness - Selective DropDrop Ideally, Ideally, N/V cells bufferedN/V cells buffered for each of for each of

the V virtual channelsthe V virtual channelsWeight ratio, W(i) = N(i) = N(i) Weight ratio, W(i) = N(i) = N(i) × V× V N/V NN/V NSelective Drop:Selective Drop: If N > R and W(i) > ZIf N > R and W(i) > Z then drop next new packet on VC(i) then drop next new packet on VC(i) Z is a parameter to be chosen (studies Z is a parameter to be chosen (studies

show optimal Z slightly < 1)show optimal Z slightly < 1)

Page 43: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control62

Fair Buffer AllocationFair Buffer AllocationMore aggressive dropping of More aggressive dropping of

packets as congestion increasespackets as congestion increasesDrop new packet when:Drop new packet when:

N > R and W(i) > Z N > R and W(i) > Z × B – R× B – R N - RN - R

Note that the larger the portion of the “safety zone” (B-R) that is occupied, the smaller the number with which W(i) is compared.

R

Page 44: 1 Chapter 12 TCP Traffic Control. Chapter 12: TCP Traffic Control 2 Introduction 1. Performance implications of TCP Flow and Error Control 2. Performance

Chapter 12: TCP Traffic Control63

TCP over ABRTCP over ABR

Good performance of TCP over UBR can be Good performance of TCP over UBR can be achieved with minor adjustments to switch achieved with minor adjustments to switch mechanisms (i.e., PPD/EPD)mechanisms (i.e., PPD/EPD)

This This reduces the incentivereduces the incentive to use the more to use the more complex and more expensive ABR servicecomplex and more expensive ABR service

Performance and fairness of ABR is quite Performance and fairness of ABR is quite sensitive to some ABR parameter settingssensitive to some ABR parameter settings

Overall, ABR does not provide significant Overall, ABR does not provide significant performance over simpler and less performance over simpler and less expensive UBR-EPD or UBR-EPD-FBAexpensive UBR-EPD or UBR-EPD-FBA