Simple Algorithms for Scheduling Monotonic Moldable Tasks

Patrick Loiseau, Xiaohu Wu

Introduction

In the realm of large-scale parallel computing, such as supercomputer clusters and cloud environments, efficient task scheduling is paramount. This paper addresses the scheduling of "moldable" tasks—jobs where the scheduler determines the number of processors ($p$) assigned to a task before it begins. Once assigned, this processor count remains fixed throughout the task's execution.

Historically, the goal has been to minimize the makespan, or the total time required to complete a set of tasks. For decades, theoretical models for moldable tasks have been constrained by a "1.5-approximation barrier." This meant that even the best algorithms could only guarantee a schedule within 50% of the theoretical optimum. This gap persisted largely because previous models were overly general, failing to account for the specific ways real-world parallel applications scale.

Historical progression of approximation ratios for moldable task scheduling, highlighting the long-standing 1.5 barrier.

The $(\delta, k)$-Monotonic Speedup Model

The authors break through this barrier by introducing the $(\delta_j, k_j)$-monotonic speedup model. This model is grounded in empirical observations of industry-standard benchmarks like the NAS Parallel Benchmarks and HPLinpack. It categorizes task behavior into three distinct phases:

  1. Linear Phase: For a processor count $p \leq \delta_j$, the task exhibits linear speedup. Doubling the processors halves the execution time, and the total workload (area) remains constant.
  2. Sublinear Phase: For $\delta_j < p \leq k_j$, the task is monotonic. While adding processors still reduces execution time, the total workload increases due to communication overhead.
  3. Parallelism Bound: $k_j$ represents the maximum number of processors a task can effectively utilize.

By exploiting the linear phase—a common feature in physical systems—the scheduler gains the flexibility to adjust processor assignments without increasing the total resource "area" occupied by the task.

Methodology: The Sched(d) Algorithm

The core contribution is the Sched(d) algorithm, which utilizes a "dual approximation" technique. Rather than minimizing makespan directly, the algorithm solves a decision problem: given a deadline $d$, can we pack all tasks into the schedule? A binary search on $d$ then identifies the optimal makespan.

Tasks are partitioned into three groups based on their minimum processor requirements to meet the deadline $d$:

  • Group $A'$: Tasks requiring a high number of processors.
  • Group $A''$: Tasks that can be completed very efficiently if assigned a specific threshold of processors.
  • Group $A_h$: Intermediate tasks.

The algorithm ensures that at any given time, the system maintains a minimum processor utilization $\theta(\delta)$. The authors prove that maintaining a utilization of $\theta$ directly translates to a $1/\theta$ approximation ratio for the makespan.

Key Results and Performance

The algorithm achieves a $\frac{1}{\theta(\delta)}(1+\epsilon)$-approximation ratio. As the linear speedup threshold $\delta$ increases, the performance improves significantly, far surpassing the previous 1.5 limit.

For typical large-scale system parameters, the results are striking:

  • With a threshold of $\delta = 25$, the approximation ratio is approximately 1.2 (20% overhead).
  • With a threshold of $\delta = 150$, the ratio drops to 1.077 (less than 8% overhead).

Furthermore, the algorithm is computationally efficient, with a complexity of $O(n \log m)$, where $n$ is the number of tasks and $m$ is the number of processors. This makes it highly suitable for real-time scheduling in massive data centers.

Conclusion and Future Work

By refining the mathematical model to include a linear speedup phase, the authors have provided a practical and high-performance framework for parallel job scheduling. While the current work assumes independent tasks and a large-scale environment ($m \gg k$), it sets the stage for future research into complex task graphs with precedence constraints and smaller-scale cluster optimizations.

Summary updated

BibTeX
@article{loiseau2023simple,
  author = {Patrick Loiseau and Xiaohu Wu},
  title = {{Simple Algorithms for Scheduling Monotonic Moldable Tasks}},
  journal = {Eur. J. Oper. Res.},
  year = {2023},
  doi = {10.1016/j.ejor.2023.02.044},
}
Figure