A Performance Study of Workfile Disk Management for Concurrent Mergesorts in a Multiprocessor Database System

Kun-Lung Wu, Philip S. Yu, Jen-Yao Chung, James Z. Teng

Introduction

In high-performance database systems, sorting large datasets often requires "external mergesorts" that utilize temporary disk space, known as workfiles. When multiple sorting tasks run concurrently on a multiprocessor system, they compete for these shared disk resources. This 1995 study from IBM Research investigates the optimal strategies for allocating these workfile disks to balance system load while minimizing I/O interference.

The Problem: I/O Interference in Mergesorts

The core challenge identified is the bottleneck during the merge phase. A mergesort consists of two phases: generating sorted "runs" and then merging them. During the merge, the system performs many small, synchronous read requests to fetch data from runs while simultaneously issuing large, sequential write requests for the output.

System architecture for concurrent mergesorts with shared workfile disks.

In a shared-disk environment, as illustrated in the system architecture above, a massive write operation from one job can "choke" the critical read operations of another job sharing the same disk. This interference leads to significant performance degradation that standard priority-based scheduling cannot easily resolve due to limited buffer space.

Methodology

The researchers used a discrete event-driven simulator to model a system with 4 CPUs and a variable number of workfile disks (D). They compared two main strategies:

  1. Logical Partitioning: Dividing the disk pool into P groups. P=1 represents a single shared pool (maximum sharing), while P=4 divides disks into four isolated groups (maximum isolation).
  2. Data Striping: Spreading individual runs across multiple disks to parallelize I/O.

The simulation factored in realistic parameters such as 40 MIPS CPUs, 16ms average disk seek times, and complex buffer management policies like LRU chains and deferred write queues.

Key Results and Performance Trade-offs

The study reveals a fundamental trade-off between load balancing and I/O interference. While a single large pool (P=1) provides the best load balancing by spreading tasks across all available disks, it suffers most from inter-job interference under heavy load.

Average response time vs. total number of workfile disks for different partitioning strategies.

As shown in the performance graph above, the optimal strategy depends heavily on the total number of disks available:

  • Disk-Abundant Scenarios: When the number of disks is high (e.g., D=24), the "roominess" of the system naturally reduces the chance of interference, making the single-pool approach (P=1) most efficient due to superior load balancing.
  • Disk-Limited Scenarios: In systems with fewer disks (e.g., D=8), partitioning the disks (P=4) significantly reduces response times by isolating jobs and preventing one job's heavy writes from stalling another's reads. Interestingly, dynamic assignment to partitions outperforms fixed assignment.

Furthermore, the study found that data striping is only effective if the striping unit is large enough (16–32 pages). Small striping units increase disk seek overhead, which can drive utilization to unsustainable levels and skyrocket response times.

Conclusion

The research suggests that there is no universal "best" disk allocation strategy. Instead, performance is highly sensitive to the workload and hardware configuration. An ideal database system should likely employ an adaptive strategy: utilizing a single shared pool during periods of low activity to maximize load balancing, and automatically transitioning to partitioned disk groups as the workload increases to mitigate I/O interference.

Summary updated

BibTeX
@inproceedings{wu1995performance,
  author = {Kun-Lung Wu and Philip S. Yu and Jen-Yao Chung and James Z. Teng},
  title = {{A Performance Study of Workfile Disk Management for Concurrent Mergesorts in a Multiprocessor Database System}},
  booktitle = {VLDB},
  year = {1995},
}
Figure