Introduction
In the mid-1990s, the rapid growth of scientific data—particularly from earth observation systems—began to outpace the storage capacity of traditional magnetic disks. This shift necessitated the use of "tertiary memory" (TM), which consists of massive libraries of tapes or optical disks managed by robotic arms. However, traditional Database Management Systems (DBMS) were designed with the assumption of magnetic disk characteristics: relatively uniform access times and low seek overhead. This paper introduces a specialized query processing architecture designed to handle the unique physical constraints of tertiary memory, achieving significant performance gains by moving away from disk-centric assumptions.
The Tertiary Memory Challenge
Tertiary memory presents a starkly different performance profile compared to magnetic disks. In a TM system, a single "platter" switch—the process of unloading one tape or disk and loading another—can take minutes. Furthermore, seeking on a tape is orders of magnitude slower than on a disk.
When a standard DBMS treats TM as a simple, slow disk or a transparent file system, it often falls into "thrashing," characterized by constant, expensive media swaps and random seeks. To be efficient, the authors argue that the DBMS must have direct, "white-box" control over the robotic hardware and the specific order of data retrieval.
Proposed Architecture and Methods
The authors propose a two-phase execution model implemented as an extension to the POSTGRES database. This system treats data as a collection of "fragments" and utilizes a global scheduler that understands the physical state of the storage hardware.
1. Query Optimization via Fragments
Instead of treating a relation as a single monolithic entity, the system divides it into fragments—contiguous chunks of data residing on a single physical platter. Queries, such as joins, are decomposed into multiple subqueries that operate specifically on these fragments.
2. The Global Scheduler
The "brain" of the system is the Global Scheduler. Unlike standard schedulers that process queries in the order they arrive, this scheduler examines the entire pool of pending subqueries alongside the current hardware state (e.g., which tape is currently loaded and the position of the read head). By batching subqueries from different users that require the same platter, the system eliminates hours of mechanical overhead.
3. Advanced Caching and Fetching
The system employs sophisticated policies to manage the cache effectively:
- Policy-2: A heuristic that prioritizes fetching fragments that join with data already residing in the cache. It uses a "Cache Pressure" metric—calculated as $(a+b)/C$, where $a$ is active data, $b$ is data needed for future joins, and $C$ is cache size—to determine when the cost of a platter switch is justified.
- LEAST-WORK Eviction: Moving beyond simple LRU (Least Recently Used) logic, this policy evicts fragments that have the fewest remaining pending queries, ensuring that data with high immediate utility stays in the cache.
Evaluation and Results
The researchers evaluated the system using simulations of four hardware profiles (Sony optical jukebox, Exabyte, Metrum, and Sony DMS tape libraries) and the Sequoia 2000 GIS benchmark.
- Massive Time Savings: On the Sequoia benchmark, the architecture reduced platter switches from 2,333 to just 533. In a tape system where each switch takes approximately 1.6 minutes, this resulted in a reduction of 50 hours of I/O time.
- Throughput Gains: Compared to the original POSTGRES architecture, the new system demonstrated a 4x speedup with a 32MB cache and a 6.4x speedup with a 64MB cache.
- Efficiency: The proposed heuristics frequently achieved results within a few percentage points of the theoretical maximum possible improvement.
Conclusion and Future Work
By exposing the physical layout of data to the query optimizer and using hardware-aware scheduling, the authors demonstrated that tertiary memory can be integrated into a DBMS without the catastrophic performance degradation seen in traditional models. Future work remains to address the complexities of multi-way joins, queries requiring specific result ordering, and the potential for logical fragmentation to better match evolving query workloads.
Summary updated