Bag-of-Tasks Scheduling on Related Machines

Anupam Gupta, Amit Kumar, Sahil Singla

Abstract

This paper investigates the online scheduling of "bag-of-tasks" jobs on related machines in a non-clairvoyant setting. In this model, each job consists of multiple independent tasks that can be executed in parallel, and the job is considered complete only when its final task finishes. We address the challenges posed by varying machine speeds and unknown task sizes. We establish a lower bound of $\Omega(K)$ for any non-clairvoyant algorithm, where $K$ represents the number of distinct machine speeds. Furthermore, we present a novel water-filling algorithm that achieves a competitive ratio of $O(K^3 \log^2 K)$, providing a performance guarantee that is independent of the total number of jobs.

Introduction

Scheduling to minimize weighted completion time is a fundamental problem in combinatorial optimization. While traditional models often treat jobs as monolithic entities, modern parallel computing environments—such as those utilizing multi-threaded processes or distributed microservices—frequently employ a "bag-of-tasks" model. In this framework, a single job is composed of several independent tasks that can run concurrently. The completion time of the job is defined by the completion of its last constituent task.

The complexity of this problem increases significantly when moving from identical machines to "related machines," where different processors have different speeds (e.g., a heterogeneous cluster of CPUs and GPUs). The challenge is further compounded in "non-clairvoyant" settings, where the scheduler has no prior knowledge of a task's processing requirements until the task actually terminates. This paper provides the first theoretical bounds for this specific combination of constraints.

The Scheduling Challenge

In a non-clairvoyant environment with related machines, a primary risk is the inefficient allocation of high-speed resources. Without knowing task sizes, a scheduler might inadvertently assign a very small task to the fastest available machine, while a much larger task is relegated to a slower machine. In the identical machine case, this is less problematic because all resources are interchangeable. However, with related machines, such "clogging" can lead to significant delays in job completion.

The authors demonstrate that this difficulty is intrinsic to the problem by proving a lower bound of $\Omega(K)$. This suggests that the performance of any online algorithm must scale at least linearly with the variety of hardware speeds available in the system.

The Water-Filling Algorithm

To address these challenges, the authors propose a strategy that shifts the focus from explicit task-to-machine mapping to the assignment of processing rates. At any time $t$, the algorithm determines a feasible rate at which each "alive" task should be processed.

The core of the approach is a greedy water-filling strategy:

  1. Priority Assignment: Each active task is assigned a priority based on the weight of its parent job divided by the number of its remaining unfinished tasks.
  2. Rate Increment: The algorithm conceptually increases a global parameter, which in turn raises the tentative processing rates of tasks according to their priorities.
  3. Capacity Constraints: As the total assigned rate for a group of tasks reaches the physical capacity of the fastest available machines, those rates are "frozen."
  4. Feasibility: Using Hall’s Marriage Theorem, the authors prove that these fractional rates can always be translated into a valid physical schedule on the related machines.

Analysis via Block Partitioning

The theoretical performance of the algorithm is analyzed using a dual-fitting technique on a Linear Programming (LP) relaxation. Standard dual-fitting approaches for scheduling often result in competitive ratios that depend on the total number of jobs ($n$), typically $O(\log n)$.

To achieve a bound independent of $n$, the authors introduce a novel block partitioning technique. They categorize machines into "blocks" based on their average speeds and total processing capacities (e.g., simple, long, short, or cheap blocks). This allows the analysis to account for the weight of jobs processed across different hardware tiers more precisely. By decoupling the performance bound from the total job count and tying it to the number of speed classes ($K$), the authors provide a more robust guarantee for large-scale systems where $K \ll \log n$.

Results and Conclusion

The paper establishes two major theoretical results:

  • Lower Bound: No online non-clairvoyant algorithm can achieve a competitive ratio better than $\Omega(K)$.
  • Upper Bound: The proposed water-filling algorithm achieves a competitive ratio of $O(\min\{K^3 \log^2 K, K + \log n\})$.

While this represents a significant advancement in scheduling theory, several avenues for future research remain. There is a notable gap between the $\Omega(K)$ lower bound and the $O(K^3 \log^2 K)$ upper bound. Additionally, extending these results to minimize weighted flow-time or to handle "unrelated machines" (where machine performance depends on the specific task type) remains an open challenge. Nonetheless, this work provides a critical framework for managing heterogeneous computing resources in the face of uncertainty.

Summary updated

BibTeX
@inproceedings{gupta2021bag,
  author = {Anupam Gupta and Amit Kumar and Sahil Singla},
  title = {{Bag-of-Tasks Scheduling on Related Machines}},
  booktitle = {APPROX-RANDOM},
  year = {2021},
  doi = {10.4230/lipics.approx/random.2021.3},
}
Figure