Asymptotically Optimal Scheduling of Multiple Parallelizable Job Classes

Published Online:https://doi.org/10.1287/stsy.2024.0084

Abstract

Modern computing workloads are often composed of parallelizable jobs. A parallelizable job can be completed more quickly when run on additional servers. However, each job can only use a limited number of servers, known as its parallelizability level, which is determined by the type of computation the job performs and how it is implemented. Workloads generally consist of multiple job classes, where jobs from different classes have different parallelizability levels and follow different job size (service requirement) distributions. This paper considers scheduling parallelizable jobs belonging to an arbitrary number of job classes. Given a limited number of servers, we must allocate servers across a stream of arriving jobs to minimize mean response time—the average time from when a job arrives to the system until it completes. We find that in lighter-load scaling regimes (i.e., sub-Halfin-Whitt), the optimal allocation policy is least-parallelizable-first, which prioritizes jobs from the least parallelizable job classes regardless of their size distributions. By contrast, we find that in the heavier-load regimes (i.e., super-nondegenerate slowdown), the optimal allocation policy prioritizes jobs with the shortest expected remaining processing time. We also develop policies that are asymptotically optimal when the scaling regime is not known a priori.

Funding: Open Access funding was provided by the University of North Carolina at Chapel Hill. This work was supported by the National Science Foundation (NSF) [Grants NSF-CIF-2403194, NSF-CCF-2403195, NSF-III-2322973, NSF-IIS-2322974, and NSF-CMMI-2307008]. W. Wang is supported in part by the NSF [Grants ECCS-2145713, CCF-2428569, and ECCS-2432545].

Supplemental Material: The online appendix is available at https://doi.org/10.1287/stsy.2024.0084.

1. Introduction

The vast majority of modern computer systems are designed to exploit parallelism. Whether considering a single multicore server, a compute cluster of many servers, or even an entire data center, achieving good system performance requires carefully choosing how to parallelize jobs across the underlying cores or servers in the system. For example, database queries for an in-memory database must be parallelized across the cores of a multicore server to achieve low query latency (Leis et al. 2014, Wagner et al. 2021), machine learning training jobs must be parallelized across the many GPUs of a compute cluster to reduce job completion time (Qiao et al. 2021, Jayaram Subramanya et al. 2023), and datacenter computing workloads must be parallelized across the many servers of a data center (Tumanov et al. 2016, Delgado et al. 2018). In each of these cases, the system operator is presented with a fixed set of cores or servers and asked to devise a strategy to allocate these resources across a stream of parallelizable jobs. However, devising optimal scheduling policies for parallelizable jobs in multiserver systems remains an open problem.

This paper develops asymptotically optimal scheduling policies for parallelizable jobs. Specifically, given a limited number of servers, k, we ask how to allocate these servers to a stream of parallelizable jobs arriving over time to minimize the mean response time across jobs.

If a workload consists solely of perfectly parallelizable jobs that can each fully utilize all k cores, the problem is easy because each job effectively sees one fast server that runs k times faster than a single server. Unfortunately, in practice, parallelizable jobs typically have limits to their level of parallelizability. For example, a database query is compiled to run with a certain number of threads, t, where t≪k (recall k is the total number of servers; Chen et al. 2016). Allocating more than t cores to this query will not reduce its processing time. Similarly, a job’s level of parallelism may be limited by overhead from communication between its threads. For example, machine learning training jobs can be parallelized across many servers, but these servers must synchronize at the end of each training iteration (Lin et al. 2018, Qiao et al. 2021). Additionally, some jobs consist of a mixture of parallelizable work and nonparallelizable work. This leads to the well-known phenomenon described as Amdahl’s law, which says that the speedup a job can receive from parallelism is bounded in terms of the fraction of the job that is parallelizable (Hill and Marty 2008).

Each of these factors will affect the parallelizability of different jobs to different degrees. Some jobs in a workload may be highly parallelizable, whereas others may benefit only slightly from running on additional servers. This mixture of jobs with different levels of parallelizability is commonly seen in databases (Leis et al. 2014), machine learning workloads (Qiao et al. 2021), and datacenter scheduling (Tumanov et al. 2016). This paper develops new theoretical analyses of systems with parallelizable jobs of varying parallelizability levels.

1.1. High-Level Problem Statement

To capture the limited parallelism in today’s parallel computing workloads, we approximate the behavior of different parallelizable jobs by assuming that jobs are perfectly parallelizable up to some parallelizability limit. This limit represents aspects of how the job was compiled, the communication overhead the job incurs, and what fraction of the job is parallelizable. Formally, we characterize each job by a pair (S,c) where S is a random variable denoting the job’s inherent size and c is its parallelizability level. The time required to complete a parallelizable job is a function of both its inherent size and the servers allocated to it over time. When a job runs on m≤c servers, its remaining size decreases at a rate of m units of work per second until the remaining size reaches zero and the job is considered complete. The job cannot utilize more than c servers.

To capture the varying levels of parallelizability seen within a single workload, we allow jobs to belong to one of ℓ job classes. Each job class, i, has an associated job size distribution, Si, and parallelism limit, ci, that applies to every class i job. We assume that a job’s exact size is unknown to the system, but its class is known; that is, the system knows (Si,ci), for all i. Furthermore, we assume that jobs are malleable, meaning that a job can change the number of servers it runs on over time (Gupta et al. 2014).

Given a stream of malleable jobs that arrive to the system over time, a scheduling policy must determine how many servers to allocate to each job at every moment in time. Given a system with k homogeneous servers, our goal is to develop scheduling policies that minimize the mean response time across jobs—the average time from when a job arrives to the system until it is completed.

1.2. Prior Work

Scheduling in multiserver systems is known to be a difficult problem. There is a variety of work from the systems community on scheduling parallelizable jobs, including work on scheduling in databases (Leis et al. 2014, Wagner et al. 2021), machine learning clusters (Qiao et al. 2021, Jayaram Subramanya et al. 2023), data analytics clusters (Vernica et al. 2010, Zhu et al. 2014), and data centers (Tumanov et al. 2016, Delgado et al. 2018). This work uses simple policies with no formal guarantees. Additionally, many systems optimize for metrics such as fairness in addition to trying to minimize response times.

In the theoretical scheduling community, even when jobs are not parallelizable and each job occupies a single server, the optimal scheduling policy is not known. Recent results (Grosof et al. 2018) derived the first bounds on the mean response time of shortest-remaining-processing-time (SRPT) in multiserver systems, showing that SRPT is optimal in conventional heavy traffic (see Section 2). These heavy-traffic results were extended to a Gittins index policy (Scully et al. 2020a) in the case where job sizes are not fully known. Unfortunately, none of these results deal with parallelizable jobs.

Another related area of active research is scheduling for multiserver jobs (Grosof et al. 2020, Harchol-Balter 2022, Hong and Wang 2022). Multiserver jobs each have a hard, fixed resource requirement on the number of servers they need. Different jobs have different fixed server requirements. In general, it is not known how to minimize the mean response time for multiserver jobs, even in heavy traffic. Under some constraints on the server requirements of each job, an SRPT variant called ServerFilling-SRPT was recently shown to be optimal in conventional heavy traffic (Grosof et al. 2022a, b). Because jobs have hard resource requirements in the multiserver job model, one of the main concerns of a scheduling policy is to ensure that jobs are efficiently packed onto the available servers so that the system utilization remains high. Failing to pack the jobs efficiently can cause the system to be unstable. By contrast, the malleable jobs we consider do not have this stability concern, because they can adapt their levels of parallelism to ensure that the servers remain fully utilized. Hence, the policies developed for scheduling multiserver jobs tend to prioritize packing in a way that has no benefit when scheduling malleable jobs.

The work closest to our model considers scheduling parallelizable jobs with speedup functions (Edmonds 1999; Berg et al. 2018, 2020a, b, 2022). Here, each job has an associated speedup function that determines the job’s service rate on different numbers of servers. Of these papers, Berg et al. (2018, 2020a) focus on the case where there is only one class of jobs that all follow the same speedup function. The case of two classes of jobs is considered in Berg et al. (2020b, 2022), but jobs are assumed to be either nonparallelizable or fully parallelizable, and the results require highly restrictive assumptions about the job size distributions. Little is known in the case where jobs have more than two levels of parallelizability.

Some further-afield work on parallel scheduling has used different models and objectives to design scheduling policies. Work on directed acyclic graph (DAG) scheduling has considered the problem of scheduling parallelizable tasks with precedence constraints that are specified by the edges of a DAG (Blumofe and Leiserson 1999, Agrawal et al. 2008, 2016). Much of this work considers the problem of scheduling a single DAG (Blumofe and Leiserson 1999, Agrawal et al. 2008). For scheduling a stream of DAGs, only pessimistic worst-case bounds are known (Agrawal et al. 2016).

1.3. Tradeoff

As we saw in Section 1.2, SRPT-like policies that prioritize short jobs are optimal in conventional heavy traffic for a variety of multiserver scheduling models. However, when the system is not so heavily loaded, it is not obvious that favoring short jobs suffices for optimality. In particular, when scheduling malleable jobs, there is another consideration that is at least as important: deferring parallelizable work. Here, a scheduling policy can raise the long-run average utilization of the system by prioritizing less parallelizable jobs ahead of more parallelizable jobs. The benefits of deferring parallelizable work were first described in Berg et al. (2018), which considers a less complex model with just two classes of jobs.

To see the benefit of deferring parallelizable work, suppose we have a job, A, that can only use one server and a job, B, that can parallelize across all k servers. If we prioritize job B, there will be a period after B completes where job A runs and k−1 servers sit idle. To minimize mean response time, it is better to give one server to job A and use the remaining k−1 servers to run job B. This holds regardless of the sizes of the jobs. By prioritizing the less parallelizable job A, we defer working on the more parallelizable job B.

This raises the question of how to handle the tradeoff between favoring jobs that are shorter versus deferring parallelizable work. What does a policy do with a job that has a small expected remaining size, but is also highly parallelizable? Does the policy prioritize this job due to its small size, or defer working on this job because of its high parallelizability? To derive an optimal scheduling policy, we must compare the relative benefits of these two effects. We find that the optimal choice between prioritizing short jobs and deferring parallelizable work depends on the scaling behavior of the system. When the system scales such that queueing is rare, it is more important to defer parallelizable work. However, if the system scales such that the probability of queueing goes to one, it is more important to prioritize short jobs.

1.4. Contributions

This paper derives the first results on asymptotic optimality when scheduling many classes of parallelizable jobs. Specifically, this is the first work to develop asymptotically optimal policies when there are more than two classes of parallelizable jobs. We analyze the mean response time of ℓ classes of jobs, each with a different level of parallelizability. We prove our results by considering how the system behaves under a variety of scaling regimes, where the number of servers goes to infinity and the system load goes to one simultaneously (see Section 2). Although our results rely on asymptotic analysis, the results cover a wide range of scaling regimes, including sub-Halfin-Whitt regimes and mean field (constant load) scaling. We find that the choice of an optimal policy depends on the chosen scaling regime. Specifically, our contributions are as follows.

  • When the system load is not too heavy (sub-Halfin-Whitt), we show that the benefit of deferring parallelizable work outweighs the benefit of prioritizing short jobs. In this case, it is beneficial to use a least-parallelizable-first (LPF) policy that assigns the highest priorities to the least parallelizable classes of jobs. We show in Theorem 1 that LPF is asymptotically optimal with respect to mean response time. Furthermore, we show in Theorem 2 that it can be suboptimal to simply prioritize short jobs in these lighter-load scaling regimes.

  • Conversely, when system load is very heavy (super-nondegenerate slowdown (NDS)), it is more important to prioritize short jobs by using the shortest-expected-remaining-processing-time (SERPT) policy as shown in Theorem 4. In these scaling regimes, there are almost always enough jobs to fully utilize all k servers. Hence, it is more important to minimize queueing times by using SERPT than it is to defer parallelizable work. As a result, we also prove in Theorem 5 that LPF can be suboptimal in these heavier-load scaling regimes.

  • Although the above results suggest that one may need to know the system scaling behavior a priori to select an asymptotically optimal policy, we show that this is not the case. Specifically, we define a policy called Threshold (THRESH) that switches between LPF and SERPT depending on how many jobs are in the system. We show in Theorem 6 that THRESH can perform well in both sub-Halfin-Whitt and super-NDS scaling regimes by deferring parallelizable work (using LPF) when there are few jobs in the system and prioritizing short jobs (using SERPT) when there are many jobs in the system.

  • Finally, we examine extensions to our theoretical results via simulation in Section 6.

