This action might not be possible to undo. Are you sure you want to continue?

Ion Stoica

Computer Science Division Department of Electrical Engineering and Computer Sciences University of California, Berkeley Berkeley, CA 94720-1776

Router Support For Congestion Management

Traditional Internet

- Congestion control mechanisms at end-systems, mainly implemented in TCP - Routers play little role

**Router mechanisms affecting congestion management
**

- Scheduling - Buffer management

Traditional routers

- FIFO - Tail drop

2

**Drawbacks of FIFO with Tail-drop
**

Buffer lock out by misbehaving flows Synchronizing effect for multiple TCP flows Burst or multiple consecutive packet drops

- Bad for TCP fast recovery

3

FIFO Router with Two TCP Sessions

4

RED

**FIFO scheduling Buffer management:
**

- Probabilistically discard packets - Probability is computed as a function of average queue length (why average?)

Discard Probability

1

**0 min_th max_th queue_len Average Queue Length
**

5

RED (cont¶d)

**min_th ± minimum threshold max_th ± maximum threshold avg_len ± average queue length
**

- avg_len = (1-w)*avg_len + w*sample_len

Discard Probability

1

**0 min_th max_th queue_len Average Queue Length
**

6

RED (cont¶d)

If (avg_len < min_th) enqueue packet If (avg_len > max_th) drop packet If (avg_len >= min_th and avg_len < max_th) enqueue packet with probability P

Discard Probability (P)

1

**0 min_th max_th queue_len Average Queue Length
**

7

RED (cont¶d)

**P = max_P*(avg_len ± min_th)/(max_th ± min_th) Improvements to spread the drops P¶ = P/(1 ± count*P), where
**

count ± how many packets were consecutively enqueued since last drop

Discard Probability

max_P P

1

**0 min_th max_th queue_len Average Queue Length avg_len
**

8

RED Advantages

Absorb burst better Avoids synchronization Signal end systems earlier

9

RED Router with Two TCP Sessions

10

**Problems with RED
**

10

No protection: if a flow misbehaves it will hurt the other flows Example: 1 UDP (10 Mbps) and 31 TCP¶s sharing a 10 Mbps link

UDP

Throughput(Mbps)

8

ED

5 3 1 0 1 10 13 1 1 5 8 31

11

Flow Number

Solution?

**Round-robin among different flows [Nagle µ 7]
**

- One queue per flow

12

Round-Robin Discussion

**Advantages: protection among flows
**

- Misbehaving flows will not affect the performance of wellbehaving flows - FIFO does not have such a property

Disadvantages:

- More complex than FIFO: per flow queue/state - Biased toward large packets ± a flow receives service proportional to the number of packets (When is this bad?)

13

Solution?

Bit-by-bit round robin Can you do this in practice? No, packets cannot be preempted (why?) «we can only approximate it

14

**Fair Queueing (FQ) [DKS¶89]
**

Define a fluid flow system: a system in which flows are served bit-by-bit Then serve packets in the increasing order of their deadlines Advantages

- Each flow will receive exactly its fair rate

Note:

- FQ achieves max-min fairness

15

Max-Min Fairness

Denote

C ± link capacity N ± number of flows ri ± arrival rate

**Max-min fair rate computation:
**

1. compute C/N 2. if there are flows i such that ri <= C/N, update C and N

C ! C §i s.t r eC ri

i

3. if no, f = C/N; terminate 4. go to 1

**A flow can receive at most the fair rate, i.e., min(f, ri)
**

16

Example

C = 10; r1 = , r2 = 6, r3 = 2; N = 3 C/3 = 3.33 C = C ± r3 = ; N = 2 C/2 = 4; f = 4

8 6 2 10 4 4 2 f = 4: min( , 4) = 4 min(6, 4) = 4 min(2, 4) = 2

17

Alternate Way to Compute Fair Rate

If link congested, compute f such that

§ min(r , f ) ! C

i i

8 6 2

10

4 4 2

f = 4: min( , 4) = 4 min(6, 4) = 4 min(2, 4) = 2

18

Implementing Fair Queueing

Idea: serve packets in the order in which they would have finished transmission in the fluid flow system

19

Example

Flow 1 (arrival traffic) Flow 2 (arrival traffic)

1

2

3

4

6

time

1

2

3

4

time

Service in fluid flow system Packet system

1

2

1 3

2

3 4

4

6 time

1

2

1

3

2 3

4

4

6

time

20

**System Virtual Time: V(t)
**

**Measure service, instead of time V(t) slope ± rate at which every active flow receives service
**

- C ± link capacity - N(t) ± number of active flows in fluid flow system at time t

V(t)

x V (t ) C ! xt N (t )

time Service in fluid flow system

1

2

1 3

2

3 4

4

6 time

21

Fair Queueing Implementation

Define - Fi k finishing time of packet k of flow i (in system virtual time reference system) - aik- arrival time of packet k of flow i - Lk - length of packet k of flow i

i

**The finishing time of packet k+1 of flow i is
**

F i k 1 ! max( ( a ik ), F i k ) L k 1 i

22

**³Weighted Fair Queueing´ (WFQ)
**

**What if we don't want exact fairness?
**

- E.g.,: file servers

**Assign weight wi to each flow i And change virtual finishing time
**

k 1 i

! max( V ( a ik ),

k i

)

k 1 i

wi

23

Simulation Example

1 UDP (10 Mbps) and 31 TCPs sharing a 10 Mbps link

