Papers
Topics
Authors
Recent
Search
2000 character limit reached

Optimizing Datalog for the GPU

Published 3 Nov 2023 in cs.DB and cs.PL | (2311.02206v5)

Abstract: Modern Datalog engines (e.g., LogicBlox, Souffl\'e, ddlog) enable their users to write declarative queries which compute recursive deductions over extensional facts, leaving high-performance operationalization (query planning, semi-na\"ive evaluation, and parallelization) to the engine. Such engines form the backbone of modern high-throughput applications in static analysis, network monitoring, and social-media mining. In this paper, we present a methodology for implementing a modern in-memory Datalog engine on data center GPUs, allowing us to achieve significant (up to 45x) gains compared to Souffl\'e (a modern CPU-based engine) on context-sensitive points-to analysis of httpd. We present GPUlog, a Datalog engine backend that implements iterated relational algebra kernels over a novel range-indexed data structure we call the hash-indexed sorted array (HISA). HISA combines the algorithmic benefits of incremental range-indexed relations with the raw computation throughput of operations over dense data structures. Our experiments show that GPUlog is significantly faster than CPU-based Datalog engines while achieving a favorable memory footprint compared to contemporary GPU-based joins.

Summary

  • The paper introduces GDlog, a novel GPU-based Datalog engine that leverages a Hash-Indexed Sorted Array for efficient parallel deductive analytics.
  • It employs innovative join processing and lock-free deduplication techniques to achieve 5-10x speedups over state-of-the-art CPU-based engines.
  • Evaluation on multiple data center GPUs confirms robust performance and scalability, paving the way for enhanced program analysis and real-time data processing.

Modern Datalog on the GPU

Introduction

The paper "Modern Datalog on the GPU" introduces GDlog, an innovative Datalog engine designed to leverage the computational power of GPUs for high-performance deductive analytics. Datalog is a declarative logic programming language, prominent in applications such as static program analysis, network monitoring, and business analytics due to its support for recursive queries. Existing CPU-based Datalog engines often face scalability challenges, primarily due to limited memory bandwidth and synchronization overhead in shared-memory environments. GDlog addresses these limitations by harnessing the parallel processing capabilities of GPUs.

Methodology

The paper presents an implementation of a modern in-memory Datalog engine on data center GPUs, achieving significant performance improvements. GDlog employs a SIMD API for iterated relational algebra kernels over a novel data structure called the Hash-Indexed Sorted Array (HISA). HISA combines the efficiency of range-indexed joins with dense data structure operations, enabling fast parallel computation. The introduction of HISA is a critical development, as it supports lock-free deduplication and efficient parallel insertion, essential for optimizing Datalog evaluation on GPU architectures.

Evaluation

The evaluation demonstrates GDlog's competitive performance across various data center GPUs, including H100, A100, MI250, and MI50. GDlog consistently outperforms existing CPU and GPU-based systems, achieving speedups of 5 to 10 times over Soufflé, a state-of-the-art CPU-based Datalog engine, particularly in tasks such as context-sensitive points-to analysis. GDlog's implementation handles join planning through Soufflé output translation, ensuring robust range execution.

The paper's experimental results highlight substantial improvements in runtime and memory footprint. For instance, cuDF and GPUJoin encounter out-of-memory errors on multiple datasets, while GDlog executes efficiently across all test cases. This capability is largely attributed to GDlog's focus on minimizing memory usage and maximizing computational throughput.

Contributions

Key contributions of the paper include the following:

  1. Hash-Indexed Sorted Array (HISA): A novel data structure that optimizes range queries and minimizes memory footprint, specifically designed for GPU architectures.
  2. GDlog Library: A CUDA-based library facilitating high-throughput deductive analytics on GPUs, leveraging HISA for tuple representation.
  3. Optimization Techniques: Novel strategies for join processing, including eager buffer management and temporarily-materialized k-ary joins, significantly reducing execution time.

Implications and Future Work

The development of GDlog has practical implications for various domains, notably in program analysis, graph mining, and business intelligence, where high-volume data processing is crucial. The performance gains achieved by GDlog suggest that GPUs can play a transformative role in advancing computational capabilities for Datalog applications.

The paper sets the stage for future research into extending GDlog's capabilities, including support for multi-GPU environments, which could further enhance scalability for large-scale analytics tasks. Additionally, expanding the system to handle incremental computations over data streams could unlock new opportunities in real-time data analysis.

Conclusion

"Modern Datalog on the GPU" represents a significant advancement in the field of high-performance computing for logic programming. By effectively utilizing GPU architectures, GDlog not only addresses the limitations of existing CPU-based engines but also sets a new benchmark for performance, paving the way for more efficient and scalable data-intensive applications.

Paper to Video (Beta)

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 19 tweets with 117 likes about this paper.

HackerNews

  1. GDlog: A GPU-accelerated deductive engine (126 points, 13 comments)