2. Model

We model a system with k identical servers managed by a centralized scheduler. Arriving jobs are placed in a central queue. We consider the case where jobs are preemptible and malleable, meaning that the scheduler can change the number of servers on which a job runs over time. Although more complex architectures may exist, this scenario is common in a wide range of real-world systems that process parallelizable jobs.

Without loss of generality (WLOG), we assume each server runs at speed 1. We assume that each job belongs to one of ℓ job classes. Each job class, i, has its own job size distribution, denoted by the random variable Si, and parallelizability level, ci.

A job’s size denotes its running time (service time) on a single server. We generally assume that job sizes are unknown and exponentially distributed, that is,

Si∼Exp(μi) ∀1≤i≤ℓ.

Our theoretical results assume exponential job sizes, but we discuss other size distributions in Section 6.2.

Class i jobs have a parallelizability level of ci, meaning a class i job can run on up to ci servers. When a class i job is run on m≤ci servers, the job is served at rate m. As a result, this job’s remaining service time is distributed as Exp(m·μi).

We assume class i jobs arrive according to a Poisson process with rate λi(k), where the total arrival rate is λ(k)=∑i=1ℓλi(k). We define the system load as

ρ≔∑i=1ℓρi where ρi≔λi(k)kμi ∀1≤i≤ℓ.

The system is stable under any work-conserving scheduling policy if ρ<1 (Berg et al. 2020b).

2.1. Asymptotic Analysis

We analyze the system under several scaling regimes. In the conventional heavy traffic scaling regime, the number of servers, k, is held constant, and we take the limit as ρ→1. We will also consider several scaling regimes where k→∞ and the arrival rate, λ(k), scales with k, meaning that load, ρ, scales with k. See Appendix A for a summary of the standard asymptotic notation used in this paper.

We assume that the proportion of jobs from each class and the job size distributions remain fixed. That is, we define the constants p1,p2,…,pℓ such that

λi(k)=piλ(k)  ∀1≤i≤ℓ.

We restrict ourselves to scaling regimes where λ(k)=Θ(k) so that ρ does not go to zero as we scale k.

It is convenient to describe the scaling behavior of λ(k) in terms of α, the number of “spare servers” worth of capacity. Specifically, we define α to be

α≔k(1−ρ).

Note that, although α and ρ depend on k, we omit this dependence from the notation for brevity. We will write expressions in terms of λ(k) when an explicit dependence on k requires emphasis.

The asymptotic behavior of many queueing systems is known to depend on the asymptotic behavior of α. For example, consider a simple M/M/k system. When α=Θ(k), the scaling regime is known as the large-system limit or mean-field limit. The probability of queueing in an M/M/k goes to zero in the mean-field limit. When α=Θ(k), the scaling regime is known as the Halfin-Whitt regime (Halfin and Whitt 1981). The probability of queueing in an M/M/k converges to a constant in the Halfin-Whitt regime, but the mean queueing time goes to zero. When α=Θ(1), the scaling regime is known as the NDS regime (Atar 2012, Gupta and Walton 2019). The probability of queueing in an M/M/k goes to one in the NDS regime, and the mean queueing time converges to a constant. We refer to all scaling regimes where α=ω(k log k) as sub-Halfin-Whitt scaling regimes.1 In the sub-Halfin-Whitt regime, the probability of queueing in an M/M/k goes to zero. We refer to all scaling regimes where α=o(1) as super-NDS regimes. The probability of queueing in an M/M/k goes to one and the mean queueing time goes to ∞ in super-NDS regimes. Note that, under all super-NDS scaling regimes, ρ→1. Under the sub-Halfin-Whitt scaling regimes, ρ either goes to one or converges to a constant less than one, as in mean-field scaling. It is not clear which, if any, of the results from the simple M/M/k system hold when scheduling parallelizable jobs.

Although ρi depends on k for each class i, ρi asymptotically approaches a subcritical load. Specifically, let

ρi*≔limk→∞ ρi=λ(k)piE[Si]  ∀1≤i≤ℓ,
where 0<ρi*<1 for any class i, and ∑i=1ℓρi*≤1. Further, ∑i=1ℓρi*=1 in any heavy-traffic scaling regime.

2.2. Scaling Parallelizability Levels

We previously stated that each job class, i, has an associated parallelizability level ci. For some job classes, this parallelizability level results from algorithmic limitations or limitations of a job’s software implementation. For these job classes, the parallelizability level will not change as the system scales. However, other more-parallelizable classes of jobs can be easily reconfigured as the system scales to leverage newly available servers. We therefore allow the value ci to scale with k for some classes of jobs. In general, we allow each ci to be any nondecreasing function of k. In this way, we can represent a variety of real-world system constraints that might cause a job’s parallelizability level to grow sublinearly with k. For example, in a system with a complex network topology, it is common that only a fraction of the servers (e.g., k) can communicate directly with one another. Hence, for a class of jobs with high communication overhead, the parallelizability level of the jobs might scale as k.

WLOG, let the classes be asymptotically ordered by parallelizability so that, for sufficiently large k,

c1≤c2≤…≤cℓ. Furthermore, we assume that c1=O(1), so at least one class of jobs requires a constant number of servers. This mild technical assumption holds in the vast majority of real-world systems. For simplicity, we assume that c1=1, but setting c1 to some other constant does not affect our results.

2.3. Scheduling Policies

A scheduling policy must decide, at every moment in time, how many servers to allocate to each job in the system. Let {N(t)} be the stochastic process denoting the number of jobs in the system at time t≥0. Because we only consider scheduling policies that do not idle servers unnecessarily, ρ<1 implies that {N(t)} is a positive-recurrent, irreducible continuous-time Markov chain. By ergodicity, there exists a distribution, N, such that N(t)→dN as t→∞. N is the unique stationary distribution of N(t) and E[N]<∞. We refer to E[N] as the mean number of jobs in system. We define {Ni(t)}, Ni, and E[Ni] analogously, but to describe class i jobs in the system. This gives E[N]=∑i=1ℓE[Ni]. Let X=(N1,N2,…,Nℓ) denote the full state of the system in stationarity.

Let T denote the response time—the time from when a job arrives until it completes—of a job that arrives to a system whose state is drawn according to X. We refer to E[T] as the mean response time across jobs. By Little’s law, E[T]=E[N]/λ(k)<∞. We similarly define E[Ti] to be the mean response time of a class i job, where E[T]=∑i=1ℓE[Ti]pi by conditioning. Our goal is to find scheduling policies that minimize E[T] (or, equivalently, minimize E[N]). We assume the scheduling policy knows the class information (μi and ci) for each job, as well as the system state.

Let E[Tπ] denote the mean response time under any scheduling policy, π; π is asymptotically optimal if

limk→∞ E[Tπ′]E[Tπ]≥1
for all policies π′. Again, the asymptotic optimality of a policy generally depends on the asymptotic behavior of α. Asymptotic optimality is defined analogously in the conventional heavy traffic limit.

Our results primarily focus on analyzing two policies: one based solely on deferring parallelizable work and the other based solely on favoring short jobs. The policy that defers parallelizable work is called LPF. LPF preemptively prioritizes the jobs with the lowest parallelizability levels. For example, LPF will allocate as many servers as possible to jobs belonging to the first i classes before allocating any leftover servers to jobs in the i+1st class. The policy that favors short jobs is called the SERPT policy (Scully et al. 2020b), which at all times preemptively prioritizes the job with the smallest expected remaining size. Recall that a job’s size is its running time on a single server. The SERPT policy allocates as many servers as can be used to the job with the smallest expected remaining size before allocating any servers to the next larger size job.

We also introduce a new policy called THRESH, which is the first policy to dynamically combine the orthogonal goals of deferring parallelizable work and favoring short jobs. THRESH runs LPF when the number of jobs in the system is small and runs SERPT when the number of jobs is large. We will fully define THRESH in Section 5.

In analyzing these policies, we use a combination of coupling and drift arguments.

3. Scheduling Parallelizable Jobs in sub-Halfin-Whitt Regimes

In this section, we consider scheduling in the sub-Halfin-Whitt scaling regimes described in Section 2. We begin by showing that LPF, the policy that defers parallelizable work by prioritizing the least parallelizable jobs, is asymptotically optimal in this case. Intuitively, in the lighter-load sub-Halfin-Whitt scaling regimes where queueing is rare, the benefit of prioritizing short jobs ahead of long jobs is reduced. Furthermore, because there will frequently be fewer than k jobs in the system under these scaling regimes, it is important to “save up” the more parallelizable jobs, which are better at occupying many servers when there are few jobs. LPF performs well because it keeps more servers occupied than other policies.

Given that there is little queueing in sub-Halfin-Whitt regimes, one might expect a wide variety of policies to be asymptotically optimal. However, we also show the surprising result that SERPT can be asymptotically suboptimal in sub-Halfin-Whitt regimes. If SERPT happens to prioritize very parallelizable jobs that fully utilize the system, all the other jobs in the system are forced to queue unnecessarily. The system is then underutilized when running less-parallelizable jobs. Hence, the choice of scheduling policy greatly affects the overall mean response time of the system, even in sub-Halfin-Whitt scaling regimes.

We begin by showing the asymptotic optimality of LPF in Theorem 1.

Theorem 1.

If α=ω(k log k), then for any scheduling policy π,

limk→∞ E[Tπ]E[TLPF]≥1.

That is, LPF is asymptotically optimal with respect to mean response time in sub-Halfin-Whitt scaling regimes.

We will prove Theorem 1 via Lemmas 1, 2, and 3. We first outline our argument at a high level. Then, we prove the necessary lemmas before proving Theorem 1.

We will prove that, for each class of jobs i, the mean response time of class i jobs under LPF approaches some lower bound as k→∞, and thus the overall mean response time under LPF is asymptotically optimal. When analyzing LPF in this section, we will omit the LPF superscript for the sake of readability.

For any class, i, it is desirable to have more than ρik servers working on class i jobs. In this case, class i jobs are being completed at a rate greater than μiρik=λi(k), and hence the number of class i jobs in the system will tend to decrease. Given a system with α spare servers, it is theoretically possible to guarantee that ρik+α/ℓ servers are available to class i jobs for all classes, i. Our goal is to prove that LPF guarantees this property with high probability, and therefore it is usually possible to complete class i jobs at a very fast rate. We then argue that this is sufficient to keep the average number of class i jobs in the system very low.

We divide the ℓ job classes into two cases. First, we consider all the job classes whose level of parallelism, ci=O(1). We call these inelastic (I) jobs, because their level of parallelism does not scale with k. Second, we consider all the job classes whose level of parallelism ci=ω(1). We refer to these as elastic (E) jobs.

To handle any inelastic job class, i, we argue in Lemma 1 that the probability of having a large number of jobs belonging to the first i−1 job classes goes to zero very quickly as k→∞. As a result, LPF almost always devotes a sufficient number of servers to the class i jobs. This allows us to show in Lemma 2 that the mean response time of class i jobs is asymptotically optimal.

