Scheduling for Multi-Phase Parallelizable Jobs

Rahul Vaze

In the world of large-scale data centers, scheduling is the invisible hand that keeps everything moving. But modern workloads aren't simple; a single job (like a MapReduce task) might start as a highly parallelizable "elastic" process and end as a strictly sequential "in-elastic" one. How do you schedule these "multi-phase" jobs to minimize the total time they spend in the system (flow time) without knowing exactly how much work is left in each phase?

A new paper by Rahul Vaze from the Tata Institute of Fundamental Research tackles this head-on, providing a theoretical breakthrough that moves past long-standing limitations in scheduling theory.

TL;DR

The paper introduces FRACTIONAL-LCFS, a new scheduling algorithm for jobs that migrate between parallelizable and sequential phases. It proves, for the first time, that a constant competitive ratio is achievable for this problem without needing "speed augmentation" (extra server resources), a major theoretical hurdle in previous research.

What Problem Does This Paper Address?

The core challenge is minimizing total flow time—the sum of the time elapsed between a job's arrival and its completion. In a multi-server environment, jobs have different "parallelizability." * Elastic Phase: A job can be split across $k$ servers, gaining a sub-linear speedup (modeled as $k^{1/\alpha}$ where $\alpha > 1$). * In-elastic Phase: A job is strictly sequential and can only use one server at a maximum speed of 1.

Most existing "non-clairvoyant" algorithms (those that don't know the remaining work of a job) struggle here. Previous proofs of performance often relied on speed augmentation, a theoretical "cheat" where the online algorithm is given more servers than the optimal offline baseline to prove it can stay competitive. Without this, competitive ratios often scaled poorly with the number of jobs ($n$).

Methods

The author proposes two main algorithms based on a "semi non-clairvoyant" approach—the scheduler knows which phase a job is currently in, but not how much work remains.

  1. FRACTIONAL-LCFS (Online): This is a variant of Last-Come-First-Served. It only processes a specific fraction ($\beta$) of the most recently arrived jobs. Within those jobs, it assigns equal speeds to those in the same phase. This "fractional" approach prevents the system from being bogged down by a few massive jobs that arrived early.
  2. PA-EQUI (All jobs available at $t=0$): A "Phase-Aware" version of the EQUI algorithm. It treats the servers as a single resource block that can be partitioned. If enough jobs are in the sequential phase, it prioritizes them; otherwise, it distributes power among the elastic jobs.

The paper uses the Potential Function Method to mathematically prove that these algorithms stay within a constant factor of the "God-like" offline optimal algorithm (OPT) that knows everything in advance.

Datasets

The paper evaluates the algorithms using average-case simulations.

  • Synthetic Workloads: Job arrivals are Poisson distributed.
  • Real-world Context: The number of phases per job is Poisson distributed with a mean of 7, a value chosen based on real-world MapReduce datasets cited in the literature.
  • Job Sizes: Phase sizes are exponentially distributed.

Key Insights and Ideas

  • LCFS as a Proxy for SRPT: Shortest Remaining Processing Time (SRPT) is the gold standard for minimizing flow time but requires knowing job sizes. By prioritizing the most recent arrivals, FRACTIONAL-LCFS effectively prioritizes shorter jobs on average, mimicking SRPT's benefits without needing its "clairvoyance."
  • The Power of $\alpha > 1$: The "concave" nature of the speedup function ($\alpha > 1$) is critical. It means that as you add more servers to a single job, you get diminishing returns. The algorithm exploits this by spreading servers across multiple jobs to improve overall system utilization.
  • Constant Competitive Ratio without "Cheating": The biggest "aha" moment is proving a constant competitive ratio (independent of the number of jobs or their sizes) without requiring the online algorithm to have more servers than the offline optimal.

Key Results

  • Theoretical Guarantee: For any speedup exponent $\alpha > 1$, FRACTIONAL-LCFS has a constant competitive ratio. For $\alpha = 2$, the paper derives a bound of 636. While numerically high, the fact that it is a constant (it doesn't grow as you add more jobs) is the primary theoretical contribution.
  • Improved Static Performance: For the simpler case where all jobs are available at the start, the competitive ratio for PA-EQUI drops significantly to approximately 16.67 (for $\alpha=2$).
  • Simulation Performance: In tests, FRACTIONAL-LCFS performed comparably to or better than "Inelastic-First" strategies and significantly outperformed standard Phase-Aware First-Come-First-Served (PA-FCFS) by a factor of 2 to 3.

Limitations and Future Work

  • The $\alpha = 1$ Boundary: The results do not provide a meaningful bound for "fully parallelizable" jobs ($\alpha = 1$). In that specific case, a lower bound of $n^{1/3}$ is already known to exist for any deterministic algorithm.
  • High Constants: While the competitive ratio is "constant," the value (636) is quite large. The author notes that this is a worst-case theoretical bound and that numerical optimization of the algorithm's parameters ($\beta, \theta$) can yield much better practical performance.
  • Future Directions: A promising next step would be analytically optimizing these parameters to bring the theoretical constant closer to the performance seen in simulations.

Reference: Vaze, R. (2022). Scheduling for Multi-Phase Parallelizable Jobs. arXiv:2205.00518v1 [cs.DS].

Summary updated

BibTeX
@inproceedings{vaze2022scheduling,
  author = {Rahul Vaze},
  title = {{Scheduling for Multi-Phase Parallelizable Jobs}},
  booktitle = {WiOpt},
  year = {2022},
  url = {https://openreview.net/forum?id=J1UCHEj8rL},
}

Loading related content...

Figure