Skip to main content
QUICK REVIEW

[Paper Review] Scaling-Up In-Memory Datalog Processing: Observations and Techniques

Zhiwei Fan, Jian-Qiao Zhu|arXiv (Cornell University)|Dec 10, 2018
Graph Theory and AlgorithmsComputer Science19 references7 citations
TL;DR

This paper presents RecStep, a high-performance, in-memory, parallel Datalog engine built on top of a relational database management system (RDBMS), demonstrating that efficient Datalog processing is feasible using a relational backend. By applying targeted optimizations in query compilation and RDBMS interaction, RecStep achieves 4–6× speedup over state-of-the-art engines on complex graph analytics and program analysis workloads, challenging prior assumptions that RDBMS backends are unsuitable for scalable Datalog processing.

ABSTRACT

Recursive query processing has experienced a recent resurgence, as a result of its use in many modern application domains, including data integration, graph analytics, security, program analysis, networking and decision making. Due to the large volumes of data being processed, several research efforts, across multiple communities, have explored how to scale up recursive queries, typically expressed in Datalog. Our experience with these tools indicated that their performance does not translate across domains (e.g., a tool design for large-scale graph analytics does not exhibit the same performance on program-analysis tasks, and vice versa). As a result, we designed and implemented a general-purpose Datalog engine, called RecStep, on top of a parallel single-node relational system. In this paper, we outline the different techniques we use in RecStep, and the contribution of each technique to overall performance. We also present results from a detailed set of experiments comparing RecStep with a number of other Datalog systems using both graph analytics and program-analysis tasks, summarizing pros and cons of existing techniques based on the analysis of our observations. We show that RecStep generally outperforms the state-of-the-art parallel Datalog engines on complex and large-scale Datalog program evaluation, by a 4-6X margin. An additional insight from our work is that we show that it is possible to build a high-performance Datalog system on top of a relational engine, an idea that has been dismissed in past work in this area.

Motivation & Objective

  • To address the performance gap between specialized Datalog engines and their inability to generalize across diverse domains like graph analytics and program analysis.
  • To investigate whether a relational database system can serve as an effective backend for scalable, high-performance Datalog processing, contrary to prior skepticism.
  • To design and implement a general-purpose, parallel, in-memory Datalog engine that supports complex recursion, aggregation, and mutual recursion.
  • To evaluate and compare the performance of RecStep against existing Datalog systems across diverse workloads, identifying strengths and weaknesses of existing techniques.
  • To demonstrate that careful optimization of both Datalog compilation and RDBMS interaction enables competitive performance without requiring custom query execution engines.

Proposed method

  • RecStep is built on QuickStep, a single-node in-memory parallel RDBMS, to leverage its efficient parallel execution and memory management.
  • The system compiles Datalog programs into SQL queries with optimized plan generation, minimizing overhead and enabling efficient execution.
  • It employs data-parallel and multiquery-level parallelism to exploit both data and query structure for improved CPU utilization.
  • Key optimizations include efficient delta management, materialization control, and reduced reliance on sorting and coordination, minimizing I/O and synchronization costs.
  • The design supports full Datalog features including stratified negation, non-linear and mutual recursion, and both recursive and non-recursive aggregation.
  • Performance is enhanced through lightweight hyperparameter tuning and efficient query planning that reduces compilation and execution overhead per iteration.

Experimental results

Research questions

  • RQ1Can a general-purpose Datalog engine built on top of a relational database system achieve competitive performance across diverse workloads such as graph analytics and program analysis?
  • RQ2Why do existing Datalog engines fail to scale across different application domains, and what architectural characteristics lead to this divergence?
  • RQ3To what extent can a relational database backend support efficient, scalable Datalog processing through targeted optimizations?
  • RQ4How do different optimization strategies—especially in query compilation and RDBMS interaction—affect performance and resource utilization in recursive Datalog evaluation?
  • RQ5What are the key performance bottlenecks in existing systems, and how can they be mitigated through a unified, optimized engine design?

Key findings

  • RecStep outperforms state-of-the-art parallel Datalog engines by 4–6× on complex and large-scale Datalog programs across both graph analytics and program analysis workloads.
  • RecStep is the only system among those evaluated to complete all REACH, CC, and SSSP tasks on both RMAT and real-world graphs without running out of memory.
  • Souffle and BigDatalog fail to complete certain workloads due to out-of-memory (OOM) errors, especially on larger datasets, while RecStep maintains stable performance scaling with data size.
  • On the CSPA program, RecStep outperforms Souffle and Graspan on all datasets except the smallest, due to effective exploitation of data-level and multiquery-level parallelism in recursive, nonlinear rules.
  • On CSDA, which involves simple, linear rules and many iterations, RecStep is outperformed by Souffle and BigDatalog due to high compilation and materialization overhead per iteration, highlighting the impact of rule complexity on performance.
  • RecStep achieves high CPU efficiency (defined as inverse of runtime × core count), demonstrating superior utilization of available CPU cores compared to systems like bddbddb and BigDatalog.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.