UDP (#1) TCP (#2) . . . TCP (#32)

UDP (#1) TCP (#2) . . . TCP (#32)

10 Mbps)

10 9

Throughput(Mbps)

Throughput(Mbps)

8 7 6 5 4 3 2 1 0 1

Stateless solution: Random Early Detection (RED)

0 0 0 03 03 0 0 01 01 00 0

Stateful solution: Fair Queueing

4

7

10

13

16

19

22

25

28

31

Flow Number

1

10

13

1

1 24

31

Flow Number

Core-Stateless Fair Queueing (CSFQ)

**Fair Queueing requires per flow state in routers
**

- Maybe impractical for very high speed routers

Core Stateless Fair Queueing eliminates the state at core routers « « but only approximates FQ¶s behavior

25

Insight

**If each packet of a flow with arrival rate r is forwarded with probability
**

¨ f¸ P ! min ©1, ¹ ª rº

**the rate of flow¶s forwarded traffic r¶ is
**

¨ f ¸ r ' ! r v P ! r v min©1, ¹ ! min(r , f ) ª rº

**No need to maintain per-flow state if r is carried in the packet
**

- Need to update rate in packet to r¶

26

CSFQ

**A contiguous and trusted region of network in which
**

- Edge nodes ± perform per flow operations - Core nodes ± do not perform any per flow operations

27

Algorithm Outline

Ingress nodes: estimate rate r for each flow and insert it in the packets¶ headers

28

Algorithm Outline

Ingress nodes: estimate rate r for each flow and insert it in the packets¶ headers

29

Algorithm Outline

Core node:

- Compute fair rate f on the output link - Enqueue packet with probability

P = min(1, f / r)

- Update packet label to r = min(r, f )

30

Algorithm Outline

Egress node: remove state from packet¶s header

31

Example: CSFQ

**Assume estimated fair rate f = 4
**

- flow 1, r = => P = min(1, 4/8) = 0.5 expected rate of forwarded traffic 8*P = 4 - flow 2, r = 6 => P = min(1, 4/6) = 0.67 expected rate of forwarded traffic 6*P = 4 - flow 3, r = 2 => P = min(1, 4/2) = 1 expected rate of forwarded traffic 2 Core Node (10 Mbps)

FIFO 6 2 6 6 6 2 4 4 2 4 4 4

6 2

10

8 6 2

8

8

8

8

8

4 4 4 2 2

32

Fair Rate Estimation

8 6 2

Observation: rate of aggregate forwarded rate (R) is a monotonic and non-decreasing function of estimated rate f min(8, f ) C=10 min(6, f ) R ( f ) ! min(8, f ) min(6, f ) min(2, f )

min(2, f )

R( f )

16

10 6

C

0

0 1 2 3 4

6 7

9 10

f

33

Simulation Example

10

oughput( bps)

UDP (#1) TCP (#2) . . . TCP (#32)

UDP (#1) TCP (#2) . . . TCP (#32)

8

Stateless solution: Random Early Detection

5 4 3 2 1 0 1 4 7 10 13 16 19 22 25 28 31

10 Mbps)

Flow Numbe

0.5

hroughput( bps)

0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 1 4 7 10 13 16 19 22 25 28 31

Throughput( bps)

0.45

Stateful solution: Fair Queueing

0.5 0.45 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 1

Our Solution: Core-Stateless Fair Queueing

34

4 7 10 13 16 19 22 25 28 31

Flow Numbe

Flow Number

Summary

FQ does not eliminate congestion it just manages the congestion You need both end-host congestion control and router support for congestion control

- End-host congestion control to adapt - Router congestion control to protect/isolate

Don¶t forget buffer management: you still need to drop in case of congestion. Which packet¶s would you drop in FQ?

- One possibility: packet from the longest queue

35

Announcements

Project feedback

- Tuesday, Feb 14, 12:30-2pm - Wednesday, Feb 1 , 11:30-1pm

36

- Green inertia
- Green Inertia -Firm Presentation-April 2011-1
- Sigmetrics.CaseForESM.2000
- narada
- Multi Cast
- esm
- Thesis Weishenmsc
- Torrent Clustering
- legout_BT_IMC2006
- chokeAnalysisSIGMETRICS2007
- rmbotnets
- p4-rajab
- 12-Understanding the Botnet
- tam-chord
- Chord
- chord-ton
- 2004-11-23_Paper1
- CSFQ07
- CongestionControl-VJ
- aimd
- 081020-TCP
- BGP Convergence
- Lecture 02
- px+04

- Tuning Red
- lec4_congestioncontrol
- congestion.ppt
- Queue Management
- 06 Router Cong
- TCP Congestion Control
- note8_ho
- MY_TPP
- 5th.ppt
- 117990962 Congestion Control
- Arquitectura de Redes QoS 14
- queue1`
- Feng 99 Blue
- 06 Congestion
- IIJCS-2014-08-13-15
- Bab 6 Pertemuan 2 Vs2
- 123f11_Lec15
- fasttcp
- Aqm Reserch Paper
- Effects of ACM
- 050111 - Kuechler, Schapranow, - Congestion Control
- rfc-2309.pdf
- Tcpip Cong
- cs164lec14
- congestion.pdf
- Performance Analysis of Receive-Side Real-Time Congestion Control for WebRTC
- computer networks
- Paper 6
- CongestionControl-VJ
- Documents The Effects of Active Queue Management on Web Performance
- 8-RouterSupport

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue reading from where you left off, or restart the preview.

scribd