CC 1
CC 1
Part 1:
Theory
1
Contents
1. What is the problem; congestion collapse
2. Efficiency versus Fairness
3. Definitions of fairness
4. Additive Increase Multiplicative Decrease (AIMD)
5. Slow start
2
1. Congestion Collapse
C3 = 110 Kb/s
S2
C2 = 1000 Kb/s C5 = 10 Kb/s D2
S2
C2 = 1000 Kb/s x52 = 10 D2
C5 = 10 Kb/s
Take-home message 1: greedy sources may be inefficient
A better allocation is:
S1: 100 kb/s
S2: 10 kb/s
The problem was that S2 sent too much (but it did not know)
S2
C2 = 1000 Kb/s x5,2 = 10 D2
C5 = 10 Kb/s
Example 2: Congestion collapse
Assume: Each source sends traffic 2 hops away at rate λ
e.g., source i, at node i, sends traffic to a destination at node i + 2
All links have the same capacity c
Loss is proportional to submitted traffic and links can be fully utilized
source i λ node
Let:
link i i+1
• λ′ = the survived rate of λ node i
at the first link link (i-1) λ′ link (i+1)
λ′′ = the survived rate of λ
λ′′
•
at the second link = throughput
2( )
λ 4
" = − −1 + 1+
λ′′
cong
estio
n col
lapse
λ′′
cong
estio
n col
lapse
c/2 = 10
λ


2. Efficiency vs Fairness
A network should be organized so as to avoid inefficiency,
but being maximally efficient may cause other problems
Total pse
Colla
2M s
r
surfe
lo s e
net
inter
1
Go to web.speakup.info
2
1 flow or
9 flows download speakup app
Join room
46045
𝑥
𝑥
𝑥
Solution
Answer C 0 1 flow
c=10 Mb/s c = 10 Mb/s
1
Total throughput = 0 + 1 + 9 2 2
Maximize = 0 + 1 + 9 2
1 flow
9 flows
subject to 0 + 1 ≤ 10, 0 + 9 2 ≤ 10
over 0 ≥ 0, 1 ≥ 0 2 ≥ 0
The max can be obtained by linear programming, or directly here by inspection:
• ≤ 20 because 0 + 1 ≤ 10, 9x2 ≤ 10 − x0 and x0 ≥ 0
• = 20 is achieved with 1 = 10 and x2 = 10/9
therefore the max is 20 Mb/s
𝑥
𝑥
𝑥
𝜃
𝜃
𝑥
𝑥
𝑥
𝜃
𝑥
𝜃
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
Solution
0 1 flow
c=10 Mb/s c = 10 Mb/s
And we can also prove that this is
the only maximizing allocation:
Is the allocation
10
{x0 = 0, x1 = 10, x2 = }
9
Pareto-efficient? 1 = 10
A. 0 = 1, 1= 0.5, 2 = 8, 3 = 1
Go to web.speakup.info
B. 0 = 1, 1 = 1, 2 = 8, 3 = 1 or
0 = 1, 1 = 1, 2 = 2, 3 = 7
download speakup app
C. Join room
46045
D. A and B
E. A and C
flow 0
F. B and C
2 Gb/s 9 Gb/s 10 Gb/s
G. All
H. None flow 1 flow 2 flow 3
I. I don’t know
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
Solution
Answer F (B and C)
0 =1 0 =1 0 =1
1 = 0.5
2 =8 2 =8
3=1
Allocation A: 0 = 1, 1 = 0.5, 2 = 8, 3 = 1
Flow 1 does not have a bottleneck.
Its rate can be increased unilaterally.
For example, we can increase 1 to ′1 = 0.6 while leaving the other rates
unchanged and still obtain a feasible allocation.
Allocation A is not Pareto-efficient
𝑥
𝑥
𝑥

𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
Solution
Allocation B: 0 = 1, 1 = 1, 2 = 8, 3 =1
So:
➡ Are there Pareto efficient allocations that are fair ?
➡ What is a good definition of fairness?
3. Definition 1: Egalitarianism (or Neutrality):
”Allocate as much as possible but same to all.”
Go to web.speakup.info
or
download speakup app
Join room
In this example, what is a fair/egalitarian allocation? 46045
A. 0= 1=
= 0.5 2 /
B. 0= 2=11= /
10
C. 0= 1= 2= /
9
D. All of them
E. None of the above
F. I don’t know
𝑥
𝑥
𝑥
𝑀
𝑏
𝑠
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑀
𝑀
𝑏
𝑏
𝑠
𝑠
Solution
Maximize = 0 = 1 = 2 subject to
2 ≤ 10
10 ≤ 10
with ≥ 0
Answer B
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
Egalitarianism is not always Pareto-efficient
• Egalitarianism gives = 1 Mb/s to all
but, we could give more to 1
without hurting anyone
➡ So, allocation is not Pareto-efficient
I.e. for every flow , increasing its rate must force the rate of some other, not richer
flow j to decrease
A. A
B. B
C. A and B
D. None Go to web.speakup.info
or
E. I don’t know download speakup app
Join room
46045
A B
Solution x0 = 0 Mb/s x0 = 1 Mb/s
x1 = 10 Mb/s x1 = 9 Mb/s
10
x2 = Mb/s x2 = 1 Mb/s
9
Allocation A
Increase 0 (e.g. 0 ← 1 ) and decrease 1 ( 1 ← 9) and 2 ( 2 ← 1);
this does not contradict fairness because 1 and 2 are larger than 0
So, there exists one increase that does not contradict fairness
A is not max-min fair
Allocation B
If I increase 0 I must decrease 2 ⇒ contradicts fairness
If I increase 1 I must decrease 0 ⇒ contradicts fairness
If I increase 2 I must decrease 0 ⇒ contradicts fairness
Any increase contradicts fairness
B is max-min fair
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
Max-Min fairness: properties and computation
Given a set of constraints, i.e. a set of feasible allocations:
a. if it exists, the max-min fair allocation is unique
b. there does exist a max-min fair allocation, if the set of feasible allocations is
convex (which is the case in networks, as we have linear constraints)
c. the max-min fair allocation is Pareto-efficient (converse is not true)
For a convex set of feasible rates (as in our case), the unique max min fair
allocation is obtained by the water-filling algorithm:
1. mark all flows as non frozen
2. do
3. increase the rate of all non frozen flows to the largest possible common value
4. mark flows that use a saturated link as frozen
5. until all flows are frozen
Water-Filling:
Example
Step 1:
• maximize such that 0= 1= 2= and all constraints are satisfied;
we find = 1, hence 0= 1= 2=1;
• link 2 is saturated, is used by flows 0 and 2 ⇒ mark flows 0 and 2 as frozen
Step 2 :
• maximize such that 1 = , with 0= 1, 2 = 1 and all constraints are satisfied; we
find = 9, hence 0 = 2 = 1 and 1=9
• link 1 is saturated, is used by sources 0 and 1 ⇒ mark flow 1 as frozen; all flows are
frozen, STOP.
The max-min fair allocation is 0 = 2 = 1 and 1 = 9
𝑥
𝑥
𝑥
𝑡𝑥
𝑥
𝑡
𝑡𝑥
𝑥
𝑥
𝑡
𝑥
𝑥
𝑥
𝑡
𝑥
𝑥
𝑥
𝑥
𝑡
What is the max-min fair allocation ?
0
c c c c
1 2 3 4
A. = ∀
2
2
B. 0= , ∀ ≠0 =
3 3
3
C. 0= , = ∀ ≠0
4 4
4
D. 0 = , = ∀ ≠0
5 5 Go to web.speakup.info
or
E. None of the above download speakup app
F. I don’t know Join room
𝑖
𝑖
𝑖
46045
𝑖
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑖
𝑖
𝑖
𝑥
𝑖
𝑥
𝑥
𝑥
𝑥
𝑥
𝑐
𝑐
𝑐
𝑐
𝑐
𝑐
𝑐
Solution
0
c c c c
1 2 3 4
Answer A
The max-min fair allocation via water-filling gives the same rate to all flows
2
I.e.: An allocation is proportionally fair, if for any other allocation, the total rate of change or
Δxi
∑ xi
relative change is non-positive, i.e. “the other rates are relatively worse in total”
i
→ → x′i − xi
∑ xi
Conversely: An allocation > 0 is not proportionally fair iff there exists ′ s.t.: > 0.
i
Answer D
Let ← + for = 1…4 and 0 ← 0 − .
If is small enough (i.e. 0 < ≤ ), the new allocation is feasible (= within constraints).
2
The total rate of change is − +4 > 0.
2 2
So, we could change the allocation and obtain a positive total rate of change.
Let 2 ← 2 + and 0 ← 0 − 9 ; 1 ← 1 + 9 .
1
If is small enough (i.e. 0 < ≤ ), the new allocation is feasible.
9
9 9
The total rate of change is − + + 9 = > 0.
1 9 1
So, we could change the allocation and obtain a positive total rate of change.
( ) ∑ log
→ ≔
( ) ∑
Intuitive explanation via gradient: → = .
So, deviating from the maximum means going towards a non-positive gradient
=> the total rate of change is non-positive
𝑖
𝑖
=> the maximizing allocation is proportionally fair!
𝑖
𝑥
𝑖
𝑑
𝐽
𝑥
𝐽
𝑥
𝑥
𝑖
𝑑
𝑥
Let us compute the proportionally fair allocation
0
c c c c
1 2 3 4
0+ 2≤
0+ 3≤
0+ 4≤
We can use convex optimization techniques to solve this, but here we can also do a direct solution…
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑈
𝑥
𝑥
𝑥
𝑥
𝑐
𝑐
𝑐
𝑐
𝑥
𝑥
𝑥
𝑥
𝑥
Let us compute the proportionally fair allocation
0
c c c c
1 2 3 4
0+ 2≤
0+ 3≤
0+ 4≤
Observe: at the maximum point, we must have equality in all constraints otherwise we can increase
(i ≠ 0) and increase U (i.e. find a better maximum).
Therefore, for any choice of 0 = ∗, we must have 1 = 2 = 3 = 4 = − ∗.
𝑖
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑈
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑐
𝑐
𝑐
𝑐
𝑥
𝑥
𝑥
𝑥
𝑐
𝑥
𝑥
𝑥
𝑥
Let us compute the proportionally fair allocation
0
c c c c
1 2 3 4
A. 0 = 1, 1 = 9, 2 = 1
B. 0 = 0.909, 1 = 9, 2 = 1 . 010
C. 0 = 1 . 009, 1 = 8.991, 2 = 0.999
D. 0 = 0.909, 1 = 9 . 091, 2 = 1 . 010
E. I don’t know
Go to web.speakup.info
or
download speakup app
Join room
46045
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
Solution
Answer D. Why?
If we take some other utility function, we have what is called a utility fairness.
It can be shown that max-min fairness is the limit of utility fairness when the
utility function converges to a step function.
But max-min fairness cannot be expressed exactly as a utility fairness (only at the limit).
1
( )= 1− : large ⇒ ≈ max min fairness
𝑖
𝑥
𝑚
Rate
𝑈
𝑥
𝑖
𝑖
𝑖
𝑖
𝑖
𝑈
𝑥
𝑈
𝑥
𝑥
𝑈
𝑥
𝑚
𝑥
𝑥
Recap
Sources should adapt their rate to the state of the network in order to avoid
inefficiencies and congestion collapse.
This is called “congestion control”.
Fair Queuing per Flow: One queue per flow / per user, served round robin
Cellular networks, industrial networks, in-vehicle networks
End-to-end: hosts “taste the water” and increase or decrease their sending rate
using a host congestion control algorithm
The solution in the Internet
Additive Increase Multiplicative Decrease (AIMD)
• First congestion control algorithm deployed in the Internet and before that, in
Decnet (the “Decbit”)
• Still widely deployed today
Raj Jain
Rate ( ) Capacity
∑
( ) = 1 if ()> —> negative feedback
1 + 2 ≤
Rate of source 1
1
𝑥
𝑥
𝑥
𝑥
𝑥
𝑦
𝑦
𝑦
𝑡
𝑡
𝑡
𝑥
𝑥
𝑐
1 = 2
Zoom on 2
sources ;
1
say what is →
true 2
2
A. 1 = additive increase,
1
2 = multiplicative increase
B. 1 = multiplicative increase
2 = additive increase,
C. None of the above Go to web.speakup.info
D. I don’t know or
download speakup app
Join room
46045
𝑥
𝑥
𝑥
𝑥
𝑥
1 = 2
→+( , )
0 0
→
Solution 1 0
→
2
2
1 = additive increase,
2 = multiplicative increase
Answer A
𝑢
𝑥
𝑥
𝑥
𝑣
𝑣
𝑥
𝑥
𝑥
𝑥
→ + ( , Additive increase
0 0)
→
0
Additive decrease
Among the linear controls, only additive increase – multiplicative decrease (AIMD)
tends to bring the allocation towards fairness and efficiency.
This is what was implemented in the Internet after the first congestion collapses.
In a more complex network setting, what type of
fairness does AIMD achieve?
A. Max-min
B. Proportional
C. None of the above
D. I don’t know
Fairness of AIMD
Answer C
AIMD with: additive increase + , multiplicative decrease × (1 − ), and one update
per time unit implements utility fairness, with utility of flow given by
≈maxmin AIMD
proportional fairness
Source 3
Source 1
Slow Start
rate of this source
• For a short period of time increase the rate
multiplicatively (by 0, e.g. 0 = 2) until a
target rate is reached or negative feedback
target
is received
time
• Exit slow start when target rate is reached
𝑢
𝑢
𝑤
𝑤
Source 3
Target rate
Actual rate
End of slow start
Source 1 time
Source 3 3 sources
u1 = 0.5, v1 =0, u0 = 0, v0 = 0.01 (unit: Mb/s)
3rd source starts with rate v0
Source 1 time
Conclusion
Congestion control is necessary to avoid inefficiencies and collapses
A congestion control scheme aims at allocating rates according to some
form of fairness
In the internet, we use end-to-end congestion control with
≈ AIMD
Slow Start
and other refinements – see part 2: Congestion Control — Implementation