Lecture 10. TCP flow Control Used for data transfer Every successful packet is acknowledged One can...

44
Lecture 10
  • date post

    21-Dec-2015
  • Category

    Documents

  • view

    215
  • download

    1

Transcript of Lecture 10. TCP flow Control Used for data transfer Every successful packet is acknowledged One can...

Lecture 10

TCP flow Control

Used for data transfer

Every successful packet is acknowledged

One can not have more than W unacknowledged packets, where W is the window size.

Initially, W = 1, W increases by 1 at every acknowledgement, and W is reduced by a factor of 2 (WW/2), whenever there is a loss(additive increase/multiplicative decrease)

Every packet loss is because of congestion, i.e., input rate exceeding the link capacity.

Reducing the window size is equivalent to reducing the input rate and vice-versa.

So, whenever there is congestion, the input rate decreases, and whenever there is under-utilization input rate increases.

A successful packet transmission means that there may be spare capacity.

Resembles utility optimization strategies!

However, in the utility maximization scenario, increase and decrease of rate depends on the utility functions.

In general, it may not be additive increase and multiplicative decrease.

However, certain choices of utility functions indeed give additive increase/multiplicative decrease.

So, TCP is a special case of utility maximization!

Utility Maximization Over Multirate Multicast networks

Every receiver has a utility function.

Need to maximize the sum of receiver utilities subject to feasibility

Cli: session i traverses link l

max

j: virtual session j of session i traverses link l

rji

(Capacity Constraint)

Maximize i,k Uk(rki) subject to

Dual Approach

L(r, p) = i,kUk(rki) - lpli:session i traverses link lmaxk is receiver of i rk

i + lpl Cl

= i( k:k is a receiver of iUk(rk) - lpli:session i traverses link lmaxk is

receiver of i rki ) + lpl Cl

Receivers of the same session depend on each other.

Rate update of each depends on that of another. So, distributed implementation of the above is difficult.

Alternate FormulationLinks leading to recievers are receiver links. Let lk be the receiver-link of receiver k.

For each session i, let xil be the rate of session i in link l.

So, i,k Uk(rki) = i,k Uk(xilk)

Let session i traverse link l and then branch into links l1 and l2. Then l1 and l2 are children of link l for session i.

xil xil1 xil xil21

2

l l1

l2

Cli: session i traverses link l

max

j: virtual session j of session i traverses link l

rji

(Capacity Constraint)

Maximize i,k Uk(rki) subject to

Maximize i,k Uk(xilk) subject to

xil xil1 xil xil2………

i:session i traverses link lxil Cl

New Dual

L(r, p, q) = i,k (Uk(xilk) - pl xilk) + i,k q i,l( xil- xil1) …

+ lpl Cl

We can group into local factors. So, distributed implementation possible.

However, the objective function is not strictly concave in its arguments.

So the dual is not differentiable!

So gradient search is not possible!

Need to use non-differentiable optimization techniques

Optimization based rate control for multirate, multicast sessions,’’ K. Kar, S. Sarkar and L. Tassiulas, INFOCOM 2001

Fair Allocation of Rates

Utility Maximization is a Congestion Control technique.

Try to push in as much traffic as possible!

Traffic for different sessions depend on their respective utility functions and the congestion in their paths.

Fair allocation of rates is distributing the bandwidth, with some notion of equity among sessions.

Notions of Fairness

A simple notion of fairness:

All sessions have equal rates!

However, different sessions have different paths, and different paths have different bandwidths.

The previous definition means we may have to give low rates to all sessions just because one session has a bad link!

Notions of Fairness

Maxmin Fairness–A rate allocation is maxmin fair if subject to feasibility, one can not increase the rate of a virtual session, without decreasing the rate of another virtual session having equal or lesser rate (Bertsekas and Gallager)

r1

Capacity = 6 unit Capacity = 1 unit

r2Maxmin fair rate for session 1 = 5

Maxmin fair rate for session 2 = 1

r1

Capacity = 1 unit Capacity = 1 unitr2

r3

Maxmin fairness:

Every session gets 0.5

Utility Maximization (U1(x) = U2(x) = U3(x) = x)

Sessions 1 and 2 get 1 each, session 3 gets 0

Utility Maximization (U1(x) = U2(x) = U3(x) = ln x)

Sessions 1 and 2 get 2/3 each, session 3 gets 1/3

