CS144 An Introduction to Computer Networks

Post on 20-Jan-2016

74 views 0 download

description

CS144 An Introduction to Computer Networks. Flow Control, Congestion Control and the size of Router Buffers Section. Nick McKeown Professor of Electrical Engineering and Computer Science, Stanford University. Outline. Flow Control Congestion Control The size of Router Buffers. - PowerPoint PPT Presentation

transcript

1

CS144An Introduction to Computer Networks

Flow Control, Congestion Control and the size of Router Buffers

Section

Nick McKeownProfessor of Electrical Engineering and Computer Science, Stanford University

2

Outline

Flow ControlCongestion ControlThe size of Router Buffers

CS144, Stanford University

3

Sliding WindowWindow Size

Outstanding Datasent, but un-ack’d

Data OK to send

Data not OK to send yet

Data ACK’d

4

Flow Control

CS144, Stanford University

userOS

Resequence, ACK, etc

RcvBuffer

Inside Destination

Arriving packets

5

Dynamics of flow control

CS144, Stanford University

Animation at:http://media.pearsoncmg.com/aw/aw_kurose_network_4/applets/flow/FlowControl.htm

6

Outline

Flow ControlCongestion ControlThe size of Router Buffers

CS144, Stanford University

7

TCP Sliding Window

ACK

Window Size

Round-trip time

(1) R x RTT > Window size

ACK

Window Size

Round-trip time

(2) R x RTT = Window size

ACK

Window Size

ACK ACK

A

B

8

“Bag of packets”

If there is a single flow, TCP is probing to find out how big the “bag” is so it can fill it.

In general, a TCP flow is trying to figure out how much room there is in the “bag” for its flow.

CS144, Stanford University

9

TCP Congestion ControlTCP varies the number of outstanding packets in the

network by varying the window size:

Window size = min{Advertised window, Congestion Window}

Receiver Transmitter (“cwnd”)

10

AIMDAdditive Increase, Multiplicative Decrease

CS144, Stanford University

11

Leads to the AIMD “sawtooth”

t

cwnd

halved

“Drops”

12

Dynamics of an AIMD flow

CS144, Stanford University

Animation at:http://guido.appenzeller.net/anims/

13

Outline

Flow ControlCongestion ControlThe size of Router Buffers

CS144, Stanford University

14

The size of a router buffer

CB

15

Rule-of-Thumb

Buffer size = 2T x C, where:2T = RTTmin = 2(propagation delay + packetization delay)

C = capacity of outgoing line.

Example: 10Gb/s interface, with 2T = 250ms300Mbytes of buffering.Read and write new packet every 32ns.

16

The Story

)(logO2

2 )2()1( Wn

CTCT

)(logO

22 )2()1( W

n

CTCT

10,000 20# packetsat 10Gb/s 1,000,000

(1) Assume: Large number of desynchronized flows; 100% utilization(2) Assume: Large number of desynchronized flows; <100% utilization

17

Time evolution of a single TCP flow through a router. Buffer is < 2T*C

Time Evolution of a Single TCP FlowTime evolution of a single TCP flow through a router. Buffer is 2T*C

18

Buffer size = 2T x C

Interval magnifiedon next slide

19

When sender pauses, buffer drains

one RTTDrop

20

Origin of rule-of-thumbBefore and after reducing window size, the sending rate of the

TCP sender is the same

Inserting the rate equation we get

The RTT is part transmission delay T and part queueing delay B/C . We know that after reducing the window, the queueing delay is zero.

newold RR

new

new

old

old

RTT

W

RTT

W

T

W

CBT

W oldold

2

2/

/2

BCT 2

21

Rule-of-thumb

Rule-of-thumb makes sense for one flowTypical backbone link has > 20,000 flowsDoes the rule-of-thumb still hold?

Answer: - If flows are perfectly synchronized, then Yes.- If flows are desynchronized then No.

22

The Story

)(logO2

2 )2()1( Wn

CTCT

)(logO

22 )2()1( W

n

CTCT

10,000 20# packetsat 10Gb/s 1,000,000

(1) Assume: Large number of desynchronized flows; 100% utilization(2) Assume: Large number of desynchronized flows; <100% utilization

23

Synchronized Flows

Aggregate window has same dynamicsTherefore buffer occupancy has same dynamicsRule-of-thumb still holds.

2maxW

t

max

2

W

maxW

maxW

24

ProbabilityDistribution

Buffer Size

W

Many TCP Flows

25

2T C

n

Simulation

Required Buffer Size - Simulations

26

Level3 WAN Experiment

High link utilization for two weeksBuffer sizes on three parallel links:

- 190ms (190K packets)- 10ms (10K packets)- 1ms (1k packets)

Note: This slide had a typo that caused some confusion (for me!) during class.

27

Drop vs. LoadBuffer = 190ms, 10ms

0

0.04

0.08

0.12

0.16

0.2

0 20 40 60 80 100

Load (%)

Pa

ck

et

Dro

p R

ate

(%

)

28

Drop vs. LoadBuffer = 1ms

0

0.04

0.08

0.12

0.16

0.2

0 20 40 60 80 100

Load (%)

Pa

ck

et

Dro

p R

ate

(%

)

29

The Story

)(logO2

2 )2()1( Wn

CTCT

)(logO

22 )2()1( W

n

CTCT

10,000 20# packetsat 10Gb/s 1,000,000

(1) Assume: Large number of desynchronized flows; 100% utilization(2) Assume: Large number of desynchronized flows; <100% utilization

30

Buffer SizeT

hro

ug

hpu

t

10,000

100%

1,000,00010Gb/s WAN

Number of packets

On-chip buffersSmaller designLower power

tW

indo

w S

ize

Buffer

31

Buffer SizeT

hro

ug

hpu

t

log(W)

10,000~50

~ 90%100%

1,000,00010Gb/s WAN

Number of packets

20 pkts

Integrated all-optical buffer [UCSB 2008]

On-chip buffersSmaller designLower power

3232

Consequences?

10-50 packets on a chip