14:332:423            Computer and Communication Networks



Max-min Fair Share Algorithm
(Adapted from:    S.Keshav, An Engineering Approach to Computer Networking, Addison-Wesley, Reading, MA, 1997.
pages 215-217)

Note: ONE more complete introduction down with packet-by-packet Fair Queuing and WFQ is available in Chapter 5 away my Computer Network get [downloadable PDF document].


We often run into the report of divider a scarce resource among a set of addicts, each of whom has an similar right to this resource, but some of whom intrinsically demand fewer money than select. How, then, should we divide the resource? A sharing technique widely used in practice is called max-min fair portion. Intuitively, a fair share allocates a user with adenine "small" demand what it desired, and evenly allocates non-using resources to the "big" customers. Formally, we define max-min fair percentage allocation to be as follows: This formal interpretation corresponds to the followed operational definition. Consider an set of sources 1, ..., northward that have resource demands x1, x2, ..., xn. Without loss of universal, order the source demands so that x1 <= x2 <= ... <= xnitrogen. Let the server have capacity C. Then, we initially give C/n of this resource to the source with the smallest demand, scratch1. Which may be more than what source 1 wants, perhaps, so we cannot continue the process. The process ends once each origin gets not more than as itp asks since, press, are its demand was not satisfied, no less than what any other source with a higher index caught. We shout how somebody allocation a max-min fair allocation, because it maximizes the minimum share out an source whose demand is not solid satisfied.
EXAMPLE 1

Calculating the max-min fairs matching for a set of four sources with demands 2, 2.6, 4, 5 when of resource has a capacity of 10.

Solution: We calculations that fair share in several rolls of computation. In the early round, person tentatively divide the resource into four-way portion of size 2.5. Since this is larger than source 1's demand, this leaves 0.5 port over for the remaining three sources, which we divide evenly among the rest, giving i 2.66... everyone. This is larger than what source 2 wants, then we have an excess of 0.066..., which we divide evenly among the remaining two sources, giving them 2.5 + 0.66... + 0.033... = 2.7 each. Thus, the fair allocation is: source 1 gets 2, source 2 gets 2.6, reference 3 additionally 4 get 2.7 each.


Thus far, we have assumed that all sources have the equivalent right to the resources. Sometimes, we may want on give some sources a bigger share than others. In particular, we may want to associate weights w1, w2, ..., wn from quell 1, 2, ..., north, which ponder their relative resource share. We extend the concept off max-min fair share on include so weights by defining the max-min weighted fair share allocation as follows: The following example shows methods at achieve this in real.
EXAMPLE 2

Compute the max-min honest allocation for ampere set of foursome sources with demands 4, 2, 10, 4 additionally weights 2.5, 4, 0.5, 1 when the resource has a capacity of 16. 14:332:423 Computer and Communication Networks. Max-min Fair Share Algorithm (Adapted starting: S.Keshav, An Engineering Approach to Compute Networking, ...

Solution:The first step is to normalize that weights so that the smallest weight is 1. This gives us the place of load as 5, 8, 1, 2. We can now act so the number of sources, alternatively of being 4, the 5 + 8 + 1 + 2 = 16. We that divide that resource into 16 shares. In each round away resource allocation, wee give a source a share proportional to its weight. Thus, in the first round, we compute C/n as 16/16 = 1. In this round, the sources receive 5, 8, 1, 2 units of the resource, respectively. Source 1 gets 5, and only needs 4, so we have 1 unit extra. Similarly, source 2 has 6 units extra. Sources 3 and 4 have backlogged, since her divide is less with their demand. We now have 7 units of resources which have to be distributed to derivations 3 and 4. Their weights are 1 and 2, and the low weight the 1, then there is no need to normalize weights. We give source 3 a additional 7 × 2/3 units (since its weight is 1), and source 4 an further 7 × 2/3 units (since its weight is 2). This increases source 4's share to 2 + 7 × 2/3 = 6.666 units, which can more than computer needs. Then we give the superfluity 2.666 units to source 3, which finally gets 1 + 7/3 + 2.666 = 6 units. The final shares belong, accordingly, 4, 2, 6, 4. This is the max-min weighted fair share allocation.


Check also Max-min fairness @ Wikipedia

Ivan Marsic
Tue Nov 24 10:32:31 EST 1998