Utility Maximization (U1(x) = U2(x) = ln x, U3(x) = 2ln x)

Every session gets 0.5

Bottleneck Link

A link l is a bottleneck link for a session k,

If capacity of link l is fully utilized

Rate of session k is greater than or equal to that of any other session j travelling the link

r1=5Capacity = 6 unit Capacity = 1 unit

r2=1Link 1Link 2

Link 1 is bottleneck for session 1

Link 2 is bottleneck for session 2

Link 1 is not bottleneck for session 2

Necessary and Sufficient Condition for Max-min fair

Allocation

A rate allocation is max-min fair if and only if every session has a bottleneck link. (Bertsekas and Gallager)

r1=5Capacity = 6 unit Capacity = 1 unit

r2=1Link 1Link 2

r1=5.5Capacity = 6 unit Capacity = 1 unit

r2=0.5Link 1Link 2

Session 2 does not have a bottleneck link

ProofSuppose every session has a bottleneck link.

Let us try to increase the rate of session k.

Its rate must be increased in its bottleneck link.

But the capacity of the bottleneck is fully utilized.

So the rate of session k must be increased by hurting other sessions travelling the bottleneck link.

But all these sessions have rate less than or equal to that of session k.

This means, we can increase the rate of session k only by hurting a session which has equal or lower rate.

Thus this allocation is maxmin fair.

Consider a rate allocation.

Suppose session k does not have a bottleneck link.

Then any link which session k traverses has either unutilized capacity or gives greater rate to a different session

This means that bandwidth allocated to session k can be increased in any link on its path without hurting any session which has equal or lower rate.

Thus the allocation is not maxmin fair!

Algorithm for computing maxmin fair allocation

A session is saturated if the capacity is utilized on at least one link in its path.

1. Initially assume all sessions are unsaturated.

2. Fair share of a link is the total link capacity unutilized by the saturated sessions divided by the number of unsaturated sessions.

Bandwidth allocated to an unsaturated session is the minimum fair share on its path.Find out which sessions saturate newly.

If some sessions are still unsaturated, go back to step 2, else STOP

Example

r1=5Capacity = 6 unit Capacity = 1 unit

r2=1Link 1Link 2

Initially, both sessions are unsaturated.

Fair share in link 1 is 3, and that in link 2 is 1

Session 2 is saturated with rate 1, session 1 (rate 3) is not.

Fair share in link 1 is 5

Session 1 is saturated with bandwidth 5

Complexity Analysis

At least one session saturates every iteration.

In fact, all sessions traversing through the link with the minimum fair session saturate.

So the algorithm terminates in min(E, N) iterations (N is the number of sessions).

Proof of Correctness

Intuitively, rate allocation at the end of every iteration is feasible.

Rate allocated to a session at the end of every iteration is less than or equal to the fair share in all links on its path.

Thus, whenever a session saturates, it has a bottleneck link.

Thus all sessions have bottleneck links at the end.

Distributed Implementation

The rate of a session in every iteration depends on fair shares along its path.

Saturation status of a session depends on rates of sessions along its path.

Fair share of a link depends on the rates and numbers of saturated sessions on its path.

So, it is possible to implement this algorithm in a distributed manner.

However, this argument assumes that all iterations start at the same time and

Initially all sessions are unsaturated.

This means we require a lot of time synchronization.

Also, every time there is a small change, the computation restarts.

Masters thesis of A. Charny (1994, MIT) gives an asynchronous algorithm which converges to maxmin fair rates in finite number of iterations, starting from arbitrary initial states.

Attaining fair rates

• Compute the fair rates

• Use congestion control mechanisms to attain them

• Integrated approach– Schedule to attain the fair rates without

computing them explicitly

Scheduling for maxmin fair rate allocation

• Computation for fair rates not always possible

• Fair rate computation requires– elaborate message exchange– exact knowledge of system parameters like link

capacities

• Scheduling policy for unicast networks (Hahne JSAC’ 91)

Unicast scheduling policy

• Window parameter (W)• Sessions traversing a link are sampled in a

round robin manner.• When a session is sampled, it transmits a

packet if– the destination node of the link has less than W

packets of the session– session has a packet to transmit

• This policy allocates maxmin fair rates in unicast networks for sufficiently large windows

• Basic premise of the proof:– Node queue lengths inherently bounded

– No packet loss in intermediate nodes

B3 B4

B1B2L1

L2

L3

