Minimizing flow time on unrelated machines Nikhil Bansal Janardhan Kulkarni (MSR Redmond) 1 Flow time Classic single machine setting Jobs: size ππ , release time ππ Flow time: ππ = πΆπ β ππ (completion time β release time) time Flow time of green job Objective: Minimize total flow time (SRPT is optimal) Minimize max. flow time (FIFO is optimal) 2 Total Flow time Optimum algorithm: Shortest Remaining Processing Time Work on the job with least remaining processing. Useful fact: Total flow time = π ππ = π‘π π‘ (n(t) = number of unfinished jobs at time t.) Proof: Suppose each job pays $1 at each time step it is alive. Job jβs payment = ππ So, total payment = π ππ Total payment at time t = n(t) So, total payment = π‘π π‘ 3 Multiple machines Machines 1,β¦m Jobs 1,β¦,n πππ : Size of job j on machine i Identical machines Related machines: speed π π , πππ = ππ /π π Restricted assignment: πππ β ππ , β β¦ Unrelated: πππ arbitrary No Migration: Job must be processed on a single machine 4 What is known? Identical : O(log P) [Leonardi and Razβ96] + follow ups Ξ©(log P) hardness [Garg-Kumar 06] (P: max/min job size) O(log P) for related and restricted case [2005-2008] (clever, LP based techniques) Unrelated case: O(k) if k distinct πππ values [Garg-Kumar 08, Sitters 08] Perhaps round to powers of 2 (or 1 + π) ? Flow time is very sensitive to sizes (never mess with them) Case 1: A Job of size 1, released at t=0,1,2,β¦,n Case 2: A job of size 1.1, released at t=0,1,2,β¦,n O(n) total flow Ξ© π2 total flow 5 Another Instructive example n Instance: m=2 machines. All job sizes = 1. 2n jobs released t = 0. Two jobs each at t = n, n+1, β¦, T If imbalance in blue jobs (e.g. random assignment) π imbalance -> Ξ© π approximation (OPT β 2T, Alg β π T) 6 Our Result Thm: An O(log π log π) approx. for total flow on unrelated machines Remark: Can be made O(log 2 π) Thm: An O(log n) approx. for maximum flow on unrelated machines Previously: (1 + π, π(1/π)) approximation [Garg et al 2013] Technique: Iterated Rounding 7 Outline β’ Introduction β’ Iterated Rounding (Lenstra, Shmoys, Tardos: makespan on unrelated machines) Note: Same as max-flow time if all release times = 0 β’ Total flow time 8 Iterated Rounding LP max cx Ax β€ b 0β€xβ€1 n variables m non-trivial constraints Obs: There is an optimum solution with β₯ n-m 0-1 variables. Vertex: determined by solution of n (tight) linearly independent constraints 9 Iterated Rounding LP max cx Ax β€ b 0β€xβ€1 n > m variables (say m = n-1) π₯1 , β¦ , π₯π Key point: If drop another constraint, get another integral variable Note: objective can only go up during the iterations Hope: Dropping a constraint does not mess up things much 10 Iterated Rounding Very powerful Karmarkar Karpβ82 (bin packing) Jainβ98 (survivable network design) Singh Lauβ06 (deg bdd spanning trees) β¦ Refined variant (can βcontrol errorβ on dropped constraints) Bansalβ10, Lovett-Mekaβ12 (via discrepancy theory) Rothvossβ13 (bin packing) Bansal et alβ14 (broadcast scheduling) 11 Makespan Minimization Example 12 Makespan on Unrelated Machines Target T: Want to assign jobs so that max load <= T Machines (i) Jobs (j) Thm (Lenstra, Shmoys, Tardosβ90): 2-approximation (in fact T + pmax ) Preprocess: πππ β€ T (if πππ > T, set πππ = β) LP: π πππ π₯ππ π π₯ππ =1 β€π for each machine i = 1,β¦,m for each job j = 1,β¦,n (n+m) non-trivial constraints (plus constraints π₯ππ β₯ 0) 13 Makespan on Unrelated Machines LP: π πππ π₯ππ β€π for each machine i = 1,β¦,m π π₯ππ =1 for each job j = 1,β¦,n (n+m) non-trivial constraints (plus constraints π₯ππ β₯ 0) Machines (i) 0.4 0.6 1 Jobs (j) Fix π₯ππ if 0 or 1 Fractional: 0 < π₯ππ < 1 Claim: There is some machine i with 1) At most one fractional π₯ππ assigned to it. 2) At most two fractional π₯ππ and π₯ππβ² , with π₯ππ + π₯ππβ² β₯ 1 Suffices: Load increase β€ π 1 β π₯ππ + π 1 β π₯ππ β² β€ π. 14 Makespan on Unrelated Machines LP: π πππ π₯ππ π π₯ππ =1 β€π for each i = 1,β¦,m for each j = 1,β¦,n (plus constraints π₯ππ β₯ 0) Claim: There is some machine i with 1) At most one fractional π₯ππ assigned to it. 2) At most two fractional π₯ππ and π₯ππβ² , with π₯ππ + π₯ππβ² β₯ 1 # non-zero variables β€ n+m Let b := non-integral jobs (either π₯ππ = 1 or 0 < π₯ππ < 1) 2b β€ # frac. variables β€ π + π β π β π β€ π + π If b<m If b=m. (β€ 2m-1 frac. vars: so some machine <=1 variable) (2m frac. vars, m jobs, each machines has 2 variables) QED. 15 Extending to Max flow time Instance 2 T Instance 1 Instructive example: Several Makespan instances released over time 16 Trouble for max flow time Instance 2 Instance 1 πmax β π Error can build up An (1 + π, π(1/π)) approximation [Garg et al 2013] 17 Outline β’ Introduction β’ Iterated Rounding (Lenstra, Shmoys, Tardos: makespan on unrelated machines) β’ Total flow time 18 Previous Approaches Time-indexed LP formulation π₯πππ‘ : How much of job j scheduled on machine i at time t All the constraints: (No overload) (each job scheduled) π π₯πππ‘ β€1 π(( π‘ π₯πππ‘ )/πππ ) β₯ 1 for all (i,t) for all j Some objective for βfractionalβ flow time. (note: LP can put a job on many machines, and schedule the pieces in parallel) 19 Main Idea Reduce splitting at expense of βlocal overloadingβ ( π π₯πππ‘ β€ 1) Want 1 piece per job (i.e. π₯πππ‘ = πππ ) Bounded overload: For any interval X of time (s,t) Total work assigned to X β€ (t-s) + B. Pseudo-schedule -> Schedule: FIFO, no job delayed more than B. 20 Overview Replace ππ‘ π₯πππ‘ β€ 1 by βLoad β€ π΅ for every intervalβ At least half of the jobs assigned integrally Repeat for O(log n) iterations. Overload in any interval = O(B log n) 21 Pseudo-schedule B/2 B/2 B/2 Form intervals of size B/2. Require β€B/2 work assigned to each interval. How small can we choose B? Seems like >= P (need to place big job somewhere) But, this can mess up small jobs (E.g. B jobs of size 1 arrive at once vs. one job at t=0,1β¦B-1) Have different scales: Different bounds for each size class. Large jobs can tolerate larger B (do SRPT instead of FIFO) 22 LP for pseudo-schedule Fix machine i Say job j has class k on machine i if πππ β 2πβ1 , 2π For k=1,2,β¦,log P consider intervals of size 10 β 2π LP: For each interval X of class k, Total work of classβ€k jobs in X β€ 10 β 2π . Class 3 β¦ Class 2 Class 1 β¦ 23 The key counting lemma Number of constraints for class k. mT/(10) 2π interval constraints n jobs (class <= k) (T: time horizon) On the other hand, n β₯ mT/2π # non-zero vars. β€ 1.1 n (n job constraints + n/10 interval constraints) 2f + (n-f) β€ # non-zero vars. β€1.1 n f β€ 0.1 n (a constant fraction of jobs assigned integrally) 24 Finishing off Fix integral jobs, redefine intervals, repeat After O(log n) iterations all jobs assigned integrally For any interval X = (s,t) Total work of class <= k jobs assigned to X β€ |X| + O(log n β 2π ) Implies β O(log n) additional jobs pending per class Total cost β€ OPT + O(log n log P) (mT) QED 25 Concluding Remarks Similar ideas give O(log n) for max flow on unrelated machines Gaps: Total flow π log π log π vs Ξ© log π Max flow π log π vs Ξ© 1 Iterated rounding: simple yet very powerful 26 Thanks for your attention! 27
© Copyright 2026 Paperzz