We use a similar argument to prove the asymptotic optimality for elastic jobs in Lemma 3. However, we can prove this result for all elastic classes simultaneously instead of treating the classes one by one as we did for the inelastic classes. The proof of Theorem 1 follows easily from Lemmas 2 and 3.

The key to proving these lemmas is that we have α/ℓ spare servers to devote to each class. Roughly, this means the LPF policy can tolerate fluctuations in the number of class i jobs on the order of α without having these jobs interfere significantly with the service of lower priority jobs. In sub-Halfin-Whitt scaling regimes, we assume α=ω(k log k). Hence, our proofs use drift arguments to recover a well-known form of result—that fluctuations in the number of class i jobs larger than O(k) are rare as k→∞.

We define βi to be the smallest number of class i jobs that can fully utilize ρik+α/ℓ servers, giving

βi=⌈ρik+αℓci⌉.

We begin with the following lemma that the number of class i jobs rarely exceeds βi for any inelastic class.

Lemma 1.

Let I be the highest number such that cI=O(1). For any class of jobs, i≤I, let Ei be the set of states defined as

Ei={(n1,n2,…nℓ):nj<βj,∀1≤j≤i}.

In sub-Halfin-Whitt scaling regimes,

Pr((N1,N2,…,Nℓ)∉Ei)=o(1k3) ∀i≤I.(1)

Proof.

We will prove (1) by induction on the job class, i. Specifically, we will prove the following two properties by simultaneous induction. First, we will show there exist constants dj(i) and fj(i)>0 such that

Pr(Ni≥βi)=∑j=1ifj(i)(kα)j−1e−dj(i)α2/k ∀i≤I.(2)

Second, for some constants gj(i)>0 and hj(i)>0, we will show that

Pr((N1,N2,…,Nℓ)∉Ei)≤∑j=1igj(i)(kα)j−1e−hj(i)α2/k ∀i≤I.(3)

Once we have established (2) and (3), we note α=ω(k log k) in the sub-Halfin-Whitt scaling regimes and thus α2k=ω(log k). Note that, for any constant x>0, α2/k=ω(x log k)=ω(log kx). Hence, by setting x=(j+2)/hj(i), (3) implies

gj(i)(kα)j−1·e−hj(i)α2/k=o(1k3)
for any i,j≤I, as desired.2 We require (2) as part of our inductive proof.

Our inductive proof of (2) and (3) relies on the drift bounds established in Wang et al. (2022). These bounds require one to define a Lyapunov function V(x), that takes a system state x=(n1,n2,…nℓ) and returns a real number. The goal is to choose a Lyapunov function such that, for a state x, the instantaneous rate of change of E[V(X)|X=x], known as the Lyapunov drift, is almost always negative. Specifically, if the instantaneous rate of change of E[V(X)|X=x] is negative whenever V(x)>B, Wang et al. (2022) provides bounds on Pr(V(X)>B) (see Appendix B for a precise statement). We set V(x)=n1 to bound Pr(N1>B) and prove the base case for our induction (i=1). To prove our claims inductively for class i+1 jobs, we set V(x)=ni+1. Here, we must account for the fact that there may be many lower-class jobs in the system preventing the class i+1 jobs from running and causing positive drift, even when V(x) is large. To handle this issue, we exploit a stronger drift bound (see Appendix C for a precise statement) that tolerates some positive drift as long as the states with positive drift occur with bounded probability. The problematic states in this scenario are exactly {x∉Ei}. Our inductive hypothesis holds that Pr(X∉Ei) is small, resulting in the desired bounds on Pr(Ni+1>B) and Pr(X∉Ei+1).

To prove both statements when i=1, we define the Lyapunov function V(x)=n1. When n1≥ρ1k+α/2ℓ, the drift of the Lyapunov function, ΔV, is

ΔV(x)=λ1(k)−μ1·n1≤λ1(k)−μ1(ρ1k+α2ℓ)=−μ1α2ℓ.

Hence, the drift bound from Appendix B yields

Pr(N1≥β1)≤Pr(N1≥ρ1k+αℓ)≤f1(1)e−d1(1)α2/k
for some constant d1(1)>0 and f1(1)=1. This proves both (2) and (3) when i=1.

Now, we inductively assume that (2) and (3) hold for the first i job classes. If the Lyapunov function V(x)=ni+1>ρi+1k+α/2ℓ, the drift is positive if and only if x∉Ei; otherwise, the drift is negative. We can therefore use the modified drift bound from Appendix C to get the bound

Pr(Ni+1≥βi+1)≤fi+1(i+1)e−di+1(i+1)α2/k+O(kα)Pr(X∉Ei)
for some constants di+1(i+1)>0 and fi+1(i+1)>0.

Using our inductive hypothesis to bound Pr(X∉Ei), we see that there exist some new constants fj(i+1) and dj(i+1) for all 1≤j≤i+1 such that (2) holds for the i+1st class of jobs.

Finally, to prove (3) for the i+1st class, we note that

Pr(X∉Ei+1)=Pr(∪j=1i+1Nj>βj)≤Pr(X∉Ei)+Pr(Ni+1>βi+1)≤∑j=1i+1gj(i+1)(kα)j−1e−hj(i+1)α2/k
for some new set of constants gj(i+1)>0 and hj(i+1)>0. This completes the proof by induction. □

We now use Lemma 1 to prove the optimality of the inelastic response times via a drift argument.

Lemma 2.

For any class i≤I, if α=ω(k log k), then

limk→∞ E[TiLPF]=1ciμi.

Proof.

Let Ki be the number of servers that process class i jobs under LPF in a random state X=(N1,N2,…,Ni) in the stationary regime. Let θi=⌈ρik+log kci⌉ be the number of class i jobs required to use slightly more than the average number of class i servers. The number of servers used by θi class i jobs is at most ρik+log k+ci due to rounding. We also define δi=(Ni−θi)+, where (·)+ denotes max(·,0) (i.e., the positive part).

Intuitively, although class i jobs use ρik servers on average, Lemma 1 suggests that it should be rare for the class i jobs to use ρik+log k servers. We will use Lemma 1 to show that E[δi]→0 and hence E[Ni] is at most θi as k becomes large. We then apply Little’s law to this bound to finish our proof.

Formally, we will make a drift argument using the Lyapunov function V(x)=((ni−θi)+)2 so that V(X)=δi2. Following standard techniques (Bertsimas et al. 1994, Eryilmaz and Srikant 2012, Wang et al. 2022, Xu 2023), we define ΔV(x)=∑x′∈χ:x≠x′qxx′(V(x′)−V(x)), note that E[ΔV(X)]=0, and use this equation to obtain the desired bounds.3 See Section EC.1 of the Online Appendix for a full overview of this technique.

To obtain ΔV(X), note that δi does not change for small values of Ni. If an arrival occurs when there are fewer than θi jobs, nothing changes. Similarly, unless there are strictly more than θi jobs, nothing changes on a departure either. This gives

ΔV(X)=𝟙(Ni≥θi)λi(k)(2δi+1)+𝟙(Ni>θi)μiKi(−2δi+1).

Setting E[ΔV(X)]=0 then gives

E[2𝟙(Ni≥θi)λi(k)δi+𝟙(Ni≥θi)λi(k)+𝟙(Ni>θi)μiKi]=E[2𝟙(Ni≥θi)μiKiδi].(4)

We now claim that E[𝟙(Ni>θi)μiKi]=E[𝟙(Ni≥θi)λi(k)]. Here, we use a similar drift argument (see Section EC.1 in the Online Appendix), this time using the Lyapunov function G(x)=δi.4 This gives

ΔG(X)=𝟙(Ni≥θi)λi(k)−𝟙(Ni>θi)μiKi.E[ΔG(X)]=E[𝟙(Ni>θi)μiKi]−E[𝟙(Ni≥θi)λi(k)]=0(5)
as desired.

Applying (5) to (4) yields

E[𝟙(Ni≥θi)λi(k)δi+𝟙(Ni≥θi)λi(k)]=E[𝟙(Ni≥θi)μiKiδi].(6)

Now, noting that 𝟙(Ni≥θi)δi=δi, we have

λi(k)Pr(Ni≥θi)+λi(k)E[δi]=μiE[Kiδi].(7)

If Ki and δi were independent, μiE[Kiδi] would equal λi(k)E[δi] because we know the long run completion rate of type i jobs equals the long run arrival rate of type i jobs in a stable system. Intuitively, however, δi and Ki should be positively correlated—we should expect to use more servers on type i jobs when more type i jobs are in the system. Hence, to turn (7) into an upper bound on E[δi], we will lower bound E[Kiδi] to be significantly larger than λi(k)E[δi]; Ki and δi only move inversely when many lower-class jobs enter the system and prevent class i jobs from running. Hence, we can use our upper bound on Pr(X∉Ei−1) to argue that Ki and δi are positively correlated and thus

E[Kiδi]≥(E[Ki]+log k)E[δi]−O(1)=(ρik+log k)E[δi]−O(1), ∀i≤I.(8)

This is shown formally in Appendix D. Plugging (8) into (7) yields

λi(k)+O(1)≥(μi(kρi+log k)−λi(k))E[δi]=μi log kE[δi],(9)
λi(k)+O(1)μi log k≥E[δi],(10)
for sufficiently large k. Hence,
E[Ni]≤E[δi]+θi≤o(k)+θi,(11)
E[Ni]≤o(k)+ρikci.(12)

Applying Little’s law gives

E[Ti]=o(1)+1ciμi.

Hence, for the first I classes, the mean response time of each class converges to a service time plus an additive term that goes to 0 as k→∞. Note that this mean service time represents the lowest possible mean service time for a class i job and is thus a lower bound on the mean response time for class i jobs. □

At this point, we have shown that the I jobs have asymptotically optimal mean response time in sub-Halfin-Whitt regimes. Now, we handle the remaining classes whose level of parallelizability scales with k.

Lemma 3.

For any class i>I, if α=ω(k log k), then

limk→∞  E[TiLPF]=0.

Proof.

Recall that ci=ω(1) for all classes of elastic (E) jobs. We will bound the response time of all elastic classes simultaneously. Let

ρE=∑j=I+1ℓρj  and  λE(k)=∑j=I+1ℓλj(k).

Let KE be the combined number of servers used on any elastic job and let μmin=mini∈[I+1,ℓ]μi. We will bound E[NE], the expected number of total jobs of class I+1 or higher. Following our earlier argument, we want to exploit our bound on EI to get an upper bound on E[NE].

Rather than tracking the number of jobs directly, we will track the expected sum of the sizes of elastic jobs in the system. We refer to this quantity as the expected work from elastic jobs, WE. This quantity can be written as

WE=∑j=I+1ℓNjμj.

Let θE=ρEk+log kcI+1μmin and let δE=(WE−θE)+. Furthermore, let δE(x) be the value of δE given that the system is in state x.

Note that we divide by cI+1 to be pessimistic about how many servers each job uses. We will develop a bound on E[δE] and use this bound to recover a bound on E[NE]. The key to this lemma is that θE=o(k) because cI+1=ω(1). Hence, we can stand to pick up a θE term in our bound on E[NE], and this term will be dominated by λE(k) when applying Little’s law.

We will now use the drift argument of Section EC.1 in the Online Appendix with the Lyapunov function V(x)=(δE(x))2. This yields

ΔV(X)=𝟙(WE≥θE)(∑j=I+1ℓ2λj(k)μjδE+λj(k)μj2)+𝟙(WE>θE)(∑j=I+1ℓ−2kjδE+kjμj).

Once again setting E[ΔV(X)]=0,5 we get