Node 1 Node 2

Intuition Behind this Result

• Round robin service offers equal bandwidth share to all sessions traversing a link

r1

Capacity = 6 unit Capacity = 1 unit

r2

Window flow control conveys the bottleneck information

Discrete Feasible Sets

Does Maxmin fair allocation exist always?

Always exists for the feasible set we considered: can allocate any bandwidth subject to capacity

constraints

Suppose, we can allocate bandwidth in discrete chunks only.

``Fair allocation of discrete bandwidth layers in multicast networks’’, S. Sarkar and L. Tassiulas, INFOCOM 2000

Multirate Multicast Transmission

r1

r2

r3

r4 = max (r1,, r2)

r = max (r3,, r4)

S

L1

L2

L3

L4

r3

r1r2

Fractional layer reception not meaningful: Discrete bandwidth reception

Counter Example in Discrete Case

Maxmin fair allocation may not exist!

r1

Capacity = 1 unit Capacity = 5 unit

r2

Suppose allocated bandwidths can be integers only.

Possible allocations are (0, 0), (1, 0) and (0, 1)

Neither is maxmin fair!

Alternate notions of fairness

Lexicographically optimal

First try to maxmize the minimum component, subject to that maximize the second minimum etc..

Lexicographically optimum exists but its computation is NP-hard!

Both (1, 0) and (0, 1) are lexicographically optimum in the previous example.

Proof for NP-hardnessThis problem is equivalent to finding the largest independent set in a graph.

An independent set is a set of vertices such that there is no edge between the vertices in the set.

a b

cd

(a, c) is a largest independent set.

It is well-known that finding a largest independent set is an NP-hard problem.

Suppose, we have a polynomial complexity routine to compute lexicographically optimal allocation.

We will show that then we can compute the largest independent set in any graph in polynomial complexity.

Given a graph we consider a network as follows:

For every vertex in the graph, we have a session in the network.

If two vertices have an edge between them, then we construct an edge in the network with the corresponding sessions traversing the edge.

Join the path of every session by infinite capacity edges

If a session does not traverse any edge, then add an unit capacity edge for that session.

Example

a b

cd

4 sessions, a, b, c, d,

Session a, b traverse edge e1

Session a, d traverse edge e2

Session b. c traverse edge e3

Session c, d traverse edge e4

C = 1e1(a, b) e2 (a, d) e3(b , c) e4(c, d)

C = 1 C = 1 C = 1

C =

C = C =

C =

Possible rate allocations for session is 0 or 1.

Two sessions can both get 1 bandwidth only if they do not share an edge,

And hence the corresponding vertices do not have an edge between them in the given graph.

Any set of sessions with bandwidth 1 correspond to an independent set and vice versa.

Clearly lexicographically optimum rate allocation consists of largest number of sessions with bandwidth one unit.

Thus maximum independent set corresponds to lexicographically optimum allocation.

Weaker notion of fairness for discrete sets

Maximal fairness

Polynomial complexity computable.

If there is maxmin fair allocation, then maximal fairness is the only maxmin fair allocation.

Lexicographically optimal allocation is a maximally fair allocation.

Fair Allocation of Utilities

• External observer sees reception quality (Quality of Service)

• Find rates that provide good quality of service vectors

• Use ``utility functions’’ to connect rates with quality of service

• Schedule the sessions so that the utilities are allocated in a fair manner

Utility: A Generalized Framework For Fairness

• Max-min fairness treats all users equally in some sense.

• However, users have different requirements.• Users may be willing to pay different revenues• Need to distinguish between users.• Utility framework allows one to distinguish

among users within the framework of fairness.

• Users choose their own utilities• Network charges the users in accordance to their utility

functions• Network allocates bandwidths to the users so as to attain a

max-min fair allocation of the utilities.• Consider a single link and two users

– One user wants a lot of bandwidth, but is willing to pay more

– Another user wants less bandwidth, but can pay a limited amount

– The former chooses a slowly increasing utility function while the latter chooses a fast increasing utility function

bandwidth

utility

Utility functions may not be continuous (may have step jumps)

Utility functions may not be strictly increasing.

``Fair Allocation of Utilities in Multirate Multicast Networks’’, S. Sarkar, L. Tassiulas, Allerton 99

Maxmin fair allocation of utilities may not exist.

Lexicographically optimal allocation NP-hard

Need to consider maximally fair allocation.