[Tech Insight] Smarter Schedulers: High-Precision Online Runtime Prediction for Distributed Iterative Jobs

Online Runtime Prediction Method for Distributed Iterative Jobs

2021-01-01
Xiaofei Yue, Lan Shi, Yuhai Zhao, Hangxu Ji, Guoren Wang
Summary
Problem
Method
Results
Takeaways
Abstract

The paper introduces a generalized online runtime prediction method for distributed iterative jobs, specifically targeting platforms like Apache Flink. It combines a scale function for iteration estimation, an online polynomial regression for metric prediction, and an online LSTM to capture temporal dependencies between iterations, achieving SOTA accuracy.

TL;DR

Predicting how long an iterative job (like PageRank or K-Means) will run in a distributed cluster is notoriously difficult. This paper presents an online machine learning framework that predicts runtime iteration-by-iteration. By combining polynomial regression for resource metrics and LSTMs for sequence analysis, it outperforms previous state-of-the-art methods by up to 15% in complex scenarios.

The "Moving Target" Problem in Iterative Computing

In modern data centers, meeting Service Level Objectives (SLO) is critical. However, distributed iterative jobs are "moving targets":

  1. Iterative Uncertainty: Most algorithms run until a convergence threshold is met, making the number of iterations variable.
  2. Environmental Noise: CPU, Memory, and IO performance fluctuate based on other tenants in the cluster.
  3. Delta Dependencies: In "delta" iterations (like those in Flink), the workload of the current step is tightly coupled with the results of the previous one.

Existing static or offline models fail because they don't see what's happening inside the execution loop.

Methodology: A Three-Phase Online Approach

The authors break down the problem into three logical layers, moving from coarse-grained estimation to fine-grained sequence prediction.

1. Estimating the Horizon (Iteration Count)

Before predicting how long each step takes, we need to know how many steps there are. The authors use Biased Random Jump (BRJ) sampling. By running the job on a subset of the data and applying a "Scale Function" to the convergence threshold, they can accurately estimate the total iteration count for the full dataset.

2. Phase One: Predicting the "Vitals" (Resource Metrics)

Instead of predicting time directly, the model first predicts fine-grained resource metrics (e.g., uTime, rsSize, ioWait) for the upcoming iteration. They use an Online Quadratic Polynomial Regression (QPR) model. Why QPR? It captures the non-linear interactions between pre-runtime features (like dataset size) and runtime fluctuations.

3. Phase Two: The LSTM Sequencer

This is where the temporal logic comes in. Since iterations in a job are logically connected, the authors use a Long Short-Term Memory (LSTM) network.

Overall Architecture

The LSTM takes the predicted resource metrics as a sequence and outputs the predicted runtime for the next iteration step. The model uses a sliding window (optimized at 5% of the total iteration count) to keep the prediction relevant to the current execution phase.

Experimental Results: Precision Matters

The method was tested on a 7-node OMNISKY cluster running Apache Flink with benchmarks like PageRank, Connected Components (CC), and K-Means.

Performance Gains

The results demonstrate a clear advantage for online learning. As shown in the comparison table below, as the model "sees" more data (), the error drops significantly.

Performance Comparison Table

  • Bulk Iterations: Accuracy improved by 4.79% over the Two-stage baseline.
  • Delta Iterations: This is the real winner, with a massive 15% accuracy boost. Delta jobs are more dynamic, and the online LSTM's ability to adapt to changing sequences is what makes the difference.

Error Trends

The error is typically higher at the start (Relative Iteration Progress = 25%) because the model has limited execution history to learn from. However, it stabilizes rapidly as the job progresses.

Prediction Error for Delta Jobs

Critical Analysis & Takeaways

The brilliance of this work lies in its hybrid nature. It doesn't treat runtime as a single number; it treats it as a result of resource consumption patterns and temporal dependencies.

Strengths:

  • Generality: The method is pluggable into any resource management system (like YARN or Kubernetes) that provides container-level monitoring.
  • Adaptability: Online learning allows the model to "self-correct" if the cluster suddenly becomes congested.

Limitations:

  • Sampling Overhead: The initial BRJ sampling phase adds a small computational cost before the main job.
  • Cold Start: Prediction accuracy in the first 25% of the job remains a challenge.

Future Outlook: This framework paves the way for "Autonomic Scheduling," where the system could proactively move tasks or scale resources mid-execution because it knows exactly when the job is likely to finish.

Find Similar Papers

Try Our Examples

  • Search for recent studies that utilize Online Machine Learning specifically for optimizing Apache Flink or Spark job scheduling based on real-time execution metrics.
  • What are the original theoretical foundations of Biased Random Jump (BRJ) sampling in graph analytics, and how does this paper adapt it for convergence estimation?
  • Explore how LSTM-based sequence prediction can be applied to non-iterative distributed DAG execution for batch processing runtime estimation.
Contents
[Tech Insight] Smarter Schedulers: High-Precision Online Runtime Prediction for Distributed Iterative Jobs
1. TL;DR
2. The "Moving Target" Problem in Iterative Computing
3. Methodology: A Three-Phase Online Approach
3.1. 1. Estimating the Horizon (Iteration Count)
3.2. 2. Phase One: Predicting the "Vitals" (Resource Metrics)
3.3. 3. Phase Two: The LSTM Sequencer
4. Experimental Results: Precision Matters
4.1. Performance Gains
4.2. Error Trends
5. Critical Analysis & Takeaways