E[𝟙(WE≥θE)δEkρE]+O(k)=E[𝟙(WE≥θE)δEKE],(13)
kρEE[δE]+O(k)=E[δEKE],(14)
where the indicators on both sides vanish because they are redundant, and the terms without δE are aggregated into the O(k). Hence, lower bounding E[δEKE] will give an upper bound on E[δE].

Our argument now follows the proof of (8) (see Appendix D) to show that, for sufficiently large k,

E[δEKE]≥(ρEk+log k)E[δE]−O(1).

Adapting Lemma D.2 to prove this claim is straightforward and makes use of our bound on Pr(X∉EI).

Plugging this lower bound into (14) gives

O(k)+O(1)≥(ρEk+log k)E[δE]−ρEkE[δE],(15)
O(k)+O(1)log k≥E[δE],(16)
o(k)=E[δE].(17)

To conclude, we note that

E[WE]≤E[δE]+E[θE]=E[δE]+o(k).

Let μmax=maxi∈[I+1,ℓ]μi. We then have

E[NE]=∑j=I+1ℓE[Nj]≤∑j=I+1ℓE[Nj]μmaxμj=μmaxE[WE].

Hence,

E[NE]≤μmax(E[δE]+o(k))=o(k).

Applying Little’s law, we have

limk→∞ E[TE]=limk→∞ E[NE]λE(k)=0.

This implies our claim, that the mean response time of class i jobs goes to 0 for all i>I. □

We now combine the above lemmas to complete our proof of Theorem 1.

Proof of Theorem 1.

By Lemmas 2 and 3, for any class, i, E[TiLPF] converges to a lower bound as k becomes large, because the mean response time of a job is lower bounded by its mean service time. Hence, the overall mean response time across jobs, which is a linear combination of the mean response times for each class, also converges to a lower bound. For any policy, π, this gives

limk→∞E[Tπ]E[TLPF]≥1,
and thus LPF is optimal in sub-Halfin-Whitt scaling regimes. □

We conclude this section with Theorem 2, which shows that SERPT is asymptotically suboptimal in sub-Halfin-Whitt scaling regimes. That is, LPF outperforms SERPT (sometimes significantly) in sub-Halfin-Whitt scaling regimes.

Theorem 2.

There exists a set of job classes such that, when α=ω(k log k),

limk→∞E[TSERPT]E[TLPF]>1.

That is, SERPT can be strictly suboptimal in the sub-Halfin-Whitt regime.

Proof.

Consider the case where ℓ=2 with c1=1, c2=k, and μ2>μ1. We can easily see that the mean response time of class 2 jobs goes to zero under SERPT in the sub-Halfin-Whitt regime. Hence, to prove the suboptimality of SERPT, we must show that limk→∞E[T1LPF]<limk→∞E[T1SERPT]. Lemma 2 shows that, under LPF in the sub-Halfin-Whitt regime, the mean response time of a class 1 job converges to 1/μ1. We will show that SERPT does not attain this lower bound on the mean response time of class 1 jobs in the sub-Halfin-Whitt regime.

We consider the case where μ2>μ1, so SERPT gives strict priority to class 2 jobs. Consider the behavior of one particular class 1 job. This class 1 job will be served for some random amount of time, S1. The queueing time of the job is therefore at least the amount of time spent waiting behind class 2 jobs that arrive during its S1 time in service. We define AS1(2) to be the number of class 2 arrivals during a (random) class 1 service time. We can then write

E[T1SERPT]≥E[∑i=1AS1(2)S2ik]+E[S1].

Clearly, each S2i is independent and identically distributed (i.i.d.) and independent of AS1(2), so we have

E[T1SERPT]≥E[AS1(2)]E[S2k]+E[S1].

We can then see that

E[AS1(2)]=∫0∞μ1e−μ1tE[AS1(2)|S1=t]dt=∫0∞t·μ1e−μ1t·λ2(k)dt=λ2(k)E[S1].

Thus,

E[T1SERPT]≥λ2(k)kE[S2]E[S1]+E[S1]=(ρ2+1)E[S1]
and
limk→∞ E[T1SERPT]≥(1+ρ2*)μ1>limk→∞ E[T1LPF].

Because SERPT achieves suboptimal mean response time for class 1 jobs as k→∞, the overall mean response time under SERPT is suboptimal in sub-Halfin-Whitt scaling regimes. □

4. Scheduling Parallelizable Jobs in Super-NDS Regimes

LPF performs optimally in sub-Halfin-Whitt scaling regimes because it defers parallelizable work in order to keep servers occupied. SERPT, on the other hand, performs suboptimally in these regimes. In super-NDS scaling regimes, this trend is reversed. Namely, in super-NDS scaling regimes, the mean queueing time becomes the dominant term in the mean response time. Because SERPT minimizes mean queueing time by prioritizing short jobs ahead of long jobs, we can show it is asymptotically optimal in this case. Not only does LPF fail to minimize mean queueing time, but the benefits of deferring parallelizable work are diminished in super-NDS regimes. Here, there are usually enough jobs in the system to keep all servers occupied, even without deferring parallelizable work. Hence, we show that LPF is suboptimal in super-NDS scaling regimes. Additionally, we will show that both results also apply in the conventional heavy traffic limit, where k is fixed and ρ→1.

The point of this section will be to prove Theorems 3, 4, and 5, which state that SERPT is optimal in conventional heavy traffic and super-NDS scaling regimes, whereas LPF can be suboptimal in these cases. We start by proving a preliminary lemma that will be used repeatedly in our proofs.

This preliminary lemma, Lemma 4, relates the mean number of jobs in a SERPT system to a lower bound on the optimal mean number of jobs in system. Specifically, we consider the lower bound of an optimal policy for a single-server preemptive system that runs at speed k. The optimal policy for this single-server system serves jobs one at a time in SERPT order (Van Mieghem 1995). We will refer to the optimal policy for the single-server system as SERPT-1 to emphasize that this is SERPT applied to a system with one fast server. The SERPT policy (without the 1) will continue to denote SERPT in our k-server system.

To describe the priority ordering of classes under SERPT and SERPT-1, let γ=(γ1,γ2,…,γℓ) be a sequence such that

μγi≥μγi+1 ∀1≤i<ℓ.

We now compare the expected number of jobs under SERPT in our k-server system to the expected number of jobs in the SERPT-1 system.

Lemma 4.

The expected number of jobs under SERPT in the k-server system can be bounded as E[NSERPT−1]≤E[NSERPT]≤E[NSERPT−1]+k·ℓ.

Proof.

The first part of our claim, that E[NSERPT−1]≤E[NSERPT], holds because SERPT-1 is optimal for the single-server system. Any policy from the k-server system can be mimicked by the single-server system, so SERPT-1 must provide a lower bound on the optimal policy for the k-server system.

The rest of this proof is devoted to proving the claim that E[NSERPT]≤E[NSERPT−1]+k·ℓ. To prove this, we will track the total work in the system, W, for each policy. Specifically, let Wiπ(t) be the total remaining size of all class i jobs in a system using the scheduling policy π at time t. Furthermore, let W≤γiπ(t) be the total remaining size of job in classes γ1 through γi at time t. Finally, let Δ≤γi(t) be defined as

Δ≤γi(t)≔W≤γiSERPT(t)−W≤γiSERPT−1(t).

We can take expectations to get

E[W≤γiSERPT]=E[W≤γiSERPT−1]+E[Δ≤γi].

Our goal is to get upper and lower bounds on E[Δ≤γi], and then use these bounds on the work in system to get a bound on the expected number of jobs in system.

First, it is easy to see that E[Δ≤γi]≥0. Consider any fixed arrival sequence of jobs and their associated sizes. This sequence corresponds to one possible sample path for all the random variables in the system. Assume for contradiction that, at some time t,

W≤γiSERPT(t)<W≤γiSERPT−1(t).

This implies that just before time t, the SERPT system completes work on classes γ1 through γi at a faster rate than the SERPT-1 system. However, the SERPT-1 system always completes this work at the maximal rate unless W≤γiSERPT−1(t)=0. This implies that

W≤γiSERPT(t)<0,
a contradiction. Because W≤γiSERPT(t)≥W≤γiSERPT−1(t) at any time t, for any arrival sequence of jobs, we have
E[W≤γiSERPT]≥E[W≤γiSERPT−1]  ∀1≤i≤ℓ.

To derive an upper bound, we again consider any fixed arrival sequence of jobs. For any value of i, we partition this arrival sequence into “nonbusy” intervals where the SERPT system has fewer than k jobs in classes γ1 through γi and “busy” intervals where SERPT has more than k jobs from these classes. For any time tn in a nonbusy interval, it is clear that Δ≤γi(tn) is at most the total remaining size of the at most k jobs in the SERPT system.

We now take expectations over all possible sample paths, giving

E[Δ≤γi(tn)]≤E[∑j=1N≤γiSERPT(tn)Sγi(j)]≤kE[Sγi],
where E[Sγi] is the expected size of a job from the class with the ith smallest expected job size. We are exploiting memorylessness here—the remaining size of each of the jobs in the SERPT system is exponentially distributed. Furthermore, because the classes are ordered by their expected job sizes, the remaining size of each job is stochastically less than or equal to Sγi.

We now use a similar argument to handle any time tb in a busy interval. For any time tb, there exists some t*≤tb that marks the start of the busy interval. At time t*, Δ≤γi(t*) is at most the total remaining size of the (exactly) k jobs in the SERPT system. In the interval [t*,tb], the SERPT completes work at rate k, the maximal rate of work for both systems, so Δ≤γi(tb)≤Δ≤γi(t*). We again take expectations to find that, for any time tb,

E[Δ≤γi(tb)]≤kE[Sγi].

Because our upper bound on Δ≤γi holds for any time t≥0, we have

E[Δ≤γi]≤kE[Sγi]  ∀1≤i≤ℓ
and therefore
E[W≤γiSERPT]≤E[W≤γiSERPT−1]+kE[Sγi]  ∀1≤i≤ℓ.

For class γ1 jobs, we now immediately use our upper bound to get

E[Wγ1SERPT]≤E[Wγ1SERPT−1]+kμγ1.

Because job sizes are exponential, we can divide this expression by the mean size of a class γ1 job to get

E[Nγ1SERPT]≤E[Nγ1SERPT−1]+k.

For class γi jobs where 1<i≤ℓ, we have

E[W≤γiSERPT]≤E[W≤γiSERPT−1]+kμγi  and  E[W≤γi−1SERPT]≥E[W≤γi−1SERPT−1].

We subtract the latter inequality from the former to yield

E[W≤γiSERPT]−E[W≤γi−1SERPT]≤E[W≤γiSERPT−1]+kμγi−E[W≤γi−1SERPT−1],(18)
E[WγiSERPT]≤E[WγiSERPT−1]+kμγi.(19)

We again divide by the average size of a class γi job to get

E[NγiSERPT]≤E[NγiSERPT−1]+k ∀1≤i≤ℓ⇒E[NSERPT]≤E[NSERPT−1]+k·ℓ
as desired. □

We are now ready to use Lemma 4 to prove Theorems 3 and 4.

Theorem 3.

Consider a system in the conventional heavy traffic limit as ρ→1. For any policy, π,

limρ→1E[Tπ]E[TSERPT]≥1.

That is, SERPT is asymptotically optimal in the conventional heavy traffic regime.

Proof.

To establish the optimality of SERPT in conventional heavy traffic, we note that for any policy π, E[Tπ]≥E[TSERPT−1]. If we can show that

limρ→1 E[TSERPT]E[TSERPT−1]=1,
then
limρ→1E[Tπ]E[TSERPT]=limρ→1E[Tπ]E[TSERPT]·limρ→1E[TSERPT]E[TSERPT−1]=limρ→1E[Tπ]E[TSERPT−1]≥1.

Hence, we now show that the E[TSERPT] converges to the E[TSERPT−1] as ρ→1.

