### What is "Fair" ?

• Fairness

• Humans have a "built-in" sense of fairness for certain things...

(Morality ???)

• Example 1:

 4 children sharing a cake and everyone can eat up the share he/she receives In this case, the "fair" sharing is when each child receive a 1/4 of the cake

• Example 2:

• 4 children sharing a cake but:

• Child 1 can only eat 1/10 of the cake.

• Fact: it is stupid to give child 1 more than 1/10 of the cake because the extra cake (resource) is wasted

• In this case, the "fair" sharing is:

 Child 1 gets 1/10 The other 3 children gets 3/10 each

• This sense of "fairness" is called max-min fair:

 The least demanding one will get its fair share first After this, the next least demanding one will get its fair share first And so on...

• Max-Min Fairness

• A sharing of a network resource is "max-min fair" when:

 The lowest demand on data rate is maximized; After the lowest demand on the network resource has been satisfied, only then the second lowest demand on the network resource will be maximized; After the second lowest demand on the network resource has been satisfied, only then the third lowest demand on the network resource will be maximized; and so on.

• The Max-Min Fairness Assignment Algorithm

• The max-min fair resource assignment algorithm progresses in rounds

• Steps performed in each round:

1. Compute the fair share of each unsatisfied flow

2. Assign the fair share to each unsatisfied flow

3. Some flows may have received more than its request

If there are over-assignments:

 Take back the over-assigned shares The sum of the over-assigned shares is the residual amount Assign the residual amount to the remaining unsatisfied flows

• Example of a Max-Min Fair Bandwidth assignment

• Consider the following 4 flows sharing a common bottle neck link: Notes:

 The bottleneck link has a bandwidth of 10 Mbps There are 4 flows sharing the bottleneck link The demands of each flow is given in the figure

Iteration 1:

• compute the fair share of each unsaisfied flow:

 ``` 10 Mbps --------- = 2.5 Mbps (per flow) 4 ```

• Assignment:

 Flow 1:   2 Mbps       (with 0.5 Mbps over-assignment)   Flow 2:   2.5 Mbps Flow 3:   2.5 Mbps Flow 4:   2.5 Mbps

• Residual:

 Unused bandwidth = 0.5 Mpbs

Notice that:

 The flow with minimum demand (i.e., flow 1 with 2 Mbps demand) has been maximized

Iteration 2:

• compute the fair share of each unsatisfied flow:

 ``` 0.5 Mbps --------- = 0.16666 Mbps (per flow) 3 ```

• Assignment:

 Flow 2:   2.5 + 0.1 Mbps = 2.6 Mbps (because demand = 2.6 Mbps) Flow 3:   2.5 + 0.16666 Mbps = 2.66666 Mbps Flow 4:   2.5 + 0.16666 Mbps = 2.66666 Mbps

• Residual:

 Unused bandwidth = 0.06666 Mpbs

Note:

 After the minimum demand (i.e., flow 1 with 2 Mbps) has been maximized, the second lowest demand (i.e., flow 2 with 2.6 Mbps) is now maximized;

Iteration 3:

• compute the fair share of each unsatisfied flow:

 ``` 0.06666 Mbps ---------- = 0.03333 Mbps (per flow) 2 ```

• Assignment:

 Flow 3:   2.66666 + 0.03333 Mbps = 2.7 Mbps Flow 4:   2.66666 + 0.03333 Mbps = 2.7 Mbps

• Residual:

 Unused bandwidth = 0.0 Mpbs

• Max-min fair assignment:

 Flow 1:   2 Mbps Flow 2:   2.6 Mbps Flow 3:   2.7 Mbps Flow 4:   2.7 Mbps

Notice that:

 the lowest demand (= flow 1 with its 2 Mbps) is maximized; the second lowest demand (= flow 2 with its 2.6 Mbps) is maximized; the third lowest demand (= flow 3 with its 4 Mbps) is maximized; (Note that maximized is not the same as satisfied. We gave flow 3 the highest possible assignment that is fair) the fourth lowest demand (= flow 4 with its 5 Mbps) is maximized; (Note that maximized is not the same as satisfied. We gave flow 4 the highest possible assignment that is fair)

• NOTE:

• If a max-min assignment is enforced by the network, then flows that transmits more than their fair share, will have their packets dropped

• Example:

• Suppose flows 4 and 5 are UDP (un-responsive) flow

• Suppose flows 4 and 5 transmit 4 Mbps and 5 Mbps, respectively

• If the network enforces the max-min assignment, then the network will:

 discard 4 − 2.7 = 1.3 Mbps from flow 4 discard 5 − 2.7 = 2.3 Mbps from flow 5

• Bottle line:

 When the network enforces Max-Min Fair Sharing, then ill-behaved flows (that send a large number of packets) will not be able to affect the performance of other (well-behaved) flows

• Weighted Max-Min Fairness

• The max-min fair assignment can be generalized by adding weights to each demand.

• Weighted demand:

• Suppose demand requests x units of network resources

• The demand has been given a weight = w

• Then this weighted demand can be viewed as:

 There are w individual demands Each individual demand requests an amount of w/x units of network resources (Even though you view the demand as w individual demands, all assigned network resources will be given to the same request

• Weighted fairness:

 Suppose demand 1 = x1 units and has weight = w1 Suppose demand 2 = x2 units and has weight = w2 And so on... An assignment is max-min fair if the assignment is a max-min fair assignment for the weighted demands

• Weighted max-min fair assignment algorithm

• The max-min fair is similar to the max-min fair algorithm and again progresses in rounds

• Steps in one round of weighted max-min fair assignment algorithm:

1. Compute the fair share unit:

 ``` unallocated resources Fair share unit = ------------------------ total weight ```

2. Allocate a fair share unit to each weight unit

3. Take back any over-assigned resource (residual)

The residual amount is assigned in a new iteration to the (remaining) unsatisfied flows

• Example: Weighted max-min fair assignment algorithm

• Example: how to divide 10 Mbps of bandwidth among these 4 flows with given weights ? Note:

 The weighted max-min fair allocation will give flow 2 twice as much bandwidth (but not exceeding the max request of 3 Mbps)

• Iteration 1:

• Compute the fair share unit:

 ``` Weights of unsaturated flows: 1, 2, 1, 1 10 Mbps Fair share unit = --------- = 2 Mbps 5 ```

• Attempted allocation:

 Flow 1:   2 Mbps Flow 2:   4 Mbps    (exceeds max. request of 3 Mbps)        Flow 3:   2 Mbps Flow 4:   2 Mbps

• Actual allocation:

 Flow 1:   2 Mbps Flow 2:   3 Mbps    (because max. request = 3 Mbps)        Flow 3:   2 Mbps Flow 4:   2 Mbps

• Residual: 1 Mbps

• Iteration 2:

• Compute the fair share unit:

 ``` Weights of unsaturated flows: 1, 1, 1 1 Mbps Fair share unit = -------- = 0.33333 Mbps 3 ```

• Attempted allocation:

 Flow 1:   2 Mbps + 0.33333 Mbps Flow 2:   3 Mbps Flow 3:   2 Mbps + 0.33333 Mbps Flow 4:   2 Mbps + 0.33333 Mbps

• Actual allocation:

 Flow 1:   2.33333 Mbps Flow 2:   3 Mbps Flow 3:   2.33333 Mbps Flow 4:   2.33333 Mbps

• Residual: 0 Mbps