<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>On Max-Min Fairness of Completion Times for Multi-Task Job Scheduling</title></titleStmt>
			<publicationStmt>
				<publisher></publisher>
				<date>07/20/2020</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10249199</idno>
					<idno type="doi"></idno>
					<title level='j'>2020 IFIP Networking Conference (Networking)</title>
<idno></idno>
<biblScope unit="volume"></biblScope>
<biblScope unit="issue"></biblScope>					

					<author>Mehrnoosh Shafiee</author><author>Javad Ghaderi</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[We study the max-min fairness of multi-task jobs in distributed computing platforms. We consider a setting where each job consists of a set of parallel tasks that need to be processed on different servers, and the job is completed once all its tasks finish processing. Each job is associated with a utility which is a decreasing function of its completion time, and captures how sensitive it is to latency. The objective is to schedule tasks in a way that achieves max-min fairness for jobs' utilities, i.e., an optimal schedule in which any attempt to improve the utility of a job necessarily results in hurting the utility of some other job with smaller or equal utility. We first show a strong result regarding NP-hardness of finding the max-min fair vector of job utilities. The implication of this result is that achieving max-min fairness in many other distributed scheduling problems (e.g., coflow scheduling) is NP-hard. We then proceed to define two notions of approximation solutions: one based on finding a certain number of elements of the max-min fair vector, and the other based on a single-objective optimization whose solution gives the max-min fair vector. We develop scheduling algorithms that provide guarantees under these approximation notions, using dynamic programming and random perturbation of tasks' processing times. We verify the performance of our algorithms through extensive simulations, using a real traffic trace from a large Google cluster.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>I. INTRODUCTION</head><p>Distributed computing platforms, such as MapReduce <ref type="bibr">[1]</ref>, Dryad <ref type="bibr">[2]</ref>, Spark <ref type="bibr">[3]</ref>, etc., have been widely adapted for largescale data processing in cloud and computing clusters. The data set is typically distributed among a set of servers, and processed by executing a job consisting of a set of tasks in servers. The tasks are typically processed in the servers where their input data is stored (a.k.a data locality) <ref type="bibr">[1]</ref>. The collective behavior of tasks is more important than each of the tasks individually, as the job can be completed, or moved to another computation stage, only when all of its tasks finish their processing <ref type="bibr">[1]</ref>- <ref type="bibr">[3]</ref>.</p><p>Jobs from a wide range applications and different users can coexist in the same cluster, and often have diverse tasks and processing requirements. Efficient and fair allocation of the cluster's resources among jobs is crucial to guarantee their timely completions. This has been amplified by the increasing complexity of workloads, i.e., from traditional batch jobs, to queries, graph processing, streaming, machine learning jobs, etc., that all need to share the same cluster, and often have ISBN 978-3-903176-28-7 c 2020 IFIP This research was supported by NSF grants CNS-1717867 and CNS-1652115.</p><p>very different latency and priority requirements. For example, analysis of a Google cluster's trace in <ref type="bibr">[4]</ref> shows a diverse mix of jobs in the same cluster, ranging from latency-tolerant jobs (&#8764; 24%) to latency-sensitive jobs (&#8764; 42%).</p><p>Fair allocation of resources in shared clusters among applications and organizations has been studied in, e.g., <ref type="bibr">[5]</ref>- <ref type="bibr">[7]</ref>, where the cluster's resources are usually divided among different applications through some notion of fairness, e.g. DRF (Dominant Resource Fair) <ref type="bibr">[5]</ref>. The scheduler then manages queues of tasks for applications and schedules their tasks. For example, Hadoop <ref type="bibr">[8]</ref> reserves resources by launching containers or virtual machines in servers. Each container reserves memory and CPU for processing a task at a time. The Hadoop scheduler uses FIFO scheduling or memory-based DRF <ref type="bibr">[9]</ref>. However, these schedulers ignore the completion times of jobs and their latency requirements when allocating resources. Assigning priorities can alleviate this problem, however priorities are typically assigned to applications manually <ref type="bibr">[10]</ref>, and it is not clear how to assign priorities to jobs (and their tasks) dynamically, based on the existing jobs in the cluster and their sensitivities to latency. Further, application priority in Hadoop is supported only for FIFO scheduling <ref type="bibr">[10]</ref>.</p><p>Despite the vast research on scheduling algorithms (see Related Work), theoretical study of fairness with focus on sensitivities of jobs to latency is very limited. Moreover, prior work is mainly based on simple models that assume each job is only one task (ignoring dependency among tasks and their collective impact on the job's completion time), or tasks are processed on any server arbitrarily (ignoring data locality).</p><p>In this paper, we consider a multi-task job scheduling model that captures such features. Each job consists of a set of tasks whose completion time is determined by the completion time of its last task. As in <ref type="bibr">[11]</ref>, <ref type="bibr">[12]</ref>, to capture latencysensitivity, we consider a utility for each job as a function of its completion time. For example, a highly latency-sensitive job can specify a utility function that decays rapidly to zero as its completion time increases. We consider the notion of maxmin fairness which is one of the most widely used resource allocation mechanisms <ref type="bibr">[13]</ref>- <ref type="bibr">[15]</ref>. Our objective is to schedule tasks in a way that achieves max-min fairness among jobs' utilities, i.e., maximize the worst utility across all the jobs, then maximize the second-worst utility without affecting the worst utility, and so on. We refer to this problem as maxmin fair scheduling. Note that this implies that at the optimal solution, we cannot increase the utility of any job without hurting the utility of some job with smaller or equal utility.</p><p>We also would like to mention that the max-min fair scheduling problem for our multi-task job model is of interest from theoretical point of view. As we see later, our model can be reduced to the three scheduling problems considered in the literature to achieve max-min fairness for jobs and coflows 1 considered in <ref type="bibr">[12]</ref>, <ref type="bibr">[17]</ref>, <ref type="bibr">[18]</ref>. Hence, all the three problems are at least as hard as our problem.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Related Work</head><p>There has been much work on fair scheduling in data centers, e.g. <ref type="bibr">[5]</ref>- <ref type="bibr">[7]</ref>, <ref type="bibr">[11]</ref>, <ref type="bibr">[12]</ref>, <ref type="bibr">[17]</ref>, <ref type="bibr">[19]</ref>- <ref type="bibr">[21]</ref>. They mostly consider fair resource allocation to guarantee properties such as sharing-incentive among users of a shared cloud <ref type="bibr">[5]</ref>- <ref type="bibr">[7]</ref>, with little focus on the sensitivity of jobs to their completion times, or consider heuristics for different notions of fairness for maximizing total utility <ref type="bibr">[19]</ref>, meeting deadlines <ref type="bibr">[21]</ref>, or fair resource assignment to each job <ref type="bibr">[20]</ref>. Generating proper utility functions based on jobs' priorities and completion times was studied in <ref type="bibr">[11]</ref>. In <ref type="bibr">[19]</ref>, a Risk-Reward heuristic was presented where scheduling decisions are made based on the cost of reallocating resources and future utility gain. The max-min fairness of job utilities were studied in <ref type="bibr">[12]</ref>, <ref type="bibr">[17]</ref>, however, their models assume each job has only one task and the cloud cluster is one large pool for each resource type. Moreover, in their solution, a job can be allocated different resource types in different unrelated time slots, as opposed to having all its required resources available at the same time. Further, despite their plausible algorithms that try to solve the problem optimally, we show in this paper that the problems are NP-hard in a strong sense.</p><p>Our model is closely related to the concurrent open shop model <ref type="bibr">[22]</ref>- <ref type="bibr">[25]</ref> in scheduling literature. Minimizing the (weighted) average completion time of jobs in this model has been widely studied, with several approximation algorithms in <ref type="bibr">[23]</ref>- <ref type="bibr">[25]</ref>. However, to the best of our knowledge, there is no theoretical result on max-min fairness in this model.</p><p>Max-min fair is one of the most widely used notions of fairness <ref type="bibr">[13]</ref>- <ref type="bibr">[15]</ref>. Moreover, the use of utilities and the network utility maximization for rate allocation in communication networks has been extensively studied (e.g. see <ref type="bibr">[26]</ref> and references therein). However, the results cannot be extended to max-min fair job scheduling in data centers. The max-min fair optimization is not a single-objective optimization, as we aim to optimize a vector of objective functions (utilities) in the sense of max-min fairness. Multi-objective optimization programs have been widely studied and different methods have been developed to solve these problems efficiently in special cases <ref type="bibr">[27]</ref>- <ref type="bibr">[29]</ref>. However, as we show, solving the multiobjective optimization in our setting is a hard problem (NPhard). In <ref type="bibr">[29]</ref>, existence and computation of a set of equivalent weights was studied which enable the conversion of a given multi-objective optimization to a single-objective optimization. We use this method in our paper to study the performance of one of our proposed algorithms. 1 a collection of flows whose completion time is the completion time of the last flow in the collection <ref type="bibr">[16]</ref>.</p><p>We would like to mention that, there exist well-established techniques to estimate tasks' durations to the scheduler, based on the history of prior runs for recurring jobs, using tasks' peak demands, or measuring statistics from the first few tasks in each job, see <ref type="bibr">[30]</ref>, <ref type="bibr">[31]</ref>. Hence, throughout the paper, we assume that tasks' processing times are known.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Main Contributions</head><p>Our main contributions can be summarized as follows:</p><p>&#8226; NP-Hardness of Max-Min Fair Scheduling: We first show that it is NP-hard to optimally solve the max-min fair scheduling problem. We actually prove a stronger complexity result. Given n multi-task jobs in a cluster of machines, it is NP-hard to find a schedule in which even the first O(n ) n number of jobs, for any &gt; 0, conform to their optimal max-min fair solution. Further, we conclude that the scheduling problems considered in <ref type="bibr">[12]</ref>, <ref type="bibr">[17]</ref>, <ref type="bibr">[18]</ref> are NP-hard.</p><p>&#8226; Approximation Algorithms: We define two notions of approximation solutions for this problem: one based on finding a constant number of elements of the max-min fair vector, and the other based on a single-objective optimization whose solution gives the max-min fair vector. We develop scheduling algorithms, using dynamic programming and random perturbation of tasks' processing times, that provide guarantees under both notions of approximation solutions.</p><p>&#8226; Empirical Evaluation: We use a real traffic trace from a large Google cluster to verify that our algorithms in fact perform very well compared to other scheduling policies.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>II. MODEL AND PROBLEM STATEMENT</head><p>Cluster and Job Model: We consider a cluster of m machines, denoted by the set M = {1, ..., m}. Each machine can be thought of as a container or virtual machine <ref type="bibr">[8]</ref> that can process one task at a time. There is a collection of n jobs, denoted by the set N = {1, ..., n}. Each job j &#8712; N consists of up to m different tasks that need to be processed on different machines. Each task requires a specific processing time from its corresponding machine<ref type="foot">foot_1</ref> . Specifically, the task of job j on machine i, denoted by task (i, j), requires a processing time p ij &#8805; 0 from machine i. For each job j, we use M j &#8838; M to denote the subset of machines that contain tasks of job j, i.e., p ij &gt; 0 for each i &#8712; M j . Without loss of generality, we assume processing times of all non-zero tasks are integer numbers and the smallest processing time is at least one. This can be done by defining a proper time unit and representing the tasks' processing times using integer multiples of this unit.</p><p>Tasks are independent of each other in the sense that tasks of the same job can be processed in parallel on their corresponding machines. However, a job is completed only when all of its tasks finish their processing. Define C ij to be the completion time of task (i, j). Then, the completion time of job j, denoted by C j , is given by</p><p>(</p><p>This model is known as the concurrent open shop problem <ref type="bibr">[22]</ref>- <ref type="bibr">[25]</ref> in scheduling literature. The total time that it takes to complete all the jobs in N is called makespan and is denoted by &#964; (N ) . Note that by definition &#964; (N ) = max j&#8712;N C j . It is easy to see that any valid schedule that does not leave a machine idle, unless it has completed all its corresponding tasks, achieves the optimal makespan which is equal to</p><p>Max-Min Fair Objective: As in <ref type="bibr">[11]</ref>, <ref type="bibr">[12]</ref>, we assume each job j specifies a utility U j (C j ), which is a function U j (&#8226;) of its completion time C j , and captures its sensitivity to its completion time. Since each job prefers an earlier completion time, the utility function is assumed to be decreasing (with respect to the completion time). We further assume that the utility function is Lipschitz continuous (i.e., its first derivative is bounded). To define our max-min fairness, we first define the lexicographic order for two given vectors <ref type="bibr">[32]</ref>, as follows.</p><p>be two vectors of length k. Sort elements of X and Y in a non-decreasing order and denote the corresponding vectors by X and &#562; , respectively. We write X Y , and say X is lexicographically greater than Y , if Xi &gt; &#562;i for the first i that Xi and &#562;i differ. Consequently, we write X Y and say vector X is not lexicographically smaller than Y if X = &#562; or X Y .</p><p>Our objective is to schedule jobs (their tasks) in a way that achieves the max-min fairness across the vector of jobs' utilities. In other words, we wish to maximize the worst (minimum) job utility across all the jobs, and then sequentially maximize the next-worst utility without affecting the previousworst utility, and so on. Formally, let C = (C 1 , &#8226; &#8226; &#8226; , C N ) be the vector of completion times of jobs in set N and define</p><p>We seek to schedule jobs in a way that the optimal completion time vector, denoted by C , has the property that the vector U (C ) is lexicographically greater than U (C) for any other valid scheduling of jobs with completion time vector C, i.e., U (C ) U (C). Note that by Definition 1, the sorted optimal vector &#362; (C ) is unique.</p><p>Preemptive vs Non-preemptive Scheduling: The scheduling algorithm could be preemptive or non-preemptive. In a nonpreemptive algorithm, a task cannot be preempted once it starts its processing on its corresponding machine, while in a preemptive algorithm, a task may be preempted and resumed later on the same machine.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>III. LEXICOGRAPHIC MAX-MIN FAIR SCHEDULE AND NP-HARDNESS</head><p>In this section, we first characterize the structure of optimal schedules for max-min fair problem. Then we show a strong result regarding NP-hardness of finding the optimal schedule.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Structure of Optimal Schedule</head><p>In a non-preemptive schedule (Section II), tasks on each machine are processed according to some order. We say a task is at position l, l = 1, &#8226; &#8226; &#8226; , n, on machine i if it is the l-th task that is completed in machine i. Hence, to fully describe a nonpreemptive schedule, it is sufficient to specify a permutation &#960; i for each machine i, i &#8712; M , as formally defined below.</p><p>Definition 2 (Permutation of Tasks on Machine i). Given a set of jobs N = {1, 2, . . . , n} and a valid non-preemptive schedule on machine i, a permutation &#960; i : N &#8594; {1, 2, . . . , n} is a one-to-one mapping of jobs to positions {1, 2, . . . , n} according to which their tasks on machine i are completed.</p><p>Hence &#960; i (j) determines the position of job j's task on machine i. Note that some jobs might not have any tasks on machine i. For these jobs, we consider tasks with zero processing time on machine i. These zero-processing tasks do not contribute to the completion times of jobs and their utilities; nevertheless, including them in Definition 2 will make the future arguments easier. The following theorem characterizes the structure of optimal solution. Theorem 1. Any optimal schedule for max-min fair problem can be converted to another optimal schedule in which all the tasks are scheduled in a non-preemptive fashion, according to the same permutation on all the machines. Proof Overview. Given any optimal schedule, we construct a non-preemptive schedule, with identical permutation for all machines: Starting from the last job (the job with the largest completion time) in the given solution, we move all its tasks to the end of the schedule in their corresponding machines, and sequentially do this for all the jobs. We omit the details.</p><p>Hence, by Theorem 1, in order to find an optimal solution, it is sufficient to only consider non-preemptive schedules with the same permutation of jobs &#960; i = &#960; on all machines i &#8712; M .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. NP-Hardness</head><p>Next, we show that finding an optimal solution to the maxmin fair scheduling is NP-hard. In fact, we prove a stronger complexity result. Before stating the result, we make the following definition.</p><p>Definition 3 (f (n)-max-min fair). Let &#362; (C) denote the sorted utility vector corresponding to completion time vector C. We say a solution</p><p>where C is completion time vector for some optimal solution.</p><p>Consider any increasing function f (n) &#8804; n for which f -1 (n) is bounded by a polynomial in n. We show that it is NP-hard to find a schedule (or equivalently a permutation of jobs by Theorem 1) for which the first f (n) elements of the sorted utility vector matches the first f (n) elements of the sorted max-min fair utility vector. We state the result in the following theorem.</p><p>Theorem 2. Given a set of machines M = {1, ..., m} and a set of jobs N = {1, ..., n}, scheduling jobs to achieve f (n)max-min utility optimal is NP-hard, for any increasing function f (n) for which f -1 (n) is polynomially bounded in n. The result holds even if all the utility functions are the same, i.e., U j (C j ) = U (C j ), &#8704;j &#8712; N .</p><p>For instance, Theorem 2 holds for any sublinear function f (n) = n , for any &#8712; (0, 1], but not for f (n) = log(n).</p><p>In the case of identical utility functions, U j (C j ) = U (C j ), &#8704;j &#8712; N , it is easy to observe that "max-min" fairness among utilities is equivalent to "min-max" among the completion times. In the latter problem, we minimize the largest completion time across the jobs, and then successively minimize the next largest completion time as long as it does not affect the previous largest completion time, and so on. We formally state this fact in the following lemma.</p><p>Lemma 1. In the case that U j (C j ) = U (C j ), &#8704;j &#8712; N , max-min fairness among utilities is equivalent to min-max of completion times.</p><p>Proof. Given that the utility function U (.) is not increasing, the result is immediate.</p><p>Proof of Theorem 2. We prove the theorem for the special case when all jobs' utility functions are the same. This implies NP-hardness of the problem for general cases with any nonincreasing utility functions. To prove this, we use a reduction from the Minimum Vertex Cover Problem which is known to be NP-hard <ref type="bibr">[33]</ref>. An instance I of Minimum Vertex Cover Problem is given by a graph G = (V, E), where goal is to find a minimum cardinality set of vertices W &#8834; V such that each edge e &#8712; E is incident to at least one vertex of W . We use VC(G) to denote the cardinality of W . We map this instance to an instance I of the problem of f (n)-min-max completion times using a polynomial time procedure.</p><p>Instance I has m = |E| + n machines, one for each edge e &#8712; E, plus n extra machines to be specified shortly, and n = |V | + n jobs, one for each vertex v &#8712; V and extra n jobs. Let d v denote the degree of vertex v in G. For each vertex v &#8712; V , we consider a job j(v) consisting of d v tasks (j(v), e), such that p j(v)e = 1 if edge e &#8712; E is incident to v, and 0 otherwise. We refer to these jobs as vertex jobs. The remaining n jobs, each has a unit-sized task on one of the last n machines, such that each of the n machines only has one task to process. We refer to these jobs as dummy jobs. We choose</p><p>and f is an increasing function (and so is f -1 ), therefore, n &#8805; 0. At the end of this construction, each machine has either 1 or 2 tasks to process; hence, all the jobs can be scheduled in two time slots. Consider a schedule with the following properties:</p><p>(1) it finishes all the jobs using two time slots, (2) all the n dummy jobs are completed in the first time slot Note that the set of tasks completed in the second time slot belong to a set of vertex jobs. This set of vertex jobs creates a vertex cover for G, because each of the first |E| machines has to process some task from these jobs in the second time slot.</p><p>Note that by the choice of n ,</p><p>Out of the first f (n) = V jobs in the sorted completion time vector, some jobs have completion time equal to 2 and some jobs have completion time equal to 1. To find the f (n)-minmax vector, we therefore need to minimize the number of jobs completed in the second time slot, which is equivalent to finding the minimum vertex cover of G. Note that the remaining jobs correspond to an independent set in graph G, and hence all their tasks can be scheduled in the first time slot. However, it is NP-hard to find the minimum vertex cover of graph G = (V, E) <ref type="bibr">[33]</ref>.</p><p>As a result of Theorem 2, we can conclude that the maxmin fairness problem for single-task jobs considered in <ref type="bibr">[12]</ref> (see Section I-A for more details) and the max-min fairness scheduling of coflows considered in <ref type="bibr">[18]</ref> are both NP-hard problems, that were not shown before. The proof is based on reduction of our problem to these scheduling problems. The details are omitted due to space constraint.</p><p>Corollary 1. The max-min fair scheduling problems considered in <ref type="bibr">[12]</ref>, <ref type="bibr">[17]</ref>, <ref type="bibr">[18]</ref> are NP-hard.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>IV. DEFINING APPROXIMATION SOLUTIONS</head><p>In single-objective optimization, in case the problem is NPhard, we try to find approximation algorithms, which run in polynomial time, and can return a solution with provable guarantee on its distance from the optimal solution (e.g., approximation ratio) <ref type="bibr">[34]</ref>. However, the optimization problem in our setting is not a single-objective optimization, as we aim to optimize a vector of objective functions in the sense of max-min fairness. Consequently, given that finding the optimal vector solution to our problem is NP-hard (Theorem 2), it is not clear how to define the approximation algorithms in our setting. In this section, we describe two possible definitions for approximation solutions. We focus on the case that all jobs' utility functions are the same, i.e., U j (C j ) = U (C j ), j &#8712; N . Recall that by Lemma 1, this is equivalent to the problem of min-max of completion times, which is still NP-hard by Theorem 2. In Section VI, we discuss possible extensions to unequal utility functions.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. k-min-max fair approximation</head><p>A natural way of extending the idea of approximation ratio is through &#945;n-min-max, for some &#945; &lt; 1, based on f (n) = &#945;n in Definition 3. We can attempt to find an approximate algorithm (schedule) such that the first &#945;n elements of its corresponding sorted completion time vector matches the first &#945;n elements of the sorted min-max vector. However, Theorem 2 implies that even finding such a schedule is NPhard for any constant &#945; &gt; 0. Therefore, we ask for less, and consider finding the first k elements of the sorted optimal vector, for a fixed constant k &lt; n.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Single-objective approximation</head><p>The second approach could be to formulate a singleobjective optimization whose optimal solution coincides with the min-max vector. We can then use this single-objective optimization to measure the quality of an approximation solution to the min-max problem. We describe one such formulation based on an integer program.</p><p>An Equivalent Integer Program (IP). We formulate an Integer Program based on minimization of the total weighted completion times of jobs. In traditional minimization of total weighted completion times <ref type="bibr">[23]</ref>- <ref type="bibr">[25]</ref>, each job j has a positive fixed weight w j and the objective is to minimize j&#8712;N w j C j . The optimization that we consider here is different as the weights of jobs are not fixed in advance and depend on their positions in permutation. Formally, for any position l &#8712; {1, 2, . . . , and any job j &#8712; N , we define a binary variable x lj which is 1 if job j is the l-th job to complete in the schedule, and 0 otherwise. In view of Definition 2, x lj = 1 is equivalent to having &#960;(j) = l, when &#960; i (j) = &#960;(j) for all i &#8712; M . We refer to {x lj } as permutation variables. Each position l &#8712; {1, 2, . . . , n} is assigned a non-negative weight w l . Define C (l) to be the completion time of the l-th job completed in the schedule</p><p>Constraint (4b) is based on the definition of permutation variables and the fact that the completion time of the lth job is greater than completion time of its task on any i. Constraints (4c) and (4d), capture the requirement that each job is assigned to a position, and each position is assigned to a job, respectively. Let C (l) denote the value of completion time of the l-th job in an optimal solution to (IP). Observe that by the minimization objective, for any job there is a machine for which Constraint (4b) turns to equality at the optimal solution. Let i denote the machine for which C (l-1) = l-1 s=1 j&#8712;N p i j x sj . Then, as a result of Constraint (4b) on machine i for the l-th job we have,</p><p>This implies that C (1) &#8804; &#8226; &#8226; &#8226; &#8804; C (n) , i.e. the values of C (l) are consistent with our definition of jobs' positions l = 1, &#8226; &#8226; &#8226; , n. However, since a job l with no task on a machine i is assumed to have a task with zero processing time on that machine, and Constraint (4b) is on all machines i &#8712; M , the completion time of the job may be dominated by one of its zero-processing tasks. This can result in a larger value for C (l) than the actual completion time of the l-th job in the schedule according to <ref type="bibr">(1)</ref>. We need to show that C (l) is indeed the completion time of the l-th job in the schedule. Lemma 2. For any job h and its corresponding position l (i.e., x lh = 1) in an optimal solution to IP (4),</p><p>Therefore, C (l) is indeed the completion time of job h in the schedule corresponding to optimal permutation variables x lj (or its corresponding job permutation &#960; ).</p><p>The proof of Lemma 2 is based on a contradiction argument and optimality of C . We omit the proof due to page limit.</p><p>Next, we show that by an appropriate choice of weights w l , l = 1, 2, . . . , n, we can force the optimal solution to IP (4) to coincide with the optimal min-max vector of completion times. Recall the definition of &#964; (N ) in (2). The following lemma states the result for non-trivial instances of min-max problem. Lemma 3. Let w 0 = (&#964; (N ) ) n and assume that &#964; (N ) &#8805; 2 and n &#8805; 3. The optimal solution to IP ( <ref type="formula">4</ref>) is an optimal solution for min-max problem if we set w l = w l 0 . Proof Overview. Consider an optimal solution C (l) , l = 1, &#8226; &#8226; &#8226; , n, to IP (4), and let C(l) be the completion time of the l-th job in a min-max solution. The proof is by contradiction. Suppose {C (l) } n l=1 is not a min-max optimal solution. Then, it follows that there must exist some position l, 1 &#8804; l &#8804; n, for which the following relation holds,</p><p>We then proceed to show that by the choice of weights as in the lemma's statement, even if the completion time of the l-th job, C (l) is greater than C(l) by only one time unit, we get</p><p>, which contradicts the optimality of {C (l) } n l=1 for IP (4). We omit the details due to page limit.</p><p>Note that the total number of bits required to represent the weights in Lemma 3 is polynomially bounded in the problem input. Specifically, the number of bits required to represent the largest weight w n is O(n 2 log &#964; (N ) ), therefore we need at most O(n 3 log &#964; (N ) ) bits to represent all the weights.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>V. APPROXIMATION ALGORITHMS FOR EQUAL UTILITY FUNCTIONS</head><p>In this section, we consider the case where all jobs' utility functions are the same. Before presenting our scheduling algorithms, we describe a set of permutations that contains an optimal schedule. Recall that for each job j &#8712; N , M j denotes the set of machines for which p ij &gt; 0.</p><p>Lemma 4. Consider the problem of finding the optimal minmax solution of jobs' completion times. For any two jobs h and k, 1) If p i,h &#8804; p i,k , &#8704;i &#8712; M h &#8745; M k , then there is an optimal schedule that job h precedes job k in the permutation. 2) If p i,h = p i,k = p, &#8704;i &#8712; M h &#8745; M k , then there is an optimal schedule that jobs h and k are adjacent in the permutation.</p><p>The proof of Lemma 4 is based on an exchange argument and is omitted due to space constraint. We use Lemma 4 later in this section to augment the solution of an algorithm.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. k-Max-Min Scheduling Algorithm</head><p>We aim to find a k-min-max fair schedule as defined in Section IV-A. This is equivalent finding the last k jobs in the corresponding optimal permutation. Algorithm 1 gives a description of our algorithm. It is based on dynamic programming and starts by finding the last job and moves backward to find the last k jobs in the optimal permutation.</p><p>1.1. compute the busy duration of each machine i &#8712; M , given the job set N as &#964;</p><p>Compute the set of candidate jobs to be the last job to complete as I N = arg min j&#8712;N max i&#8712;M (&#964;</p><p>{j}, and k &#8592; k -1 and denote the output permutation by &#960; j . Assign &#960; j (j) = n for j &#8712; I N . 1.4. Compare the output permutations {&#960; j }, and set &#960; 1 to be the one whose corresponding completion time vector dominates the others in the sense of min-max fairness. 2. Else (k = 0), &#209; = &#8709;, &#960; 1 = &#8709;.</p><p>Let &#960; 1 be the output of Algorithm 1, and &#209; = {j &#8712; N : &#960; 1 (j) = n, &#8226; &#8226; &#8226; , n-k+1}. To schedule remaining jobs, we can compute a random permutation over remaining jobs N \ &#209; , and modify it by exchanging jobs' positions according to Lemma 4 to get a permutation &#960; 2 . We can then use &#960; = [&#960; 2 , &#960; 1 ] to schedule all jobs.</p><p>1) Correctness of Algorithm 1: Consider a machine i. The time that this machine needs to process all its associated tasks is given by &#964; (N ) i as defined in line 1.1. Therefore, there exists a task (i, j) that completes at time &#964; (N ) i . Also, the completion time of the last job in any optimal schedule is equal to &#964;</p><p>, which is the optimal makespan (2). Now the algorithm needs to decide which job should it actually complete last in the schedule. Assume that it chooses j as the last job to complete (equivalently, &#960;(j) = n), then the second-largest completion time across all the jobs will be equal to</p><p>Hence, the algorithm finds the set of jobs I N such that &#964; (N \{j}) is minimized for j &#8712; I N . Note that this is necessary in order to achieve a min-max fair vector. Also, note that the maximization in line 1.2 of the algorithm is over the set M and not M j , for all j &#8712; N , to ensure that position n is assigned to a job with the largest completion time. Applying a similar argument, we conclude that Algorithm 1 correctly finds the last k jobs in the optimal schedule.</p><p>2) Time Complexity of Algorithm 1: Observe that the size of set I N (line 1.2) is at most n. This implies that running time of the algorithm is O(kmn k ) which is polynomial in input size for a fixed value of k. If we set k = n, we need to check all the n! possible permutations to find out the optimal solution. As we can observe from execution of Algorithm 1, the reason that we need to consider all possibilities for the optimal permutation of jobs (that can blow to n!) is that size of candidate set I N is generally greater than one. Hence, the Algorithm requires to check which candidate job it should choose for each position. In the case that there is a unique candidate job at each iteration, the optimal permutation can be computed in O(mn 2 + mn log(p)) time, where p is the maximum task processing time.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Perturbation-Based Scheduling Algorithm</head><p>Algorithm 2 Perturbation-Based Algorithm 1. Choose a constant &gt; 0. 2. For every job j &#8712; N , draw a number j randomly from interval [0, ]. Then update its tasks' processing times p ij &#8592; p ij + j . 3. For l = n to 1, compute the busy duration of each machine i &#8712; M corresponding to set N , as in line 1.1 of Algorithm 1. 4. Let I N = arg min j&#8712;N max i&#8712;M (&#964;</p><p>go to line 2. Else, set the l-th position in the permutation to be the unique job j &#8712; I N , i.e., &#960;(j ) = l, and update N &#8592; N \ {j }. 6. Schedule jobs (with the original processing times) according to the obtained permutation &#960;.</p><p>Algorithm 2 gives a description of our perturbation-based algorithm to schedule multi-task jobs so as to approximate the min-max completion time vector, in the single-objective approximation sense (Section IV-B). At a high level, given an instance of the problem, we perturb the tasks' processing times with a small random noise. This is an attempt to ensure in execution of Algorithm 1, the number of candidate jobs calculated in line 2 reduces to 1 with high probability. For each job j, we draw a noise j uniformly at random from interval [0, ]. Define p ij = p ij + j to be the processing times in the perturbed instance. Similar to Algorithm 1, for the perturbed instance, we compute the optimal permutation starting from the last position n. The perturbation noises in practice are not real numbers, hence, the probability that the set of candidate jobs for the l-th position, l = 1, . . . , n, contains more than one job is small but not zero. To resolve possible collisions in a candidate set, we have lines 5 in Algorithm 2.</p><p>1) Evaluation of Algorithm 2: Consider an instance of our problem. Let &#960; denote the permutation of jobs computed by Algorithm 2. We use optimal objective value of IP (4) to measure the distance of the computed solution by Algorithm 2 to the optimal solution. Theorem 3. Let &#960; be the permutation of jobs computed by Algorithm 2 and C denote the objective value of IP (4) according to this permutation. Also let OPT be the objective value of IP for an optimal min-max fair schedule. Then, C &#8804; OPT + g( ), where g( ) is a strictly decreasing function in , and g( ) &#8594; 0 as &#8594; 0.</p><p>We refer to the instance before applying perturbation as original instance. Recall that optimal solution of IP ( <ref type="formula">4</ref>) is equivalent to the optimal max-min solution for the original instance; therefore, difference of the two objective values C and OPT, denoted by g( ) is a sound metric to evaluate the quality of permutation &#960; computed by Algorithm 2 for the original instance. Moreover, note that we can choose any by considering sufficiently large number of bits to represent the perturbation noise which incurs greater complexity. This issue is addressed in Subsection V-B2.</p><p>Proof Overview. The permutation &#960; computed by Algorithm 2 is optimal for the perturbed instance. Therefore, by Lemma 3, &#960; yields to the smallest objective value, OPT, for IP (4) (when equipped with weights that correspond to the perturbed instance). Next, we apply the optimal permutation of the original instance, &#960; , on the perturbed instance and use C to denote its IP's value. We find the relationship between OPT and C, by comparing their values with OPT and C. It follows that g( ) = (n 2 + 1) n l=1 lw l + 2 f ( ), for a polynomial function f . We omit the details due to space constraint.</p><p>2) Time Complexity of Algorithm 2: Let b denote the number of bits used to represent the perturbation noises. The probability of having more than one job in set I N in the first iteration is less than n 2 &#215; 2 -b by the union bound. Therefore, the probability of not encountering any collision in I N is at least 1 -2 -(b+1) n 2 . Choosing b = 3 &#215; log(n), the average number of times we should execute the algorithm to pass the first iteration successfully is less than 2n 2n-1 &#8804; 2. Applying the same argument, the average number of times needed to successfully complete all the iterations is polynomial in the input size. Therefore, Algorithm 2, on average, has polynomial time complexity in the input size of the original instance (i.e., O(mn 2 +mn log(p))). In simulations for Google trace (Section VII), the algorithm always found each position successfully in one try.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>VI. GENERAL UTILITY FUNCTIONS</head><p>The main obstacle in extending the results in Section IV and V to unequal utility functions is that the jobs' positions in the optimal permutation, based on jobs' completion times, may not be the same as the jobs' positions according to jobs' utilities. Algorithm 1 used the fact that for any set of jobs N , there exists a job that completes at the optimal makespan &#964; (N ) (Equation ( <ref type="formula">2</ref>)). This gives the min-max of completion times and also helps us decide which job to schedule last. However, in the case of unequal utility functions, the job that is scheduled last with the largest completion time may not be the job with the worst utility. Therefore, Algorithm 1 cannot be generalized to find the last jobs with the worst utilities in the case of general utility functions.</p><p>Nevertheless, we present a generalization of the perturbation-based algorithm (Algorithm 2) to unequal utility functions. Since utility functions are assumed to be Lipschitz continuous (bounded first derivative), we can choose the noise parameter small enough such that job utilities do not change dramatically after perturbing task processing times. The algorithm is essentially the same as Algorithm 2, except that we do not update processing times in line 2, and instead in line 4, the set of candidate jobs is computed as</p><p>Note that the positions of jobs in the obtained permutation &#960; by this algorithm, is neither the same as the positions based on the sorted completion time vector (Definition 2), nor the same as the positions based on the sorted utility vector. Nevertheless, we can use this permutation &#960; to schedule jobs. We evaluate the performance of this algorithm empirically in simulations.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>VII. SIMULATION RESULTS</head><p>In this section, we evaluate the performance of our algorithms using a real traffic trace from a large Google cluster <ref type="bibr">[35]</ref>. The original trace is based on &#8764;11000 servers over a month long period. In our experiments, we filter jobs and consider a set of jobs with at most 200 number of tasks which are about 99% of all the jobs in the production class. Also, in order to have reasonable traffic density on each machine (since otherwise the problem is trivial), we consider a cluster with 200 machines and randomly map machines of the original set to machines of this set. In simulations, we choose parameter in Algorithm 2 and its generalized version to be 10 -4 times the smallest task processing time in the data set. For brevity, in Figures, we refer to both Algorithm 2 and its generalized version as PBA (Perturbation-Based Algorithm).</p><p>We evaluate the performance of our algorithms in two cases:</p><p>&#8226; Equal Utility Functions: When all the jobs have the same utility function, lexicographic max-min of utilities is equivalent to lexicographic min-max of completion times (by Lemma 1). We compare Algorithm 2 (PBA) with First-In First-Out (FIFO), and Shortest Processing Time First (SPTF). In FIFO, we list jobs based to their arrival times and schedule tasks on each machine according to this list.</p><p>In SPTF, we list tasks on each machine in non-increasing order of their processing times, and schedule tasks starting from the first task in this list. General Utility Functions: We consider linear utility functions for jobs with different slopes that capture the priority information which is available for each job in the data set.</p><p>In this case, we compare the performance of generalized Algorithm 2 as described in Section VI (PBA), First-In Completion Time (second)     First-Out (FIFO), and Largest Utility First (LUF). In LUF, we consider a utility for each task, using the utility function of its corresponding job. Then on each machine at any time, we list tasks according to their utility values, and schedule the task that gives the largest utility upon completion, then move to the next task, and so on.</p><p>We examine algorithms by looking at Cumulative Distribution Function (CDF) for job completion times and utilities, in online and offline setting, with equal and unequal utility functions. In addition, we report 3 performance metrics:</p><p>&#8226; Average: the average of completion times of jobs (in the case of equal utility functions), or the average of their utilities (in the case of unequal utility functions). &#8226; 4th Quartile-Average: the average of the worst 25% of completion times or utilities among jobs. This metric indicates how much each algorithm starves long or low-utility jobs compared to the average. &#8226; Deviation: the standard deviation of the job completion times (or their utilities) from the average, which is a metric of overall fairness to all jobs</p><p>In the case of equal utility functions, we report the results for job completion times, hence, smaller average and smaller 4th quartile-average are preferable. In the case of general utilities, we report the results for job utility values, hence in this case, larger average and larger 4th quartile-average are preferable. Moreover, in both cases, smaller deviation value for an algorithm shows that it has a better overall fairness.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Offline Setting</head><p>We first present the results in the offline setting.</p><p>1) Equal Utility Functions: Figure <ref type="figure">1a</ref> depicts the empirical CDF of PBA, SPTF, and FIFO. Furthermore, Figure <ref type="figure">1b</ref> shows the three aforementioned performance metrics (Average, 4th Quartile-Average, and Deviation) for job completion times. Not only our algorithm is better in terms of fairness, as shown by its deviation which is 0.65 of deviation of the other algorithms, and does not starve long jobs compared to other algorithms, but interestingly it also improves the average job completion time by a factor of almost 1.7 and 3, compared to SPTF and FIFO, respectively.</p><p>2) General Utility Functions: In the data set, each jobs has a priority that roughly represents how sensitive it is to latency. There are 9 different values of job priorities. For job j, we consider the utility function U j (t) = P j &#215; (&#964; -t), where &#964; is the makespan of completing all the jobs (a constant just to ensure utilities are positive) and P j is the priority of job j.</p><p>Figure <ref type="figure">2a</ref> shows the empirical CDF of PBA, LUF, and FIFO, and Figure <ref type="figure">2b</ref> shows the average, 4th quartile-average, and deviation of jobs' obtained utilities. The worst utility among all the jobs under PBA is 9.5 and 6.9 times greater than the worst utility under LUF and FIFO, respectively. Note that, the CDF plot of PBA is sharper around its average value. PBA reduces deviation in obtained utilities, compared to LUF and FIFO, by a factor of 1.6 and 1.4, respectively, while it achieves almost the same average utility as LUF.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Online Setting</head><p>In the online setting, jobs arrive according to the arrival times information in the data set. Upon arrival of a job, SPTF updates its list and proceeds with the new list. However, it does not preempt an ongoing task in a machine. Similar to SPTF, LUF updates its list upon arrival of a job and proceeds with the new list in a non-preemptive fashion.</p><p>To extend our algorithm to online setting, we choose a parameter &#948; that is tunable. We divide time into time intervals of length &#948; time-units. At the beginning of each interval, we run the offline algorithm on the set of jobs consisting of jobs that are not scheduled yet and those that arrived in the previous interval. Further, tasks on the boundary of intervals are processed non-preemptively, i.e., if some task is running in some machine according to the previously computed schedule, we let it finish and then proceed with the new schedule. It is preferred to start with a smaller value of &#948; at the beginning, to avoid delaying the initial jobs in the system for &#948; amount of time before starting scheduling them. Therefore, we use an adaptive choice of &#948; to improve the performance of our online algorithm. We choose the length of the i-th interval, &#948; i , as &#948; i = &#948; 0 /(1 + &#945; &#215; exp(-&#946;i)), i = 1, 2, &#8226; &#8226; &#8226; We choose &#948; 0 = 3.3 &#215; 10 5 seconds, and &#945; = 50 and &#946; = 3. All the jobs arrive over a time horizon of 3.3 &#215; 10 6 seconds.</p><p>1) Equal Utility Functions: Figure <ref type="figure">3a</ref> and 3b show the performance of PBA, SPTF, and FIFO in the online setting. We present the results in terms of job delay, which is the time between a job arrival and its completion time. PBA improves the average job delay by a factor of 1.7 and 3.3, compared to SPTF and FIFO. It also achieves better fairness by a factor  Fig. <ref type="figure">4</ref>: Job utilities under PBA, LUF, and FIFO, in the online setting. Higher averages and lower deviation is better.</p><p>1.9 and 1.7 compared to SPTF and FIFO for the 4th quartileaverage.</p><p>2) General Utility Functions: In the online setting, variable t used in the job utility function is measured from arrival of job j to the system. Figure <ref type="figure">4a</ref> shows the empirical CDF of PBA, SPTF, and FIFO. Further, Figure <ref type="figure">4b</ref> shows the average and deviation of jobs' obtained utilities. The smallest utility value among all the jobs under PBA is 1.9 and 14.6 times greater than the smallest utility value of jobs under FIFO and LUF, respectively. PBA also improves utility deviation compared to LUF and FIFO by a factor of 1.8 and 1.3, respectively.</p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_0"><p>Authorized licensed use limited to: Columbia University Libraries. Downloaded on June 11,2021 at 18:40:37 UTC from IEEE Xplore. Restrictions apply.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="2" xml:id="foot_1"><p>In the case that a job has multiple tasks on a specific machine, we can view them as a single task with processing time equal to the cumulative original tasks' processing times.</p></note>
		</body>
		</text>
</TEI>