We apply Little’s law to the result of Lemma 4, which yields

E[TSERPT−1]≤E[TSERPT]≤E[TSERPT−1]+O(1).(20)

The mean response time of the SERPT-1 system in conventional heavy traffic can be derived from standard results on priority queueing (e.g., (32.1) in Harchol-Balter (2013)), yielding

limρ→1E[TSERPT−1]=Θ(11−ρ).

Combining these two results gives

limρ→1E[TSERPT]E[TSERPT−1]≤limρ→1E[TSERPT−1]+O(1)E[TSERPT−1]=limρ→11+O(1−ρ)=1.

Because the mean response time under SERPT converges to that of the SERPT-1 system, SERPT is optimal in conventional heavy traffic. □

We now extend our proof from conventional heavy traffic to cover all super-NDS scaling regimes.

Theorem 4.

If α=o(1), then for any policy, π,

limk→∞E[Tπ]E[TSERPT]≥1.

That is, SERPT is asymptotically optimal in super-NDS scaling regimes.

Proof.

This argument closely follows the proof of Theorem 3. We again apply Lemma 4 to get (20). In super-NDS scaling regimes, we can again use a standard analysis of priority queueing systems to find that E[TSERPT−1]=Θ(1/α). This gives the analogous result that

limk→∞E[TSERPT]E[TSERPT−1]≤limk→∞E[TSERPT−1]+O(1)E[TSERPT−1]=limk→∞1+O(α)=1.

Hence, SERPT is asymptotically optimal in super-NDS scaling regimes. □

To conclude this section, we show that LPF can fail to minimize mean queueing time and can therefore be asymptotically worse than SERPT in both conventional heavy traffic and super-NDS scaling regimes.

Theorem 5.

Consider a system with a constant number of servers, k0, in conventional heavy traffic. There exists a set of job classes such that

limρ→1E[TLPF]E[TSERPT]>1.

Furthermore, in super-NDS scaling regimes where α=o(1), there exists a set of job classes such that

limk→∞E[TLPF]E[TSERPT]>1.

That is, LPF can be strictly suboptimal in conventional heavy traffic and super-NDS scaling regimes.

Proof.

Consider the case where ℓ=2 with c1=1, c2=k, and μ2>μ1. We established that SERPT is optimal in conventional heavy traffic by showing that

limρ→1 E[TSERPT]E[TSERPT−1]=1.

Given this result, we can prove the first part of our claim by showing that

limρ→1E[TLPF]E[TSERPT−1]>1⇒limρ→1E[TLPF]E[TSERPT]=limρ→1E[TLPF]E[TSERPT−1]·E[TSERPT−1]E[TSERPT]=limρ→1E[TLPF]E[TSERPT−1]>1.

We will also make an analogous argument for the case of super-NDS scaling. We begin by proving a lower bound on the performance of LPF.

We refer to a single-server system of speed k that serves jobs in LPF order as an LPF-1 system. We compare the performance of LPF-1 to the performance of LPF in our original k-server system to get limρ→1E[TLPF]E[TLPF−1]≥1. Similarly, in a super-NDS scaling regime, limk→∞E[TLPF]E[TLPF−1]≥1. These claims follow from a coupling argument similar to the proof of Lemma 4. The main difference is that we are assuming a different priority ordering of the job classes in this case, but this does not affect our coupling argument.

To complete the first part of our claim, we will show that in conventional heavy traffic,

limρ→1E[TLPF−1]E[TSERPT−1]>1.(21)

This will imply that

limρ→1E[TLPF]E[TSERPT−1]=limρ→1E[TLPF−1]E[TSERPT−1]·E[TLPF]E[TLPF−1]>1.(22)

To show (21), we rewrite this claim in terms of class 1 and class 2 response times to get

E[TLPF−1]E[TSERPT−1]=p1E[T1LPF−1]+p2E[T2LPF−1]p1E[T1SERPT−1]+p2E[T2SERPT−1]=p1E[S1]k(1−ρ1)+p2E[T2LPF−1]p2E[S2]k(1−ρ2)+p1E[T1SERPT−1]=O(1)+p2E[T2LPF−1]O(1)+p1E[T1SERPT−1]=O(1)p1E[T1SERPT−1]+p2E[T2LPF−1]p1E[T1SERPT−1]O(1)p1E[T1SERPT−1]+1.

Hence, it suffices to show that

E[T1SERPT−1]=ω(1)(23)
and
limρ→1p2E[T2LPF−1]p1E[T1SERPT−1]>1.(24)

From standard techniques for analyzing single-server priority queues, we know that E[T1SERPT−1]=Θ(ρ1−ρ)=ω(1) as ρ→1, and that (24) holds when μ2>μ1. Combined, these two conditions prove (21) and (22), completing the first part of the theorem.

To prove our second claim, we make an analogous argument about super-NDS scaling, where all limits are taken as k→∞. Specifically, E[T1SERPT−1]=Θ(1α) under super-NDS scaling, so (23) still holds in this case. Similarly, we know from standard single-server queueing analysis that

limk→∞ p2E[T2LPF−1]p1E[T1SERPT−1]>1.(25)

Thus, we can conclude that

limk→∞ E[TLPF]E[TSERPT−1]=limk→∞ E[TLPF−1]E[TSERPT−1]·E[TLPF]E[TLPF−1]=limk→∞ E[TLPF−1]E[TSERPT−1]>1.□

5. THRESH Policy

One limitation of our results thus far is that one may not know their system’s scaling regime. Theorems 1 and 4 suggest that one must know the system scaling behavior in order to select an asymptotically optimal policy. We therefore propose THRESH that dynamically chooses between LPF and SERPT without knowing the system scaling regime. THRESH toggles between LPF and SERPT depending on whether the number of jobs in the system exceeds some threshold, τ≈k. When the number of jobs in the system is less than τ, THRESH uses LPF to defer parallelizable work and avoid idling servers. When the number of jobs in the system is at least τ, THRESH uses SERPT to minimize queueing time.

Given two job classes with c1=1 and c2=k, we show that THRESH is asymptotically optimal in both sub-Halfin-Whitt and super-NDS regimes. Although our theoretical results are limited to this two-class case, we show in Section 6 that THRESH also performs well with additional inelastic and elastic classes of jobs.

The exact threshold value, τ, affects the traffic regimes in which THRESH is asymptotically optimal. We show that when τ=ω(k), THRESH is asymptotically optimal in sub-Halfin-Whitt and conventional heavy traffic regimes. Furthermore, THRESH is asymptotically optimal in any super-NDS regime where α=o(k/τ). That is, the threshold value τ can be any function that is ω(k), but its exact order affects the optimality result in the super-NDS regime. For example, we can choose τ to be τ=k log*k, where log* is the iterated logarithm function. Then in the super-NDS regime, THRESH is asymptotically optimal when α=o(1/log*k). Hence, THRESH can be asymptotically optimal in an arbitrarily large portion of the super-NDS regimes, depending on the choice of τ. We state this formally in Theorem 6.

Theorem 6.

Consider the problem of scheduling ℓ=2 classes of parallelizable jobs with c1=1 and c2=k. Consider the THRESH policy with a threshold value τ=ω(k). For any policy, π:

  1. If α=ω(k log k), then limk→∞E[Tπ]E[TTHRESH]≥1.

  2. In a conventional heavy-traffic scaling regime, limρ→1E[Tπ]E[TTHRESH]≥1.

  3. If α=o(k/τ), then limk→∞E[Tπ]E[TTHRESH]≥1.

Proof.

When μ1≥μ2, LPF, SERPT, and THRESH are equivalent, and this result is immediate. Hence, we will assume that μ1<μ2. We prove the three claims of Theorem 6 here.

5.1. Proof of Claim 1

We first split the mean response time into two parts by conditioning on job class:

E[TTHRESH]=p1E[T1THRESH]+p2E[T2THRESH].

To prove the asymptotic optimality of THRESH, we begin by showing that limk→∞E[T1THRESH]=1μ1.

