For the throughput measurement, we want to see if we just run CPU bound tasks, will the tasks receive their fair share of CPU time. We look at two kinds of fairness: inter-class fairness and intra-class fairness. The inter-class fairness requires the total CPU time received by the processes belonging to a certain class be proportional to its assigned share. The intra-class fairness requires the CPU time received by the processes belonging to the same class be proportional to its time_slice.
In this experiment, we created 4 classes: gold class, silver class, bronze class and best effort class. They are assigned a weight of 60,30,9,1 respectively. For each class, we run 15 CPU bounded jobs. These jobs are assigned a nice value among (-20,-10,0,10,19). So there are 3 jobs for each nice value within the same class. We gathered the CPU time received by these processes during a 30 minutes run and the result is shown on Figure 4.1.
As you can see from Figure 1. The total CPU time received by gold, silver, bronze and best effort class is 60%, 30%, 9% and 1% respectively, which is exactly the same as their assigned share. Figure 1 shows the cpu time received by processes with different nice value using different bars. In linux, a nice value of (-20,-10,0,10,19) corresponds to a time_slice of (200,151,102,54,10)ms respectively. As you can see from Figure 1, the CPU time received by these processes roughly respects this proportion. So we can conclude that CFS achieved both inter-class and intra-class fairness.