Open In App

TCP Fairness Measures

Improve
Improve
Like Article
Like
Save
Share
Report

Fairness measure is a great tool to determine if all the TCP flows are getting the fair share of the available network bandwidth. There are various transport layer protocols available, TCP fairness requires that a new TCP protocol should not affect the performance of other available protocols or variation of TCP itself. Say there are 5 flows in a network, 1 TCP Cubic, 1 Reno, 1 NewReno, 1 UDP, and 1 BBR. The available network bandwidth is 10 MBPS. Ideally, all these 5 flows must share equal bandwidth, i.e. 2 MBPS. But, BBR takes 3 MBPS, Reno and NewReno take 2 MBPS, CUBIC takes 1 MBPS and UDP takes 3 MBPS. In this scenario, BBR is affecting other TCP flows i.e. Cubic. The ratio of network bandwidth utilized by TCP BBR and Cubic is 3:1, which ought to be 1:1 in the fair case. There are many Fairness measures in the literature.

Need of TCP Fairness Measure:

Since the beginning of the internet, transport protocols have evolved significantly. The initial RFC 793 was a very basic TCP protocol. Today, there exist 100s of TCP protocols in the literature. Different devices are using their own choice of TCP protocol. The main purpose of the fairness measure is to check the compatibility of the newly designed TCP protocol with other existing TCPs. Fairness is the relative performance of other TCPs when this newly designed, under testing TCP is being used over the same network. If the performance of other TCP flows is not being hurt due to this new TCP then it is considered as good. Then its new optimizations and new features will be tested and then only its potential of outperforming other TCPs will be considered. If a new TCP hurts other flows badly, then there is no benefit of using this protocol in our devices because it will hurt others badly. That is why a fairness measurement is essential for certifying any newly designed TCP.

There exist a very popular fairness index called Raj Jain’s fairness index.

Jain’s Fairness Index

This index was introduced by Raj Jain, who is alumni of IISC and Harvard University. Currently, he is a professor of CSE at Washington University. 

 J(x1, x2, ..., xn) = \frac{(\sum_{i=1}^{n} {x_i})^2} {n\sum_{i=1}{n} {x_i^2} } = \frac{(\bar{x})^2}{(\bar{x^2})}

If there are n TCP flows in the network, then their throughput is denoted as x1, x2, …, xn. Throughput is the rate of successful packets/message delivery over an established network connection. It can also be coined as the amount of bandwidth utilized by a particular node. Jain’s index is then computed as per the given equation.

Jain Index = Square of the sum of all throughputs/
             (N x sum of squares of all throughputs) 
           = Square of average throughput/
             Average of squared throughput

If the J=1, then the TCP under experiment is perfectly fair with other TCP flows. It can be implied that TCP does not hurt other TCP flows in the network. Any new TCP algorithm developed today has to prove its efficiency in terms of TCP fairness measure. BBR used Jain’s Index as its fairness measurement tool and failed miserably. Jain’s Index takes the total throughput of all the nodes, it doesn’t take into consideration their time-series throughput. 

Suppose there are two TCP flows F1 and F2. The bandwidth is 10 MBPS and the connection remains active for 100 seconds.

For first 50 seconds, F1: 8 MBPS and F2: 2 MBPS
For next 50 seconds,  F1: 2 MBPS and F2: 8 MBPS,
[Jain's index takes the average throughput of both the TCP flows] 
Hence T1=T2=5 MBPS, where T= Throughput
J(F1, F2) = (25/25) = 1

In this case, the Index is 1, which implies that both flows got the equal/fair share of the bandwidth for the entire duration, but it is not true. If we plot the time series graph for the throughput then it will be completely different. This is the limitation of Jain’s Index, thus BBR failed to become a standard RFC, cause of this backlog.

Max-min fairness

This is not a measurement index, but fairness ensuring algorithm. This algorithm ensures fairness in the network. 

Algorithm:

  1. This works reversibly.
  2. Calculate the fair share for each unsatisfied flow.
  3. Assign the fair share to each unsatisfied flow.
  4. If some node is being assigned more than its requirement, then it is called over-assigned.
  5. Take back all the over-assigned shares, this is called residual amount.
  6. Assign this residual amount again to the unsatisfied flows.

Consider there are 4 flows over a bottleneck link with the total available bandwidth of 12 MBPS.

Max-min fairness

Max-min fairness

The demand of these flows are A=2.4, B=3, C=4, D=5 MBPS.

Step 1: The fair share of all 4 flows is = 12/4 = 3 MBPS. Assign 3 MBPS to each flow in the beginning.

Flow A: Assigned 3 MBPS, Demand = 2.4, Over-assigned 0.6 MBPS. 
Flow A is completely satisfied.
Flow B: Assigned 3 MBPS, Demand = 3, Completely satisfied.
Flow C: Assigned 3 MBPS, Demand = 4, Unsatisfied
Flow D: Assigned 3 MBPS, Demand = 5, Unsatisfied

Step 2: Compute fair share for remaining Unsatisfied flows, using residual flow. 

Fair share = 0.6/2 = 0.3
Assign 0.3 MBPS to flow C and D, because they are not yet satisfied
Flow C: Assigned 3.3 MBPS, Demand = 4, Unsatisfied
Flow D: Assigned 3.3 MBPS, Demand = 5, Unsatisfied
Residual amount = 0

Thus, all 4 flows got the maximum possible share. Flows A and B got satisfied whereas C and D are not satisfied.

If max-min fairness is enforced by the network, then it can punish those flows which are transmitting more than the highest assigned share to them. Assume that flows C and D are UDP and thus don’t get ACK by the receiver. They continue to send 4 and 5 MBPS data packets into the network. The maximum share assigned to them by the network is 3.3 MBPS. Hence, 

discard 4 - 3.3 = 0.7 MBPS from flow C
discard 5 - 3.3 = 1.7 MBPS from flow D

There is one advantage of max-min fairness. If the network enforces this fairness, then no flow will be disrupted, otherwise, it will drop packets of the ill-flow network. Thus, those flows will not be able to hurt other flows which are well-behaving.

Other fairness measures:

QoE Fairness: It stands for Quality of Experience. It is defined as the linear transformation function. F= 1 − \frac{2σ}{(H−L)}   . A system is called absolutely fair when all N users get the same QoE value.  It is not measured on ratio scales. It is used in interval scales. This index is bound in the interval [0-1]. 0 means the lowest QoE. 1 means the perfect QoE fairness. 0.5 value means half users getting 0 QoE and the other half users getting 1 QoE.

G’s Fairness index: This fairness index is basically used by Internet Service Providers in the context of bandwidth allocation. G’s kth-order fairness index is given as: f(x) = sin(xπ/2)^{1/k}    

G’s index gives smaller values compared to Jain’s index. Smaller values are more sensitive to the unfair bandwidth allocations and their value can go to 0, indicating very unfair distribution. Jain’s index is a very average index while G’s index focuses more on equality. 

For Example:

distribution: {20, 20, 20, 0}
Jain's index = 0.75
G's index = 0

Thus, Jain’s index is very ambiguous while G’s index gives more specific detail of bandwidth allocation.



Last Updated : 04 Mar, 2022
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads