NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

On Affinity Based Routing in Multi-System Data Sharing

Philip S. Yu, Douglas W. Cornell, Daniel M. Dias, Balakrishna R. Iyer

Abstract

This paper presents an affinity-based routing scheme designed for multi-processor database systems to mitigate inter-system interference in shared-data environments. By grouping transactions based on their data access patterns and routing similar transactions to the same system, the proposed method significantly reduces global lock contention and buffer invalidations. Experimental results using real-world database traces demonstrate that affinity routing enables higher throughput and lower latency compared to random routing strategies.

Introduction

In the mid-1980s, the increasing demand for transaction processing capacity led to the development of multi-system architectures where multiple processors share a common database on disk. While this "data sharing" approach offers scalability, it introduces significant overhead due to inter-system interference. Specifically, when one system updates a record used by another, expensive global locking and buffer invalidations occur. If System A updates a data block, any cached copies in System B's memory are rendered invalid, necessitating a slow disk re-read. This paper addresses these performance bottlenecks by introducing a routing strategy that maximizes data locality without creating computational imbalances.

Methodology

The authors employed a multi-stage methodology to evaluate the proposed routing scheme:

  1. Affinity Grouping via ILP: Integer Linear Programming (ILP) was used to partition transaction types into groups. The objective function minimized a "penalty" representing cross-system database accesses while maintaining a balanced computational load across nodes.
  2. Trace-Driven Simulation: Simulations were conducted using real-world database traces to capture authentic timing for lock requests and data access patterns.
  3. Hierarchical Modeling: Simulation results were integrated with analytical queueing models to predict performance across various hardware configurations, such as varying processor speeds.
  4. Protocol Optimization: The study explored "hash class retentiveness," where a system retains interest in a group of locks to anticipate subsequent transactions of the same type.

Data and Workloads

The study utilized two high-volume workloads traced from IBM IMS (Information Management System) customers:

  • Workload 1: A parts database system on an IBM 3081K, involving 158 physical databases.
  • Workload 2: An online planning database system on an IBM 3033, involving 103 physical databases.

Core Concepts

The fundamental insight is that transaction routing should be data-aware. By converting global lock contentions into local ones through affinity routing, the system avoids the high latency of cross-node coordination. Furthermore, routing mitigates the "buffer ping-pong" effect, where systems repeatedly invalidate each other's caches. This keeps related data "warm" in local buffers. Notably, affinity routing also enhances the effectiveness of optimistic concurrency control by reducing the frequency of transaction restarts caused by conflicts.

Performance Evaluation

The implementation of affinity routing yielded substantial improvements across both workloads:

  • Lock Contention: Global contention decreased by over 90% for Workload 1 and 75% for Workload 2 compared to random routing.
  • Buffer Invalidations: As illustrated in Figure 1, database buffer invalidations were significantly curtailed. In a 3-system configuration with a 2MB buffer, invalidations dropped from approximately 0.09 to 0.03 per transaction.
Figure 1: Reduction in database buffer invalidations per transaction as a function of buffer size.
  • I/O Efficiency: Reduced invalidations led to fewer disk reads. Figure 2 shows that for a 2MB buffer, routing saved roughly 0.25 disk reads per transaction.
Figure 2: Impact of transaction routing on database disk reads per transaction.
  • Response Time: Overall transaction response times improved, particularly under high-load conditions where contention typically bottlenecks performance.

Conclusion

While the findings are based on specific IBM IMS workloads, the underlying principles of data locality are broadly applicable. The current routing scheme is static, assuming prior knowledge of transaction types. Future research could investigate dynamic routing mechanisms that adapt to real-time workload shifts. Despite its 1980s origins, the concept of affinity-based routing remains critical for modern distributed databases and microservices architectures, where minimizing cross-node communication is paramount for scalability.

Summary updated

BibTeX
@inproceedings{yu1986affinity,
  author = {Philip S. Yu and Douglas W. Cornell and Daniel M. Dias and Balakrishna R. Iyer},
  title = {{On Affinity Based Routing in Multi-System Data Sharing}},
  booktitle = {VLDB},
  year = {1986},
}
Figure