Our proof strategy is to prove that E[# class 1 jobs in queue]=o(k). Specifically, let N1 and K1 be the number of class 1 jobs in the system and in service, respectively, in steady state. Then we know that E[# class 1 jobs in queue]=E[N1]−E[K1]=E[N1]−kρ1, where we have used the fact that E[K1]=kρ1, which can be verified using Little’s law. Then E[N1]−kρ1 can be further upper bounded as

E[N1]−kρ1≤E[(N1−(kρ1+δ))++δ],(26)
where δ is chosen such that kρ1+δ is an integer and δ=Θ(k), and the superscript + means taking the positive part, that is, x+=max{x,0} for any real number x. We assume that k is sufficiently large that kρ1+δ<k. Inequality (26) can be verified by considering the two cases that N1−(kρ1+δ)≥0 and N1−(kρ1+δ)<0. We choose to bound E[N1]−kρ1 in this particular way because (N1−(kρ1+δ))+ effectively removes the dynamics of N1 when N1<kρ1+δ, enabling us to focus on the more tractable scenario where N1≥kρ1+δ. Note that δ=Θ(k)=o(k). Therefore, it suffices to prove E[(N1−(kρ1+δ))+]=o(k), which is the focus of the remainder of this proof.

We bound E[(N1−(kρ1+δ))+] using Lyapunov drift analysis. We consider the Lyapunov function V(n1,n2)=((n1−(kρ1+δ))+)2 for any state (n1,n2). Let k1 denote the number of class 1 jobs in service when the state is (n1,n2). Then the drift of V can be written as

ΔV(n1,n2)=𝟙(n1=kρ1+δ)·λ1(k)+𝟙(n1≥kρ1+δ+1)·(λ1(k)·(2(n1−(kρ1+δ))++1)+μ1k1(−2(n1−(kρ1+δ))++1)).

We know that in steady state, E[ΔV(N1,N2)]=0. Therefore,

E[2(N1−(kρ1+δ))+(μ1K1−λ1(k))·𝟙(N1≥kρ1+δ+1)]=E[(λ1(k)+μ1K1)·𝟙(N1≥kρ1+δ+1)+λ1(k)·𝟙(N1=kρ1+δ)]≤E[(λ1(k)+μ1K1)·𝟙(N1≥kρ1+δ)]≤λ1(k)+kμ1.(27)

We lower bound the left-hand-side term E[2(N1−(kρ1+δ))+(μ1K1−λ1(k))·1(N1≥kρ1+δ+1)]. We abuse notation slightly and reuse LPF to also denote the event that the system is running LPF, that is, the event that N1+N2≤τ. Then,

E[2(N1−(kρ1+δ))+(μ1K1−λ1(k))·𝟙(N1≥kρ1+δ+1)]=E[2(N1−(kρ1+δ))+(μ1K1−λ1(k))·𝟙(LPF∩{N1≥kρ1+δ+1})]+E[2(N1−(kρ1+δ))+(μ1K1−λ1(k))·𝟙(LPFc∩{N1≥kρ1+δ+1})]≥E[2(N1−(kρ1+δ))+·μ1(δ+1)·𝟙(LPF∩{N1≥kρ1+δ+1})](28)
+ E[2(N1−(kρ1+δ))+(−λ1(k))·𝟙(LPFc∩{N1≥kρ1+δ+1})]=E[2(N1−(kρ1+δ))+·μ1(δ+1)·𝟙(LPF)]+E[2(N1−(kρ1+δ))+(−λ1(k))·𝟙(LPFc∩{N1≥kρ1+δ+1})](29)
=E[2(N1−(kρ1+δ))+·μ1(δ+1)]−E[2(N1−(kρ1+δ))+·μ1(δ+1)·𝟙(LPFc)]+E[2(N1−(kρ1+δ))+(−λ1(k))·𝟙(LPFc∩{N1≥kρ1+δ+1})]≥E[2(N1−(kρ1+δ))+·μ1(δ+1)]−E[2(N1−(kρ1+δ))+·(μ1(δ+1)+λ1(k))·𝟙(LPFc)],(30)
where (28) is because K1≥kρ1+δ+1 when LPF is in use and N1≥kρ1+δ+1, and (29) is due to the equality (N1−(kρ1+δ))+·1(N1≥kρ1+δ+1)=(N1−(kρ1+δ))+.

We now plug the lower bound (30) back into (27), which gives

E[2(N1−(kρ1+δ))+·μ1(δ+1)]≤λ1(k)+kμ1+E[2(N1−(kρ1+δ))+·(μ1(δ+1)+λ1(k))·𝟙(LPFc)]E[2(N1−(kρ1+δ))+]≤λ1(k)+kμ12μ1(δ+1)+E[(N1−(kρ1+δ))+·(μ1(δ+1)+λ1(k))·𝟙(LPFc)]μ1(δ+1).

Because the first term λ1(k)+kμ12μ1(δ+1)=o(k), it suffices to show the second term is also o(k). To this end, we have

E[(N1−(kρ1+δ))+·(μ1(δ+1)+λ1(k))·𝟙(LPFc)]≤(μ1(δ+1)+λ1(k))·E[N1·𝟙(LPFc)]≤(μ1(δ+1)+λ1(k))·E[N12]1/2·(Pr(LPFc))1/2(31)
≤(μ1(δ+1)+λ1(k))·O(k2)·(Pr(LPFc))1/2.(32)

Here, (31) follows from the Cauchy-Schwarz inequality, and (32) follows from the same moment bound used in Appendix D. What remains is to bound Pr(LPFc).

Recall that THRESH performs LPF if N1+N2≤τ. Thus, Pr(LPFc)=Pr(N1+N2>τ). Given sufficiently large values of k,

N1+N2>τ⇒N1μ1+N2μ2>N1+N2μ2>τμ2⇒N1μ1+N2μ2>2kμ1,(33)
where (33) uses the assumption that μ1<μ2 and τ=ω(k). We consider the Lyapunov function W(n1,n2)=n1/μ1+n2/μ2. When W(n1,n2)≥kμ1, we have either at least k class 1 jobs or at least 1 class 2 job in service. This means all servers are busy under THRESH. Let k1 and k2 be the numbers of servers working on class 1 and class 2 jobs, respectively, in state (n1,n2). Therefore, because k1+k2=k, we have
ΔW(n1,n2)=λ1(k)1μ1+λ2(k)1μ2−k1·μ11μ1−k2·μ21μ2=kρ1+kρ2−k=−α.

Then, using the same tail bound from Appendix B, we have

Pr(N1μ1+N2μ2>2kμ1)≤((λ1(k)+λ2(k))/μ1(λ1(k)+λ2(k))/μ1+α)k+1=O(e−dα),(34)
for some constant d>0 independent of k. Therefore,
Pr(LPFc)=Pr(N1+N2>τ)=O(e−dα).

Plugging this back into (32) yields

E[(N1−(kρ1+δ))+·(μ1(δ+1)+λ1(k))·𝟙(LPFc)]=O(k3e−dα).(35)

Putting everything together gives

E[2(N1−(kρ1+δ))+]≤λ1(k)+kμ12μ1(δ+1)+E[(N1−(kρ1+δ))+·(μ1(δ+1)+λ1(k))·𝟙(LPFc)]μ1(δ+1)=o(k)+O(k3e−dα)μ1(δ+1)=o(k).

Applying Little’s law then gives

limk→∞ E[T1]≤o(k)+kρ1+δλ1(k)=1μ1.

To complete our proof, note that the response time of class 2 jobs under THRESH should intuitively be lower than their response time under LPF, because the number of servers devoted to class 2 jobs under THRESH is greater than or equal to the number of servers used for class 2 jobs by LPF in every state. Formally, we can prove this using a drift argument that is nearly identical to that of Lemma 3. Specifically, we pessimistically assume that class 2 jobs always get (k−N1)+ servers. Then, we bound the number of class 1 jobs using the modified tail bound from Appendix C. Here, we use our bound on Pr(LPFc) to bound the probability of having positive drift in the number of class 1 jobs. From this point, the argument to bound E[N2] is identical to the proof of Lemma 3, giving limk→∞E[T2THRESH]=0.

Hence, the mean response time of both class 1 and class 2 jobs under THRESH is asymptotically optimal.

5.2. Proof of Claim 2

Our proof follows the general argument of Theorem 3 with some adjustments. Recall that in the proof of Theorem 3, we consider the SERPT-1 system, which uses a single server of speed k to run the optimal single-server policy that prioritizes jobs with the highest values of μi.

For any scheduling policy π, limρ→1E[Tπ]E[TSERPT−1]≥1. Therefore, to prove that limρ→1E[Tπ]E[TTHRESH]≥1, it suffices to prove that limρ→1E[TSERPT−1]E[TTHRESH]=1. Because limρ→1E[TSERPT−1]E[TTHRESH]≤1, it suffices to prove that limρ→1E[TSERPT−1]E[TTHRESH]≥1.

We first split the mean response time into two parts based on class 1 and class 2 jobs:

E[TSERPT−1]E[TTHRESH]=p1E[T1SERPT−1]+p2E[T2SERPT−1]p1E[T1THRESH]+p2E[T2THRESH].

Intuitively, class 1 jobs should perform well under THRESH compared with the SERPT-1 system, because class 1 jobs always have low priority in the SERPT-1 system. Specifically, we can show that

E[N1THRESH]≤E[N1SERPT−1]+k.(36)

To prove this, we compare THRESH to a single-server system of speed k that also runs THRESH. Using the same coupling argument from the proof of Theorem 3, we show that the single-server version of THRESH is within k jobs of the k server version of THRESH on average. Then, because the SERPT-1 system gives lower priority to class 1 jobs than THRESH, the SERPT-1 system must have more class 1 jobs than the single-server THRESH system on average. Taken together, these arguments yield (36). We then have

E[TSERPT−1]E[TTHRESH]≥p1E[T1SERPT−1]+p2E[T2SERPT−1]p1E[T1SERPT−1]+O(1)+p2E[T2THRESH]≥p1E[T1SERPT−1]p1E[T1SERPT−1]+O(1)+p2E[T2THRESH].(37)

Next, we know from classical queueing theory that

E[T1SERPT−1]≥11−ρ2(1kμ1+ρ2kμ2(1−ρ)+ρ1kμ1(1−ρ)).(38)

We can also prove the following lemma, whose proof is given in Appendix E.

Lemma 5.

The mean response time of class 2 jobs under THRESH can be bounded as E[T2THRESH]≤2τkμ2ρ2+4kμ2ρ2(1−ρ2).

To finish our proof, we can apply these bounds to (37), giving

E[TSERPT−1]E[TTHRESH]≥p1E[T1SERPT−1]p1E[T1SERPT−1]+O(1)+O(1)   and  limρ→1E[TSERPT−1]E[TTHRESH]≥lim ρ→111+O(1−ρ)=1.

5.3. Proof of Claim 3

To prove Claim 3, we can slightly modify our proof of Claim 2. Recall that for THRESH in super-NDS regimes, we have assumed α=o(k/τ). Furthermore, we have that limk→∞ρ2=ρ2* where ρ2* is a constant. Therefore, in super-NDS regimes, the bound in (38) becomes E[T1SERPT−1]=ω(τ/k), and the upper bound in Lemma 5 becomes E[T2THRESH]=O(τ/k). Applying these bounds to (37) (which remains the same) gives

E[TSERPT−1]E[TTHRESH]≥p1E[T1SERPT−1]p1E[T1SERPT−1]+O(1)+O(τk)  and  limk→∞ E[TSERPT−1]E[TTHRESH]≥limk→∞11+o(kτ)+o(1)=1.

Taken together, these three claims give Theorem 6. □

6. Evaluation

In this section, we evaluate our theoretical results via simulation. Although our theoretical results require some technical assumptions, we find that the high-level lessons from these theorems—deferring parallelizable work in lighter load and prioritizing short jobs in heavier load—apply more generally.

6.1. THRESH with Additional Classes

Although we prove the asymptotic optimality of THRESH in a special case of our model with ℓ=2 job classes, we conjecture that THRESH works well in general for any number of job classes with arbitrary levels of parallelizability. To validate this intuition, we simulate LPF, SERPT, and THRESH in various scaling regimes in Figure 1. Indeed, given ℓ=4 job classes with a variety of parallelizability levels, THRESH performs near-optimally in both sub-Halfin-Whitt and super-NDS scaling regimes.

Figure 1. Simulations of Various Scheduling Policies in Sub-Halfin-Whitt (Top) and Super-NDS (Bottom) Regimes with α=2k3/4 and α=2k−1/4, Respectively
Notes. Here, ℓ=4, and c1=1, c2=4, c3=log k, c4=k and μ1=.2, μ2=.05, μ3=.3, μ4=.1. In sub-Halfin-Whitt regimes, mean response time under LPF converges to mean service time (our “lower bound”). In super-NDS regimes, mean response time under SERPT is close to that of the SERPT-1 policy, a lower bound that assumes a single fast server. THRESH performs well in both regimes.

Although our theoretical results only consider the sub-Halfin-Whitt and super-NDS scaling regimes, we simulated the performance of these policies in a middle scaling regime that lies between these cases for the sake of completeness. These results are presented in Appendix F.

6.2. General Job Size Distributions

We have thus far assumed that each class of jobs, i, is associated with some exponential job size distribution. It is not clear how our results generalize when job sizes are generally distributed.

First, consider scheduling generally distributed parallelizable jobs in conventional heavy traffic. Recent results (Scully et al. 2020a) have demonstrated that a Gittins index policy is optimal for scheduling nonparallelizable jobs in conventional heavy traffic. We find that these results hold when jobs are parallelizable. Specifically, Scully et al. (2020a) define a quantity called B(r) that tracks the number of servers used to run jobs with a Gittins index of r or less. When moving from nonparallelizable jobs to parallelizable jobs, B(r) does not decrease for any given system state, implying that the bounds from this work continue to hold when scheduling parallelizable jobs. The key fact exploited in Scully et al. (2020a) is that, when B(r) is small because fewer than k servers are working on a job with Gittins index at most r, there must be at most k−1 rank r jobs in the system. When jobs are parallelizable, this same principle holds because we now assume that each job runs on at least one server. Following the arguments from Scully et al. (2020a), we find that prioritizing parallelizable jobs based on their Gittins indices is optimal in conventional heavy traffic.

Unfortunately, this argument does not generalize cleanly to other scaling regimes. The proof of heavy-traffic optimality in Scully et al. (2020a) relies on the analysis of SRPT in conventional heavy traffic from Lin et al. (2010). Currently, the behavior of SRPT in other scaling regimes is not well understood. We conjecture that a Gittins-based policy is asymptotically optimal in super-NDS scaling regimes, but a proof of this claim does not follow immediately from Scully et al. (2020a) and is beyond the scope of this paper.

Second, consider scheduling non–exponentially distributed jobs in sub-Halfin-Whitt scaling regimes. Given that our results hold for ℓ exponential job classes, we conjecture that our results hold for phase-type job size distributions. Specifically, our current proof of the optimality of LPF bounds E[Ti] by showing that the departure rate of class i jobs is almost always greater than λi(k). Given jobs with phase-type distributions, we can use a similar argument to bound the time required to complete each phase of each type of job. However, when considering some phase, j, of class i jobs, the rate at which jobs enter phase j is not stationary—It depends on the number of class i jobs in service whose next phase could be j. Hence, we must argue that the completion rate of jobs in phase j is almost always greater than the time-varying rate at which jobs enter phase j. We can easily compute the long-run average rate at which jobs enter phase j, but we must show that the fluctuations around this average rate do not cause problems for a policy like LPF.

Although a proof for the case of phase-type job sizes is beyond the scope of this paper, we check via simulation to confirm that our conjecture is plausible. Figure 2 shows that our results appear to hold given jobs that follow different hyperexponential distributions with various levels of job size variability. Here, C2=1 corresponds to the same exponential distributions as Figure 1. The larger values of C2 denote that the job size distributions are balanced-mean hyperexponential distributions with the same mean job sizes but correspondingly higher squared coefficients of variation. We find that, although convergence appears slower as C2 increases, LPF and THRESH appear to be asymptotically optimal in sub-Halfin-Whitt scaling regimes.

Figure 2. Simulations Showing the Effect of Variability on Mean Response Time
Notes. Experiments use the same ℓ=4 job classes as Figure 1, but with different job size distributions. When C2=1, the job size distribution is exponential. As C2 increases, we examine hyperexponential job size distributions with two states such that the mean job size remains the same, but the squared coefficient of variation is increased.

7. Conclusion

This paper presents the first theoretical results on balancing the tradeoff between prioritizing short jobs and deferring parallelizable work. Additionally, this paper provides the first optimality results on scheduling more than two classes of parallelizable jobs, where each class has its own job size distribution and parallelizability level. We show that the choice of an asymptotically optimal scheduling policy depends on the scaling regime chosen. LPF is asymptotically optimal in sub-Halfin-Whitt regimes, and SERPT is asymptotically optimal in super-NDS regimes. The THRESH policy, which combines LPF and SERPT, is asymptotically optimal in both sub-Halfin-Whitt and super-NDS scaling regimes.

We see two main avenues for extending our results. First, as discussed in Section 6.2, allowing jobs to follow arbitrary size distributions complicates our analysis. Existing techniques for analyzing M/G/k systems with nonparallelizable jobs have only considered scheduling in conventional heavy traffic, and it remains unclear how to extend these results both to lighter-load scaling regimes and to scheduling parallelizable jobs. Second, we have assumed that our jobs are perfectly parallelizable up to some parallelizability level. In practice, however, jobs may receive a sublinear speedup from parallelization. Hence, although our results consider a work-conserving system, it is of great practical interest to analyze a non–work-conserving variant of our problem. We note that this generalization is related to the problem of state-dependent service rates (Ayesta et al. 2020) and the analysis of systems with Markov-Modulated service rates (Duran et al. 2022). We hope that the techniques and intuition developed in these papers can be applied to the problem of scheduling jobs with sublinear speedups.

Appendix A. Asymptotic Notation

We use standard asymptotic notation throughout the paper to describe scaling behavior. Specifically, consider two functions f(k),g(k)>0, and let c1,c2>0 be arbitrary constants. We define the relevant notation in the table below.

Table

Table A.1. Asymptotic Notation

Table A.1. Asymptotic Notation

NameNotationDefinitionDescription
Little-of(k)=o(g(k))limk→∞f(k)g(k)=0f(k) grows much slower than g(k)
Big-Of(k)=O(g(k))lim supk→∞f(k)g(k)≤c1f(k) grows weakly slower than g(k)
Big-Θf(k)=Θ(g(k))c1≤lim supk→∞f(k)g(k)≤c2f(k) grows roughly as fast as g(k)
Little-ωf(k)=ω(g(k))limk→∞f(k)g(k)=∞f(k) grows much faster than g(k)

Appendix B. Drift-Based Tail Bound

We use lemma 10 from Wang et al. (2022) to bound the tail probability of N1LPF. This lemma defines a Lyapunov function, V(x). If the drift of the Lyapunov function is negative when V(x)>y, the lemma bounds the probability that V(X)≫y. A full statement of lemma 10 from Wang et al. (2022) can be found in the Online Appendix. Using this lemma, we prove the following tail bound.

Lemma B.1.

For some constant d>0,

Pr(N1LPF≥ρ1k+αℓ)=O(e−dα2/k).

Proof.

We begin by defining a Lyapunov function V(x)=n1. Let μmax=max1≤i≤ℓμi.

When n1≥ρ1k+α2ℓ, the drift of the Lyapunov function, ΔV, is

ΔV(x)=λ1(k)−μ1·n1≤λ1(k)−μ1(ρ1k+α2ℓ)=−μ1α2ℓ.

The other conditions needed to apply the lemma from Wang et al. (2022) are trivially satisfied. Furthermore, the maximum rate of departures from any state, qmax, is μmax+λ(k). We therefore obtain the following bound:

Pr(N1LPF≥(ρ1k+α2ℓ)+2·α4ℓ)≤(qmaxqmax+α2ℓ)1+α4ℓ≤(qmaxqmax+α2ℓ)α4ℓ.

We then simplify this expression as follows:

Pr(N1LPF≥(ρ1k+α2ℓ)+2·α4ℓ)≤(qmax+α2ℓqmax+α2ℓ−α2ℓqmax+α2ℓ)α4ℓ=(1−12ℓ·qmaxμ1α+1)α4ℓ=(1−1kμ1α(2ℓμmax+λ(k)k+αk))α4ℓ≤(1−dkα)α4ℓ
for some constant d>0. Note that this constant d exists because α<k and λ(k)=Θ(k). To get the desired bound, we can then write
Pr(N1LPF≥(ρ1k+α2ℓ)+2·α4ℓ)≤((1−c1kα)kα)α24ℓk.

For any positive value of k, this yields

Pr(N1LPF≥(ρ1k+α2ℓ)+2·α4ℓ)=Pr(N1LPF≥ρ1k+αℓ)≤e−dα2/4ℓk. □

Appendix C. Modified Drift-Based Tail Bound

We now apply a slightly modified version of the drift bound from Appendix B to bound NiLPF. Whereas the original bound requires strictly negative drift in the Lyapunov function when its value is sufficiently large, the modified tail bound allows positive drift in the Lyapunov function as long as the stationary probability of being in the states with positive drift is bounded. This bound is originally proven as lemma A.1 of Weng and Wang (2020) (see the Online Appendix for details).

Lemma C.1.

For any class of jobs, i+1≤I, there exist constants fi+1(i+1)>0 and di+1(i+1)>0 such that

Pr(Ni+1LPF≥βi+1)≤fi+1(i+1)e−di+1(i+1)α2/k+O(kα)Pr(X∉Ei),
where Ei is the set of states such that nj<βj for all j≤i.

Proof.

We define a Lyapunov function V(x)=ni+1.

For any state, x, in Ei, the number of servers available to class i+1 jobs is at least

k−∑j=1icj·βj≥k−∑j=1iρjk+αℓ+cj≥ρi+1k+αℓ−∑j=1icj.

Hence, as long as a state is in Ei, we can apply the same drift argument used in Lemma B.1. Here, we are relying on the assumption that, for any i≤I,

∑j=1icj=O(1)  and  α=ω(1),
so the extra servers used by the lower-class jobs do not affect our drift argument order-wise.

The issue is that when a state is not in Ei, there may not be enough free servers to guarantee negative drift of the Lyapunov function. However, the positive drift in these states is upper bounded by λi+1(k)=O(k). Hence, according to the lemma from Weng and Wang (2020), we can bound the tail probability of Ni+1 in terms of the stationary probability that a state lies outside Ei and causes positive drift in our Lyapunov function. Specifically, we have

Pr(Ni+1LPF>βi+1)≤fi+1(i+1)e−di+1(i+1)α2/k+O(kα)Pr(X∉Ei)
for some constants fi+1(i+1)>0 and di+1(i+1)>0. □

Appendix D. Proof of Equation (8)

We divide the proof of (8) into two parts: a technical lemma and a main lemma.

We begin by proving the following technical lemma using the drift-based moment bound from lemma 10 of Wang et al. (2022). See the Online Appendix for a full statement of the moment bound.

Lemma D.1.

For any class of jobs, i,

E[(NiLPF)2]=O(k2+(kα)2).

Thus, in the sub-Halfin-Whitt regime,

E[(NiLPF)2]=O(k2).

Proof.

We begin by defining the Lyapunov function V(x)=∑j=1inj/μj and let μmin=minj≤iμj. Consider any state x where V(x)≥2k/μmin. This implies that ∑j=1inj(μmin/μj)≥2k and thus ∑j=1inj≥2k.

Because there are more than k jobs in the system, and each job can use at least one server, there are no idle servers when V(x)≥2k/μmin. Let ki be the number of servers allocated to class i jobs when the system is in state x. We have

ΔV(x)=∑j=1iλj(k)μj−∑j=1ikjμjμj(D.1)
=−k(1−∑j=1iρj)=−α.(D.2)

The total transition rate out of any state is upper bounded by some O(k) term. Furthermore, the change in V between adjacent states is bounded by ∑j=1ℓ1/μj. Hence, the bound from Wang et al. (2022) yields

E[V(X)2]≤d1k2+d2+(d3k+αα)2
for some constants d1,d2,d3>0. This gives
E[(NiLPF)2]≤μi·E[V(X)2]=O(k2+(kα)2).

In the sub-Halfin-Whitt regime, we have α=ω(k log k), and thus

E[(NiLPF)2]=O(k2). □

We now use the technical lemma to prove our main lemma, restated from (8).

Lemma D.2.

For sufficiently large k, when α=ω(k log k),

E[Kiδi]≥(ρik+log k)E[δi]−O(1), ∀i≤I.

Proof.

To get this lower bound, we will use the bound on Pr(X∉Ei−1) from Lemma 1. Note that when X∈Ei−1, we have

Ki≥k−∑j=1i−1kρj+αℓ+cj≥kρi+αℓ−∑j=1i−1cj,
and thus, for any i≤I and for sufficiently large k,
E[Kiδi]≥E[𝟙(Ni≥θi)1(X∈Ei−1)δiKi]≥(kρi+log k)E[𝟙(Ni≥θi)1(X∈Ei−1)δi](D.3)
≥(kρi+log k)E[𝟙(Ni≥θi)δi−1(δi≥θi)1(X∉Ei−1)δi](D.4)
≥(kρi+log k)E[𝟙(Ni≥θi)δi−1(X∉Ei−1)δi](D.5)
=(kρi+log k)E[δi−1(X∉Ei−1)δi].(D.6)

Here, we exploit the fact that there are ρik+α/ℓ−O(1) free cores when X∈Ei−1, and we are conditioning on having enough jobs to use ρik+log k cores. Because we are in a sub-Halfin-Whitt scaling regime, α/ℓ−O(1)>log k for sufficiently large k, so (D.3) holds for sufficiently large k.

We now apply Cauchy-Schwarz to show that the second, negative term inside the expectation is o(1/k). That is, we want to show that

E[1(X∉Ei−1)δi]≤E[(1(X∉Ei−1))2]E[δi2]=E[(1(X∉Ei−1))]E[δi2]=o(1k).

For the indicator term, it suffices to apply the bound from Lemma 1. We then need to show that E[δi2] is not too large. We bound E[δi2] using our technical lemma, Lemma D.1, to get

E[δi2]≤E[Ni2]≤μiE[V(x)2]=O(k2).

Hence, the second term in (D.6) is o(1/k). This gives the desired bound on E[Kiδi]. □

Appendix E. Proof of Lemma 5

Lemma 5

(Restated). The mean response time of class 2 jobs under THRESH can be bounded as E[T2THRESH]≤2τkμ2ρ2+4kμ2ρ2(1−ρ2).

Proof.

Consider the Lyapunov function V(n1,n2)=n2 for any state (n1,n2). Then, when V(n1,n2)≥τ, we know that THRESH must be prioritizing class 2 jobs, and thus the drift is given by

ΔV(n1,n2)=λ2(k)−kμ2=−kμ2(1−ρ2).

Therefore, by the moment bounds in Wang et al. (2022), we have

E[N2THRESH]≤2τ+4·λ2(k)+kμ2(1−ρ2)kμ2(1−ρ2)=2τ+41−ρ2.

Then by Little’s law, we have

E[T2THRESH]=E[N2THRESH]λ2(k)≤2τkμ2ρ2+4kμ2ρ2(1−ρ2). □

Appendix F. Simulations in a Middle Scaling Regime

Although our theoretical results apply to both the sub-Halfin-Whitt and super-NDS scaling regimes, we can simulate the performance of various policies in the middle scaling regimes between these two cases. Figure F.1 shows that performance in the middle scaling regimes appears similar to performance in the sub-Halfin-Whitt regimes, with LPF and THRESH converging to the optimal mean response time as k→∞.

Figure F.1. Simulations of Various Scheduling Policies in a Middle Scaling Regime with α=2k1/4
Notes. Here, ℓ=4, and c1=1, c2=4, c3=log k, c4=k and μ1=0.2, μ2=0.05, μ3=0.3, μ4=0.1. In this case, as in the sub-Halfin-Whitt regimes, both LPF and THRESH appear to perform well as k increases, whereas SERPT appears to converge to an asymptotically suboptimal mean response time.
Endnotes

1 The sub-Halfin-Whitt regime was first introduced in Liu and Ying (2020) and was subsequently discussed in Varma et al. (2023) and Storm and Borst (2023). The original definition requires α=Θ(kb) for any .5<b<1. Our definition is more general in that it requires just log k separation from the Halfin-Whitt regime and includes mean-field scaling regimes.

2 This is where we use the log k separation from the Halfin-Whitt regime in our argument about the sub-Halfin-Whitt regime.

3 This argument requires that E[V(X)2] is finite. It is easy to see that δi has finite moments using the drift bound in Section EC.2 of the Online Appendix.

4 Again, E[G(X)2] is finite because δi has finite moments.

5 This argument requires E[V(X)2] to be finite, which is easily shown using the drift bound in Section EC.2 of the Online Appendix.

References

  • Agrawal K, Leiserson CE, He Y, Hsu WJ (2008) Adaptive work-stealing with parallelism feedback. ACM Trans. Comput. Systems 26(3):1–32.Google Scholar
  • Agrawal K, Li J, Lu K, Moseley B (2016) Scheduling parallel DAG jobs online to minimize average flow time. Krauthgamer R, ed. Proc. Twenty-Seventh Annual ACM-SIAM Sympos. Discrete Algorithms (SODA 2016) (Society for Industrial and Applied Mathematics, Philadelphia), 176–189. Google Scholar
  • Atar R (2012) A diffusion regime with nondegenerate slowdown. Oper. Res. 60(2):490–500.Link, Google Scholar
  • Ayesta U, Prabhu B, Righter R (2020) Scheduling in a single-server queue with state-dependent service rates. Probab. Engrg. Inform. Sci. 34(4):507–521.Google Scholar
  • Berg B, Dorsman J, Harchol-Balter M (2018) Towards optimality in parallel scheduling. Proc. ACM Measurement Analysis Comput. Systems 1(2):1–30.Google Scholar
  • Berg B, Vesilo R, Harchol-Balter M (2020a) heSRPT: Parallel scheduling to minimize mean slowdown. Performance Evaluation 144:102–147.Google Scholar
  • Berg B, Harchol-Balter M, Moseley B, Wang W, Whitehouse J (2020b) Optimal resource allocation for elastic and inelastic jobs. Proc. 32nd ACM Sympos. Parallelism Algorithms Architectures (ACM, New York), 75–87.Google Scholar
  • Berg B, Whitehouse J, Moseley B, Wang W, Harchol-Balter M (2022) The case for phase-aware scheduling of parallelizable jobs. ACM SIGMETRICS Performance Evaluation Rev. 49(3):65–66.Google Scholar
  • Bertsimas D, Paschalidis IC, Tsitsiklis JN (1994) Optimization of multiclass queueing networks: Polyhedral and nonlinear characterizations of achievable performance. Ann. Appl. Probab. 4(1):43–75.Google Scholar
  • Blumofe RD, Leiserson CE (1999) Scheduling multithreaded computations by work stealing. J. ACM 46(5):720–748.Google Scholar
  • Chen J, Jindel S, Walzer R, Sen R, Jimsheleishvilli N, Andrews M (2016) The memsql query optimizer: A modern optimizer for real-time analytics in a distributed database. Proc. VLDB Endowment 9(13):1401–1412.Google Scholar
  • Delgado P, Didona D, Dinu F, Zwaenepoel W (2018) Kairos: Preemptive data center scheduling without runtime estimates. Proc. ACM Sympos. Cloud Comput. (ACM, New York), 135–148.Google Scholar
  • Duran S, Ayesta U, Verloop I (2022) On the Whittle index of Markov modulated restless bandits. Queueing Systems 102(3–4):373–430.Google Scholar
  • Edmonds J (1999) Scheduling in the dark. Proc. 31st Annual ACM Sympos. Theory Comput. (ACM, New York), 179–188.Google Scholar
  • Eryilmaz A, Srikant R (2012) Asymptotically tight steady-state queue length bounds implied by drift conditions. Queueing Systems 72(3):311–359.Google Scholar
  • Grosof I, Harchol-Balter M, Scheller-Wolf A (2020) Stability for two-class multiserver-job systems. Preprint, submitted October 1, https://arxiv.org/abs/2010.00631.Google Scholar
  • Grosof I, Harchol-Balter M, Scheller-Wolf A (2022a) WCFS: A new framework for analyzing multiserver systems. Queueing Systems 102(1–2):143–174.Google Scholar
  • Grosof I, Scully Z, Harchol-Balter M (2018) SRPT for multiserver systems. Performance Evaluation 127:154–175.Google Scholar
  • Grosof I, Scully Z, Harchol-Balter M, Scheller-Wolf A (2022b) Optimal scheduling in the multiserver-job model under heavy traffic. Proc. ACM Measurement Analysis Comput. Systems 6(3):1–32.Google Scholar
  • Gupta V, Walton N (2019) Load balancing in the nondegenerate slowdown regime. Oper. Res. 67(1):281–294.Link, Google Scholar
  • Gupta A, Acun B, Sarood O, Kalé LV (2014) Towards realizing the potential of malleable jobs. Proc. IEEE 21st Internat. Conf. High Performance Comput. (IEEE Computer Society, Washington, DC), 1–10.Google Scholar
  • Halfin S, Whitt W (1981) Heavy-traffic limits for queues with many exponential servers. Oper. Res. 29(3):567–588.Link, Google Scholar
  • Harchol-Balter M (2013) Performance Modeling and Design of Computer Systems: Queueing Theory in Action (Cambridge University Press, Cambridge, UK).Google Scholar
  • Harchol-Balter M (2022) The multiserver job queueing model. Queueing Systems 100(3):201–203.Google Scholar
  • Hill MD, Marty MR (2008) Amdahl’s law in the multicore era. Computer 41:33–38.Google Scholar
  • Hong Y, Wang W (2022) Sharp waiting-time bounds for multiserver jobs. Proc. Twenty-Third Internat. Sympos. Theory Algorithmic Foundations Protocol Design Mobile Networks Mobile Comput. (ACM, New York), 161–170. Google Scholar
  • Jayaram Subramanya S, Arfeen D, Lin S, Qiao A, Jia Z, Ganger GR (2023) Sia: Heterogeneity-aware, goodput-optimized ML-cluster scheduling. Flinn J, Seltzer MI, Druschel P, Kaufmann A, Mace J, eds. Proc. 29th Sympos. Operating Systems Principles (ACM, New York), 642–657. Google Scholar
  • Leis V, Boncz P, Kemper A, Neumann T (2014) Morsel-driven parallelism: A NUMA-aware query evaluation framework for the many-core age. Dyreson C, ed. Proc. 2014 ACM SIGMOD Internat. Conf. Management Data (ACM, New York), 743–754.Google Scholar
  • Lin M, Wierman A, Zwart B (2010) The average response time in a heavy-traffic SRPT queue. ACM SIGMETRICS Performance Evaluation Rev. 38(2):12–14.Google Scholar
  • Lin S-H, Paolieri M, Chou C-F, Golubchik L (2018) A model-based approach to streamlining distributed training for asynchronous sgd. 2018 IEEE 26th Internat. Sympos. Modeling Anal. Simulation Comput. Telecomm. Systems (MASCOTS) (IEEE Computer Society, Washington, DC), 306–318.Google Scholar
  • Liu X, Ying L (2020) Steady-state analysis of load-balancing algorithms in the sub-Halfin–Whitt regime. J. Appl. Probab. 57(2):578–596.Google Scholar
  • Qiao A, Choe SK, Subramanya SJ, Neiswanger W, Ho Q, Zhang H, Ganger GR, Xing EP (2021) Pollux: Co-adaptive cluster scheduling for goodput-optimized deep learning. 15th USENIX Sympos. Operating Systems Design Implementation (OSDI 2021) (USENIX Association, Berkeley, CA).Google Scholar
  • Scully Z, Grosof I, Harchol-Balter M (2020a) The Gittins policy is nearly optimal in the M/G/k under extremely general conditions. Proc. ACM Measurement Analysis Comput. Systems 4(3):1–29.Google Scholar
  • Scully Z, Grosof I, Harchol-Balter M (2020b) Optimal multiserver scheduling with unknown job sizes in heavy traffic. ACM SIGMETRICS Performance Evaluation Rev. 48(2):33–35.Google Scholar
  • Storm PJ, Borst S (2023) Diffusion-level universality of many-server systems with concurrent service. Oper. Res. Lett. 51(3):212–219.Google Scholar
  • Tumanov A, Zhu T, Park JW, Kozuch MA, Harchol-Balter M, Ganger GR (2016) Tetrisched: Global rescheduling with adaptive plan-ahead in dynamic heterogeneous clusters. Cadar C, Pietzuch PR, Keeton K, Rodrigues R, eds. Proc. Eleventh European Conf. Comput. Systems (ACM, New York), 1–16.Google Scholar
  • Van Mieghem JA (1995) Dynamic scheduling with convex delay costs: The generalized cμ rule. Ann. Appl. Probab. 809–833.Google Scholar
  • Varma SM, Castro F, Maguluri ST (2023) Power-of-d choices load balancing in the sub-Halfin Whitt regime. Stochastic Systems 15(4):291–336. Google Scholar
  • Vernica R, Carey MJ, Li C (2010) Efficient parallel set-similarity joins using mapreduce. Proc. ACM SIGMOD Internat. Conf. Management Data (ACM, New York), 495–506.Google Scholar
  • Wagner B, Kohn A, Neumann T (2021) Self-tuning query scheduling for analytical workloads. Proc. Internat. Conf. Management Data (ACM, New York), 1879–1891.Google Scholar
  • Wang W, Maguluri ST, Srikant R, Ying L (2022) Heavy-traffic insensitive bounds for weighted proportionally fair bandwidth sharing policies. Math. Oper. Res. 47(4):2691–2720.Link, Google Scholar
  • Weng W, Wang W (2020) Achieving zero asymptotic queueing delay for parallel jobs. Proc. ACM Measurement Analysis Comput. Systems 4(3):1–36.Google Scholar
  • Xu K (2023) Drift method: From stochastic networks to machine learning. Accessed September 3, 2023, https://web.stanford.edu/kuangxu/papers/driftmethod.pdf.Google Scholar
  • Zhu Y, Jiang Y, Wu W, Ding L, Teredesai A, Li D, Lee W (2014) Minimizing makespan and total completion time in MapReduce-like systems. IEEE INFOCOM 2014-IEEE Conf. Comp. Comm. (IEEE, Piscataway, NJ), 2166–2174.Google Scholar