End-end congestion control: window-based congestion control Sending transport entity maintains...

18
window-based congestion window-based congestion control control Sending transport entity maintains congestion Sending transport entity maintains congestion window over sequence number space window over sequence number space can send a packet if packet seq. # in window can send a packet if packet seq. # in window distinct from flow control window distinct from flow control window On timeout On timeout loss assumed loss assumed decrease congestion window size decrease congestion window size increase timeout value (in case packet was delayed) increase timeout value (in case packet was delayed) ACK received: increase window size ACK received: increase window size everything is OK, so allow even larger window everything is OK, so allow even larger window Copyright 1998. All Rights Reserve J. Kurose, D. Towsley.

Transcript of End-end congestion control: window-based congestion control Sending transport entity maintains...

Page 1: End-end congestion control: window-based congestion control Sending transport entity maintains congestion window over sequence number space  can send.

End-end congestion control:End-end congestion control:window-based congestion controlwindow-based congestion control

Sending transport entity maintains congestion window over Sending transport entity maintains congestion window over sequence number spacesequence number space

can send a packet if packet seq. # in window can send a packet if packet seq. # in window distinct from flow control windowdistinct from flow control window

On timeoutOn timeout loss assumed loss assumed decrease congestion window size decrease congestion window size increase timeout value (in case packet was delayed)increase timeout value (in case packet was delayed)

ACK received: increase window sizeACK received: increase window size everything is OK, so allow even larger windoweverything is OK, so allow even larger window

Copyright 1998. All Rights Reserved,

J. Kurose, D. Towsley.

Page 2: End-end congestion control: window-based congestion control Sending transport entity maintains congestion window over sequence number space  can send.

End-end congestion control: TCPEnd-end congestion control: TCP

Uses window-based congestion controlUses window-based congestion control

Two variables usedTwo variables used cwndcwnd: congestion window size : congestion window size ssthreshssthresh: threshold for slowing down rate of increase: threshold for slowing down rate of increase

TCP slow start + congestion avoidance:TCP slow start + congestion avoidance: assume 4K segment sizeassume 4K segment size TCP window size = min(flow control window size, congestion TCP window size = min(flow control window size, congestion

control window size)control window size)

Page 3: End-end congestion control: window-based congestion control Sending transport entity maintains congestion window over sequence number space  can send.

initialize: cwnd=1initialize: cwnd=1 ssthresh=16ssthresh=16loop: if (ACK received and cwnd <= ssthresh)loop: if (ACK received and cwnd <= ssthresh) cwnd = cwnd+1cwnd = cwnd+1 else if (ACK received and cwnd > ssthresh)else if (ACK received and cwnd > ssthresh) cwnd = cwnd + 1/cwndcwnd = cwnd + 1/cwnd else if packet timeoutelse if packet timeout ssthresh = cwnd/2 /* new thresh half ssthresh = cwnd/2 /* new thresh half current win */current win */ cwnd = 1 /* new window size back cwnd = 1 /* new window size back to 1 */to 1 */

foreverforever

Page 4: End-end congestion control: window-based congestion control Sending transport entity maintains congestion window over sequence number space  can send.

Network-indicated Congestion ControlNetwork-indicated Congestion Control

Window-based control strictly end-endWindow-based control strictly end-end network layer not involved, but congestion occurs in network network layer not involved, but congestion occurs in network

layer!layer!

One network-indicated approach:One network-indicated approach: network "marks" network "marks" packets passing through congested nodepackets passing through congested node

receiver sees congestion indication mark and tells receiver sees congestion indication mark and tells sender to slow down sender to slow down

congestion-experienced flag in ISO CLNP, CWI congestion-experienced flag in ISO CLNP, CWI (change window indicator) in IBM SNA virtual route (change window indicator) in IBM SNA virtual route pacingpacing

Page 5: End-end congestion control: window-based congestion control Sending transport entity maintains congestion window over sequence number space  can send.
Page 6: End-end congestion control: window-based congestion control Sending transport entity maintains congestion window over sequence number space  can send.

Network-indicated Congestion Network-indicated Congestion Control (cont)Control (cont)

Second network-indicated approach: upon detecting Second network-indicated approach: upon detecting congestion, congested router sends explicit message congestion, congested router sends explicit message back to traffic sources to slow them downback to traffic sources to slow them down

