Transport Overview

Computer Networks
Lecture 19
TCP/Vegas,
TCP Dynamics;
Transport Bandwidth Allocation Framework
11/7/2013
1
Admin.
 Exam 1 to be returned next Tuesday
 Assignment four
 Questions?
 Please schedule a design meeting with me or a TF
2
Recap: TCP/Reno: Big Picture
cwnd
TD
TD
TD
TO
ssthresh
ssthresh
ssthresh
ssthresh
Time
slow
start
congestion
avoidance
congestion
avoidance
congestion
avoidance
slow congestion
start avoidance
TD: Triple duplicate acknowledgements
TO: Timeout
3
TCP/Reno: A Session
Q: when cwnd is cut to half, why sending rate is not?
4
Recap: TCP/Reno Queueing Dynamics
 Consider congestion avoidance only
cwnd
TD
filling buffer
bottleneck
bandwidth
ssthresh
draining buffer
Time
congestion
avoidance
There is a filling and draining of buffer process
for each TCP flow.
5
Recap: TCP Throughput
Analysis Objective
 To understand the throughput of TCP/Reno
as a function of RTT (RTT), loss rate (p)
and packet size
 There are typically two approaches in two
settings
deterministic
 random losses

Recap: TCP/Reno Deterministic Throughput
Modeling: Relating W with Loss Rate p
 Consider congestion avoidance only
cwnd
TD
3W W
4 2
 3W8
2
Wm  3W4
W
available
bandwidth
ssthresh
W/2
Time
congestion
avoidance
Assume one packet loss (loss event) per cycle
Total packets send per cycle = (W/2 + W)/2 * W/2 = 3W2/8
Thus p = 1/(3W2/8) = 8/(3W2)
W  8p/ 3  1.6p Þ throughput x = S 3 1.6 = 1.2S
RTT 4
p
RTT p
7
TCP/Reno Throughput Modeling with
Random Losses
 W1
W   W
 2
if the packet is not lost
if packet is lost
DW = (1- p) W1 + p(- W2 )
=>
mean of W 
=>
throughput x »
2 (1 p )
p
1.4S
RTT p

1.4
p
, when p is small
, when p is small
8
TCP/Reno Dynamics
x=
DW = (1- p) W1 + p(- W2 )
Dwunit-time
RTT
Dwpkt = (1- p) W1 + p(- W2 )
Dwunit-time = Dwpkt x = [(1- p) W1 + p(- W2 )]x
x=
Dwunit-time
RTT
[(1- p) W1 + p(- W2 )]x
1
1 2
=
= (1- p)
- px
2
RTT
RTT
2
9
Summary: TCP/Reno
Throughput Modeling
 They are all approximate modeling
the details and the exact numbers are not
important
 the objective is to help us understand TCP better

10
TCP/Reno Depends on Buffer Filling/Draining
Why does TCP/Reno and derived
depend on buffer filling up/drain?
cwnd
TD
filling buffer
bottleneck
bandwidth
ssthresh
draining buffer
Time
congestion
avoidance
11
TCP/Vegas (Brakmo & Peterson 1994)
window
SS
CA
time
 Idea: try to detect congestion by delay before loss
 Objective: not to overflow the buffer; instead, try to
maintain a constant number of packets in the bottleneck
queue
12
TCP/Vegas: Key Question
 How to estimate the number of packets
queued in the bottleneck queue?
window
SS
CA
time
13
Recall: Little’s Law
 For any system with no
or (low) loss.
 Assume

X
T, W
mean arrival rate X, mean service
time T, and mean number of requests in
the system W
 Then relationship between W, X, and T:
W  XT
14
Estimating Number
of Packets in the Queue
15
TCP/Vegas CA algorithm
T = Tprop + Tqueueing
Applying Little’s Law:
xvegas T = xvegas Tprop + xvegas Tqueueing,
where xvegas = W / T is the sending rate
Then number of packets in the queue is
xvegas Tqueueing = xvegas T - xvegas Tprop
= W – W/T Tprop
16
TCP/Vegas CA algorithm
maintain a
constant
number of
packets in the
bottleneck
buffer
window
SS
time
CA
for every RTT
{
if W – W/RTT RTTmin < a then W ++
if W – W/RTT RTTmin > a then W --
for every loss
W := W/2
}
queue size
17
TCP/Vegas Dynamics
wRTT  ( w  xRTTmin  a )
w
x
a
w unit-time  ( RTT
 RTT
RTTmin  RTT
)
x
RTT
a
RTTmin  RTT
x
unit-time
x = DwRTT
= RTTx 2 (RTTmin + ax - RTT)
18
TCP/Reno vs. TCP/Vegas
TCP/Reno
TCP/Vegas
Congestion
signal
loss rate p
Dynamics (x’)
x=
Equilibrium
1
RTT 2
xreno 
queueying delay Tqueueing
1 2
- px
2
a vegas
a reno
RTT
x = RTTx 2 (RTTmin + ax - RTT )
p
xvegas  Tqueueing
Discussion: Why and why not TCP/Vegas?
19
Interpreting Congestion Measure
 A congestion measure (loss/delay) is a
