An Exact Algorithm for the Linear Tape Scheduling Problem

Valentin Honoré, Bertrand Simon, Frédéric Suter

Abstract

This paper presents the first polynomial-time exact algorithm for the Linear Tape Scheduling Problem (LTSP), refuting previous conjectures that the problem was NP-hard. By leveraging a dynamic programming approach that accounts for physical U-turn penalties and the geometric "laminar" property of optimal paths, the authors provide a method to significantly reduce average wait times in massive tape-based storage systems. Evaluation on a new real-world dataset from the IN2P3 Computing Center demonstrates that the proposed algorithm and its logarithmic heuristic variant (LOGDP) outperform existing greedy methods, particularly as mechanical overhead increases.

Introduction

While magnetic tapes are often viewed as legacy technology, they remain the backbone of "cold" storage for large-scale scientific endeavors like CERN. Tapes offer massive capacity at a fraction of the cost of hard drives, but they suffer from significant latency. A tape is a kilometer-long ribbon; moving the reading head between files involves physical mechanical movement that can take several minutes.

The core challenge is request scheduling: given a set of requests for different files on a single tape, in what order should they be read to minimize the average wait time for users? This is the Linear Tape Scheduling Problem (LTSP). Historically, researchers believed finding the optimal order was NP-hard, leading the industry to rely on greedy heuristics that often yield suboptimal results.

A visualization of a reading head trajectory over time as it services multiple file requests on a tape.

The Geometry of Optimal Paths

The primary breakthrough of this research is the proof that LTSP is solvable in polynomial time. This shift was made possible by a key structural insight: in an optimal schedule, the movements of the reading head follow a strictly laminar pattern.

In this context, "laminar" means that if the head makes a detour to retrieve a file, that detour is either completely contained within another detour or entirely separate. They never partially overlap in a complex "zig-zag" fashion. This geometric property allows the problem to be decomposed into smaller sub-problems, making a Dynamic Programming (DP) approach feasible.

The nested (laminar) structure of detours in an optimal schedule, where detours are either disjoint or strictly contained within one another.

Methods: DP and LOGDP

The authors introduced an exact DP algorithm that formalizes the laminar property into a table, computing the optimal strategy in $O(n_{req}^3 \cdot n)$ time, where $n_{req}$ is the number of unique files and $n$ is the total number of requests.

Crucially, the model incorporates U-turn penalties ($U$). Unlike previous theoretical models that assumed instantaneous direction changes, this algorithm accounts for the mechanical reality of the tape drive slowing down, stopping, and accelerating in the opposite direction.

To address scenarios with very large request batches where the full DP might be computationally expensive, the authors proposed LOGDP. This heuristic restricts the search space for detours to a logarithmic range, drastically reducing computation time while maintaining results within a few percentage points of the absolute optimal.

Real-World Evaluation

The algorithms were evaluated using a new, publicly released dataset from the IN2P3 Computing Center in France. The dataset contains logs from 169 tapes, covering nearly 120,000 file requests over two weeks of activity. This represents the first realistic benchmark for tape scheduling based on actual access patterns rather than synthetic simulations.

Key Results

  • Optimality and Robustness: The DP algorithm consistently found the best possible schedule. As U-turn penalties increased, simple greedy heuristics (like FGS and NFGS) fell apart, while the DP and LOGDP algorithms remained robust by explicitly factoring in the cost of changing direction.
  • Efficiency: The LOGDP(5) variant proved to be an excellent trade-off, achieving results near the optimal solution with a median computation time of 47 seconds, compared to 281 seconds for the full DP.
  • Performance Gains: Existing state-of-the-art heuristics were shown to cause 5% to 10% more overhead than the proposed LOGDP variant. In a production environment where a full tape scan takes 500 seconds, a 5% saving in average service time translates to significant cumulative hours saved across thousands of users.

Conclusion and Future Work

By refuting the NP-hardness of the LTSP, this work shifts the focus of the field from approximation to exact optimization. While the current model assumes a linear tape, modern tapes are "serpentine," featuring dozens of parallel tracks. The authors suggest that future work should extend this DP framework to handle 2D serpentine geometry and "online" scenarios where new requests arrive while the tape is already in operation.

Summary updated

BibTeX
@inproceedings{honore2022exact,
  author = {Valentin Honoré and Bertrand Simon and Frédéric Suter},
  title = {{An Exact Algorithm for the Linear Tape Scheduling Problem}},
  booktitle = {ICAPS},
  year = {2022},
}
Figure