text: choke packets text: choke packets source quench in ICMP (Internet control message source quench in ICMP (Internet control message

protocol) protocol) VR-RWI bit in SNA VR pacingVR-RWI bit in SNA VR pacing

Page 7: End-end congestion control: window-based congestion control Sending transport entity maintains congestion window over sequence number space  can send.

Network Indicated CongestionNetwork Indicated CongestionControl: DifficultiesControl: Difficulties

Receiver-initiated control may have long feedback time Receiver-initiated control may have long feedback time in high-speed networksin high-speed networks

sender may have 1000’s sent (but unACKed) packets before sender may have 1000’s sent (but unACKed) packets before congestion indicator receivercongestion indicator receiver

pipe filled alreadypipe filled already

Both approaches require coupling of network and Both approaches require coupling of network and transport layertransport layer

OK for homogeneous networks OK for homogeneous networks difficult in internetworked environment, with different network difficult in internetworked environment, with different network

layerslayers

Page 8: End-end congestion control: window-based congestion control Sending transport entity maintains congestion window over sequence number space  can send.

Rate-Based congestion controlRate-Based congestion control congestion control particularly hard in high-speed networks congestion control particularly hard in high-speed networks e.g.,: 1 Gbit. sec link, 1Kbyte packet takes 8 e.g.,: 1 Gbit. sec link, 1Kbyte packet takes 8 sec to transmit sec to transmit thousands of packets "in the wire" propagating cross country thousands of packets "in the wire" propagating cross country when congestion occurs, too late to react when congestion occurs, too late to react avoid congestion by regulating flow of packets into network avoid congestion by regulating flow of packets into network

smoother flows will avoid bursts of packets from different senders smoother flows will avoid bursts of packets from different senders arriving at same node and causing congestion arriving at same node and causing congestion

smooth out packet bursts at network edge on per session basis smooth out packet bursts at network edge on per session basis before they enter network.before they enter network.

Page 9: End-end congestion control: window-based congestion control Sending transport entity maintains congestion window over sequence number space  can send.

Rate Based Congestion Control: Rate Based Congestion Control: Leaky BucketLeaky Bucket

Goal:Goal: regulate rate at which sender can inject packets into regulate rate at which sender can inject packets into networknetwork

Page 10: End-end congestion control: window-based congestion control Sending transport entity maintains congestion window over sequence number space  can send.

Rate Based Congestion Control: Rate Based Congestion Control: Leaky BucketLeaky Bucket

Goal:Goal: regulate rate at which sender can inject packets into regulate rate at which sender can inject packets into networknetwork

a packet must match up with (and remove ) a token a packet must match up with (and remove ) a token before entering network before entering network

tokens added to bucket at rate tokens added to bucket at rate rr: controls long term rate : controls long term rate of packet entry into network of packet entry into network

at most at most bb tokens accumulate in bucket. Bucket size tokens accumulate in bucket. Bucket size bb control control "burstiness""burstiness" of arrivals of arrivals

maximum number of packets entering network in maximum number of packets entering network in tt time time units is units is b+rtb+rt

XTP uses rate and burst parameters analagous to XTP uses rate and burst parameters analagous to r,br,b

Page 11: End-end congestion control: window-based congestion control Sending transport entity maintains congestion window over sequence number space  can send.

Congestion control by Buffer Congestion control by Buffer PreallocationPreallocation

lack of buffering in network is fundamental cause of congestion lack of buffering in network is fundamental cause of congestion avoid congestion by allocating buffers to an end-end connection avoid congestion by allocating buffers to an end-end connection if insufficient buffers for a new connection, block it (as in circuit switching)if insufficient buffers for a new connection, block it (as in circuit switching)

buffers dedicated to buffers dedicated to connection, link still shared connection, link still shared protects behaving protects behaving

connections from connections from misbehaving onemisbehaving one

data link layer involved data link layer involved in transport layer in transport layer congestion controlcongestion control

Page 12: End-end congestion control: window-based congestion control Sending transport entity maintains congestion window over sequence number space  can send.

Congestion Control in ATM ABR ServiceCongestion Control in ATM ABR Service

ATM ABR (available Bit Rate) serviceATM ABR (available Bit Rate) service: : allows sender to send at rate up to a peak cell rate (PCR) allows sender to send at rate up to a peak cell rate (PCR) guarantees a rate of at least minimum cell rate (MCR) guarantees a rate of at least minimum cell rate (MCR)

when needed when needed sender rate may fluctuate between 0 and PCR, depending sender rate may fluctuate between 0 and PCR, depending