signal from the network to the flows
reflecting congestion
 Another way to think of congestion
measure is to think of it as “price”
 price
goes up as the rate to a link is getting
close to capacity
 the higher the “price”, the lower the rate
20
Interpreting Congestion Measure
ql(t)
q2(t)
pf 
xf(t)
q
l
f uses l
TCP/Reno:
x=
1
RTT 2
- px
1
2
2
 12 x2 ( RTT22 x2  p)
TCP/Vegas: x = RTTx (RTTmin + ax - RTT )
2
= RTTx 2 ( ax -Tqueueing )
21
Outline
 Admin and recap
 TCP/Vegas
 Network bandwidth allocation framework
 motivation
22
Motivation
 So far our discussion is implicitly on a
network with a single bottleneck link;
this simplifies design and analysis:
 efficiency/optimality
(high utilization)
• fully utilize the bandwidth of the link
 fairness
(resource sharing)
• each flow receives an equal share of the
link’s bandwidth
23
Network Resource Allocation
 It is important to understand and design protocols
for a general network topology


how will TCP allocate resource in a general topology?
how should resource be allocated in a general topology?
24
Example: TCP/Reno Rates
 Rate:
x1 = 0.26
x2 = x3 = 0.74
x1
C= 1
x2
C= 1
x3
25
Example: TCP/Vegas Rates
 Rates
: x1 = 1/3
x2 = x3 = 2/3
x1
C= 1
x2
C= 1
x3
26
Example: Maximize Throughput
x
max
x f 0
f
f
x1  x2  1
subject to
x1  x3  1
 Optimal:
x1 = 0
x2 = x3 = 1
x1
C= 1
x2
C= 1
x3
27
Example: Max-min Fairness
Max-min fairness: maximizes the
throughput of the flow receiving the
minimum (of resources)
• Justification: John Rawls, A Theory of
Justice (1971)
• http://en.wikipedia.org/wiki/John_Rawls
• This is a resource allocation scheme
used in Asynchronous Transfer Mode
and some other network resource
allocation proposals
28
Example: Max-Min
max
min x f 
subject to
x1  x2  1
x f 0
x1  x3  1
 Rates: x1 = x2 = x3 = 1/2
x1
C= 1
x2
C= 1
x3
29
Network Resource Allocation
Using Utility Functions
 A set of flows F
 If xf is the rate of flow f, then the utility to
flow f is Uf(xf), where Uf(xf) is a concave
utility function.
 Maximize aggregate utility, subject to
capacity constraints
subject to
U
x
over
x0
max
f F

f 
x f 
f
f : f uses link l
 cl for any link l
30
Example: Proportional Fairness
 log x
max
x f 0
f
f
x1  x2  1
subject to
Uf
x  
f

log

x

f 
x1  x3  1
 Optimal:
x1 = 1/3
x2 = x3 = 2/3
x1
C= 1
x2
C= 1
x3
31
Example 3: a Utility Function
max

subject to
x1  x2  1
x f 0
1
4x1

1
x2

1
x3
1
U f x f   
2
RTT x f
x1  x3  1
 Optimal:
x1 = 0.26
x2 = x3 = 0.74
x1
C= 1
x2
C= 1
x3
32
Summary: Allocation
Objective
Allocation (x1, x2, x3)
TCP/Reno
0.26
0.74
0.74
TCP/Vegas
1/3
2/3
2/3
Max Throughput
0
1
1
Max-min
½
½
½
Max sum log(x)
1/3
2/3
2/3
Max sum of -1/(RTT2 x)
0.26
0.74
0.74
x1
C= 1
x2
C= 1
x3
33
Resource Allocation Frameworks
 Forward (design) engineering:
 how
to determine
objective functions
 given objective,
how to design
effective alg
subject to
U x
x c
over
x0
max
f F

f 



f 
f
f : f uses link l
l
for any link l
 Reverse (understand) engineering:
 understand
current protocols (what are the
objectives of TCP/Reno, TCP/Vegas?)
34
Outline
 Admin and recap
 TCP/Vegas
 Bandwidth allocation framework
 Motivation
 Forward: Nash Bargaining Solution (NBS)
35
Network Bandwidth Allocation
Using Nash Bargain Solution (NBS)
 High level picture

given the feasible set of
bandwidth allocation, we
want to pick an allocation
point that is efficient
and fair
 The determination of
the allocation point
should be based on
“first principles”
(axioms)
36
Network Bandwidth Allocation:
Feasible Region
x1
x2
x3
x1
C= 1
x2
C= 1
x3
37