High-throughput transaction executions on graphics processors

Bingsheng He, Jeffrey Xu Yu

Introduction

Graphics Processing Units (GPUs) have traditionally been optimized for throughput-oriented, data-parallel tasks such as graphics rendering and large-scale matrix computations. These workloads typically follow a Single Instruction, Multiple Data (SIMD) pattern, where the same operation is applied to millions of data points. In contrast, On-Line Transaction Processing (OLTP)—the backbone of banking, e-commerce, and stock trading—is characterized by thousands of small, diverse tasks that perform random reads and updates.

Adapting OLTP to GPU architectures presents two primary challenges: concurrency control and architectural mismatch. Managing thousands of locks across massive parallelism often leads to deadlocks or performance degradation, while the inherent variety in transaction types causes "branch divergence," leaving the GPU's cores underutilized. This paper introduces GPUTx, a high-throughput OLTP engine designed specifically to bridge the gap between transactional requirements and GPU hardware capabilities.

The Bulk Execution Model

To address the mismatch between individual transactions and GPU parallelism, GPUTx utilizes a Bulk Execution Model. Rather than processing transactions as they arrive in an ad-hoc fashion, GPUTx collects thousands of transactions into a "bulk." This bulk is then analyzed for dependencies and executed as a single, massive GPU kernel.

By grouping transactions, GPUTx can amortize the overhead of kernel launches and data transfers. Furthermore, it allows the system to reorganize the workload to better suit the GPU's execution model, specifically by grouping transactions of the same type together. This ensures that threads within a GPU "warp" follow the same code paths, significantly reducing branch divergence and boosting instruction throughput.

Concurrency Control: The T-Dependency Graph

Maintaining ACID (Atomicity, Consistency, Isolation, Durability) properties in a massively parallel environment is the most significant hurdle for GPU-based OLTP. GPUTx introduces the T-dependency graph to manage these constraints deterministically.

In this model, the system constructs a Directed Acyclic Graph (DAG) where each node represents a transaction within the bulk. An edge is drawn between two transactions if they conflict (i.e., they access the same data) and one has an earlier timestamp. From this graph, GPUTx identifies "k-sets"—subsets of transactions that are guaranteed to be conflict-free. Because transactions within a k-set do not share data dependencies, they can be executed in parallel without risk of inconsistency.

To ensure the graph construction itself does not become a bottleneck, GPUTx utilizes GPU-based primitives such as radix sort and prefix sums. This allows the dependency analysis to be performed in parallel on the GPU rather than relying on a slower CPU-side pre-processor.

Execution Strategies

GPUTx implements and evaluates three distinct strategies for executing transaction bulks:

  1. Two-Phase Locking (TPL): This strategy uses hardware-supported atomic operations to implement fine-grained locks. To prevent deadlocks—a common issue given the "black box" nature of GPU thread scheduling—GPUTx employs a deterministic, counter-based locking mechanism. Threads only proceed when the lock's internal counter matches their pre-assigned rank.
  2. Partition-Based (PART): Drawing inspiration from the H-Store model, this strategy partitions the database and assigns a single GPU thread to handle all transactions for a specific partition. This eliminates the need for locks for single-partition transactions, though it requires careful data distribution.
  3. K-SET: This iterative approach identifies all transactions with no incoming edges in the dependency graph (the "0-set"), executes them in parallel, and then removes them from the graph to reveal the next set of independent transactions.

Experimental results indicate that K-SET and PART generally outperform TPL, as the overhead of managing thousands of fine-grained locks on a GPU is exceptionally high.

Performance Evaluation

The authors evaluated GPUTx using industry-standard benchmarks, including TM1 (telecom), TPC-B (banking), and TPC-C (retail). The results demonstrate the significant potential of GPU-accelerated databases:

  • Throughput: GPUTx achieved 4–10x higher throughput than a quad-core CPU implementation across the TPC and TM1 benchmarks.
  • Bulk Efficiency: The bulk execution model proved essential, improving throughput by 16–146x compared to executing transactions one-at-a-time on the same GPU hardware.
  • Cost-Efficiency: When accounting for hardware costs, GPUTx provided a 2x to 5x improvement in throughput-per-dollar compared to traditional CPU-based systems.

Limitations and Future Directions

While GPUTx demonstrates the viability of GPUs for OLTP, several constraints remain. Currently, the system only supports pre-defined stored procedures and cannot handle ad-hoc SQL queries. Additionally, the entire database must fit within the GPU's onboard memory (VRAM), which is significantly more limited than system RAM. Finally, workloads that are inherently sequential—where every transaction depends on the result of the previous one—cannot benefit from the GPU's parallelism and may perform better on high-clock-speed CPUs.

Future research directions include the development of hybrid CPU-GPU execution schemes and the implementation of demand-paging systems to handle databases that exceed VRAM capacity.

Summary updated

BibTeX
@article{he2011high,
  author = {Bingsheng He and Jeffrey Xu Yu},
  title = {{High-throughput transaction executions on graphics processors}},
  journal = {Proc. VLDB Endow.},
  year = {2011},
  doi = {10.14778/1952376.1952381},
}
Figure