Measuring the Fairness of Scheduling Policies
for Web Servers and Beyond

 

People

Adam Wierman
Mor Harchol-Balter

 

Motivation

Within modern computer systems, the question of how to allocate resources to process incoming requests is paramount. Applications across domains are all faced with this task. Within traditional networking, web servers are constantly being barraged with incoming requests, and must decide how best to allocate resources to respond. Even within the network, routers are placed under the same demands. Outside of networks, the foundations of operating systems depend on the ability to allocate the processor in response to requests made by active processes. Even database queries can be viewed in the same light - memory resources must be allocated to fulfill user requests.

Given the fundamental nature of this problem, it is not surprising that there is a large base of research modeling this process. Queueing theory provides an abstract model for this situation and has been studied mathematically since the early 1900s. However, despite the huge field of research within this framework, even the fundamental question of how best to schedule jobs in this system is not fully answered. Traditionally, the measure of performance used to evaluate queueing networks has been mean response time; that is the mean time between the arrival of a request and the completion of the request. Under this metric it is well known that the Shortest-Remaining-Processing-Time (SRPT) policy minimizes mean response time. This has led to designs based on SRPT being suggested for web servers and other applications. 

However, SRPT is not used in practice due to fears about unfairness.  Unfairness is a difficult idea to understand, but intuitively it is easy to see why SRPT seems unfair. A large job is very strongly biased against in an SRPT system because many small jobs could arrive and be completed while a large job is stuck in the queue not receiving any service. These concerns plague many policies, besides just SRPT, that achieve low mean response times by biasing towards short job sizes, e.g. Preemptive-Shortest-Job-First (PSJF) and Foreground-Background (FB) scheduling. Unfortunately, there has been little theoretical work understanding the validity of these concerns about unfairness despite the importance of such work to real world applications.

 

Figure 1.  A summary of the classification of common policies and scheduling techniques based on fairness


Results

Our work in this area began with a simple question: What is the experience of large job sizes under policies that prioritize small jobs, e.g. SRPT? We proved that, surprisingly, the largest jobs do not receive worse performance under SRPT than they do under traditional timesharing policies like Processor Sharing (PS), which is intuitively fair because it shares the server evenly among all jobs in the system at all times. In fact, in many cases using SRPT can provide smaller response times (in expectation) for all job sizes than PS. However, under heavy load SRPT can be unfair to some jobs, it is just not the largest jobs. Instead, it is the medium-large jobs that are treated unfairly.

From this initial focus on only the performance of large jobs, gradually we developed the first theoretical framework for studying the fairness of all scheduling policies, which culminated with a paper in Sigmetrics 2003 that won the Best Student Paper award. This paper defined a simple, intuitive notion of the fairness of scheduling policies (in expectation) and analyzed both individual policies and scheduling heuristics with respect to this new metric. Since 2003, we have also generalized the framework to describe not only fairness in expectation, but also the distribution of fairness (through use of higher moments).

 

Figure 2.  A comparison of the response time for a job of size x, T(x), under PS and SRPT. Notice that under low load SRPT outperforms PS for all job sizes, but that under high load SRPT is unfair to medium-large job sizes.


Impact

Our work on fairness has been cited over 50 times, has been used for many applications including web servers, routers, operating systems, and wireless networks, and has served to jumpstart a new focus on fairness in the Sigmetrics community. Many researchers, e.g. Rai, Biersack, et al. and Gong & Williamson, have analyzed other policies with respect to the fairness measure we introduced. Still others, including Friedman & Henderson, have invented new policies that perform well with respect to this fairness measure. In addition, many researchers, such as Levy & Raz and Sandmann, have developed new fairness measures for use in other applications.


Publications
 

The impact of prioritization on conditional response time
Adam Wierman and Mor Harchol-Balter
Under preparation.
 
Asymptotic cumulants of scheduling policies
Adam Wierman, Sing-Kong Cheung and Richard Boucherie
Under preparation.
 
Fairness and classifications
Adam Wierman
To appear in Performance Evaluation Review.
 
Adam Wierman and Mor Harchol-Balter
Proceedings of ACM Sigmetrics, 2005.
Adam Wierman
Thesis Proposal, 2005.
Adam Wierman and Mor Harchol-Balter
Proceedings of ACM Sigmetrics, Best Student Paper Award recipient, 2003.
Mor Harchol-Balter, Karl Sigman and Adam Wierman
Performance Evaluation Review, 2002. 30(3):9-11.
 
Mor Harchol-Balter, Karl Sigman and Adam Wierman
Performance Evaluation, 2002. 49(1-4):241-256.
 
Nikhil Bansal and Mor Harchol-Balter,
Proceedings of ACM Sigmetrics, 2001