Table of Contents
Fetching ...

Column-Oriented Datalog on the GPU

Yihao Sun, Sidharth Kumar, Thomas Gilray, Kristopher Micinski

TL;DR

This work argues that column-oriented storage, implemented via the Decomposed Storage Model (DSM), is particularly well-suited to modern GPUs for Datalog workloads. It introduces FVlog, a CUDA-based GPU Datalog runtime with a columnar, DSM-backed data layout and GPU-tuned relational algebra kernels, including a two-phase join and GPU-friendly deduplication. The evaluation shows FVlog achieving over 200x speedups versus CPU-based column engines and around 2.5x improvements over prior GPU prototypes, with even larger gains on knowledge-reasoning tasks up to ~300x. The results highlight the importance of data locality, memory bandwidth, and lock-free parallelism for scalable Datalog on GPUs, and point to future cluster-based extensions for distributed settings.

Abstract

Datalog is a logic programming language widely used in knowledge representation and reasoning (KRR), program analysis, and social media mining due to its expressiveness and high performance. Traditionally, Datalog engines use either row-oriented or column-oriented storage. Engines like VLog and Nemo favor column-oriented storage for efficiency on limited-resource machines, while row-oriented engines like Souffle use advanced data structures with locking to perform better on multi-core CPUs. The advent of modern datacenter GPUs, such as the NVIDIA H100 with its ability to run over 16k threads simultaneously and high memory bandwidth, has reopened the debate on which storage layout is more effective. This paper presents the first column-oriented Datalog engines tailored to the strengths of modern GPUs. We present VFLog, a CUDA-based Datalog runtime library with a column-oriented GPU datastructure that supports all necessary relational algebra operations. Our results demonstrate over 200x performance gains over SOTA CPU-based column-oriented Datalog engines and a 2.5x speedup over GPU Datalog engines in various workloads, including KRR.

Column-Oriented Datalog on the GPU

TL;DR

This work argues that column-oriented storage, implemented via the Decomposed Storage Model (DSM), is particularly well-suited to modern GPUs for Datalog workloads. It introduces FVlog, a CUDA-based GPU Datalog runtime with a columnar, DSM-backed data layout and GPU-tuned relational algebra kernels, including a two-phase join and GPU-friendly deduplication. The evaluation shows FVlog achieving over 200x speedups versus CPU-based column engines and around 2.5x improvements over prior GPU prototypes, with even larger gains on knowledge-reasoning tasks up to ~300x. The results highlight the importance of data locality, memory bandwidth, and lock-free parallelism for scalable Datalog on GPUs, and point to future cluster-based extensions for distributed settings.

Abstract

Datalog is a logic programming language widely used in knowledge representation and reasoning (KRR), program analysis, and social media mining due to its expressiveness and high performance. Traditionally, Datalog engines use either row-oriented or column-oriented storage. Engines like VLog and Nemo favor column-oriented storage for efficiency on limited-resource machines, while row-oriented engines like Souffle use advanced data structures with locking to perform better on multi-core CPUs. The advent of modern datacenter GPUs, such as the NVIDIA H100 with its ability to run over 16k threads simultaneously and high memory bandwidth, has reopened the debate on which storage layout is more effective. This paper presents the first column-oriented Datalog engines tailored to the strengths of modern GPUs. We present VFLog, a CUDA-based Datalog runtime library with a column-oriented GPU datastructure that supports all necessary relational algebra operations. Our results demonstrate over 200x performance gains over SOTA CPU-based column-oriented Datalog engines and a 2.5x speedup over GPU Datalog engines in various workloads, including KRR.
Paper Structure (14 sections, 10 equations, 3 figures, 3 tables, 2 algorithms)

This paper contains 14 sections, 10 equations, 3 figures, 3 tables, 2 algorithms.

Figures (3)

  • Figure 1: Converting Edge relation from NSM to DSM.
  • Figure 2: Reach stored in column-oriented layout on GPU.
  • Figure 3: Example of $\textit{Reach} \bowtie_{y} \textit{Edge}$ paralleled on GPU.