on sender need, network congestionon sender need, network congestion provides provides max-minmax-min fairness among sessions fairness among sessions

Congestion Control in ABR service:Congestion Control in ABR service: combines aspects of rate-based and network-indicated combines aspects of rate-based and network-indicated

congestion controlcongestion control

Page 13: End-end congestion control: window-based congestion control Sending transport entity maintains congestion window over sequence number space  can send.

ATM ABR Congestion Control: EFCIATM ABR Congestion Control: EFCI

EFCI:EFCI: explicit forward congestion indication explicit forward congestion indication based on negative feedback ("bad things are happening") to based on negative feedback ("bad things are happening") to

sendersender congested node (queue length > threshold) marks EFCI bit in congested node (queue length > threshold) marks EFCI bit in

sender-to-receiver cell sender-to-receiver cell receiver sees EFCI set and notifies sender receiver sees EFCI set and notifies sender sender sender decreasesdecreases cell rate: cell rate: ACR: allowed cell rateACR: allowed cell rate

ACR = max(ACR * multiplicative decrease, MCR)ACR = max(ACR * multiplicative decrease, MCR) sender sender increasesincreases cell rate if no negative feedback in an update cell rate if no negative feedback in an update

interval: interval:

ACR = min(ACR+ additive_increase, PCR)ACR = min(ACR+ additive_increase, PCR)

Page 14: End-end congestion control: window-based congestion control Sending transport entity maintains congestion window over sequence number space  can send.

ATM ABR Congestion Control: ATM ABR Congestion Control: explicit ratesexplicit rates

Sender declares every Sender declares every N-N-th cell as "RM" cellth cell as "RM" cell RM: resource management RM: resource management records its PCR, allowed_call_rate in RM cell records its PCR, allowed_call_rate in RM cell ER field in RM cell: used by switches to set source rateER field in RM cell: used by switches to set source rate

Switch on sender-to-receiver path: if congestedSwitch on sender-to-receiver path: if congested determine new rate for that source (consider PCR, determine new rate for that source (consider PCR,

ACR) ACR) set ER field to indicate new rate only if new rate less set ER field to indicate new rate only if new rate less

than current ER valuethan current ER value

Page 15: End-end congestion control: window-based congestion control Sending transport entity maintains congestion window over sequence number space  can send.

Connection Management: Connection Connection Management: Connection ParadigmsParadigms

Connection-orientedConnection-oriented explicitly setup/tear down connections explicitly setup/tear down connections setup up session context setup up session context initial sequence number, flow control window size initial sequence number, flow control window size exchange data within context of connection exchange data within context of connection e.g., TCP, ISO TP4e.g., TCP, ISO TP4

Page 16: End-end congestion control: window-based congestion control Sending transport entity maintains congestion window over sequence number space  can send.

Connection Paradigms (cont)Connection Paradigms (cont)

Connectionless serviceConnectionless service pure datagram pure datagram one-time unreliable send one-time unreliable send e.g., UDP (RFC 768), ISO CLTP (ISO 8072) e.g., UDP (RFC 768), ISO CLTP (ISO 8072) transaction oriented transaction oriented single request from sender, single reply from receiver single request from sender, single reply from receiver VMTP protocolVMTP protocol

Page 17: End-end congestion control: window-based congestion control Sending transport entity maintains congestion window over sequence number space  can send.

Connection Management: Connection Management: Fundamental IssuesFundamental Issues

Source of problems:Source of problems: network can delay, reorder lose packets network can delay, reorder lose packets timeout/retransmit introduces duplicates of data, ACKs, connect, timeout/retransmit introduces duplicates of data, ACKs, connect,

close packetsclose packets

On packet arrival:On packet arrival: is it real or is it memorex? is it real or is it memorex? new connection request/release from "real live client" or an old one new connection request/release from "real live client" or an old one transport protocols must create/maintain/destroy enough "state” transport protocols must create/maintain/destroy enough "state”

information to answer the memorex question information to answer the memorex question explicit connection establishment/teardown with connection-oriented explicit connection establishment/teardown with connection-oriented

serviceservice

Page 18: End-end congestion control: window-based congestion control Sending transport entity maintains congestion window over sequence number space  can send.

Connection Management:Connection Management:

Two basic approaches for setting up a Two basic approaches for setting up a connectionconnection

two way handshake with wristwatch two way handshake with wristwatch three way handshakethree way handshake