Skip to main content
QUICK REVIEW

[论文解读] Scaling-Up In-Memory Datalog Processing: Observations and Techniques

Zhiwei Fan, Jian-Qiao Zhu|arXiv (Cornell University)|Dec 10, 2018
Graph Theory and Algorithms参考文献 19被引用 7
一句话总结

本文提出 RecStep,一个基于关系数据库管理系统(RDBMS)构建的高性能、内存中、并行 Datalog 引擎,证明了使用关系型后端实现高效 Datalog 处理是可行的。通过在查询编译和与 RDBMS 交互方面应用针对性优化,RecStep 在复杂图分析和程序分析工作负载上相比最先进引擎实现了 4–6× 的性能提升,挑战了此前认为 RDBMS 后端不适合可扩展 Datalog 处理的假设。

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.

研究动机与目标

  • 解决专用 Datalog 引擎与它们在图分析和程序分析等多样化领域中无法泛化之间的性能差距。
  • 探究关系数据库系统是否可以作为可扩展、高性能 Datalog 处理的有效后端,以反驳先前的怀疑。
  • 设计并实现一个通用的、并行的、内存中的 Datalog 引擎,支持复杂递归、聚合以及互递归。
  • 在多样化工作负载上评估并比较 RecStep 与现有 Datalog 系统的性能,识别现有技术的优势与不足。
  • 证明通过仔细优化 Datalog 编译和与 RDBMS 的交互,可以在不依赖自定义查询执行引擎的情况下实现具有竞争力的性能。

提出的方法

  • RecStep 基于 QuickStep 构建,QuickStep 是一个单节点内存中并行 RDBMS,以利用其高效的并行执行和内存管理能力。
  • 系统将 Datalog 程序编译为 SQL 查询,采用优化的执行计划生成,最大限度减少开销并实现高效执行。
  • 通过数据级并行和多查询级并行,利用数据和查询结构提升 CPU 利用率。
  • 关键优化包括高效的增量数据管理、物化控制,以及减少对排序和协调机制的依赖,从而降低 I/O 和同步开销。
  • 设计支持完整的 Datalog 功能,包括分层否定、非线性与互递归,以及递归与非递归聚合。
  • 通过轻量级超参数调优和高效的查询规划,降低每次迭代的编译与执行开销,提升性能。

实验结果

研究问题

  • RQ1基于关系数据库系统的通用 Datalog 引擎是否能在图分析和程序分析等多样化工作负载上实现具有竞争力的性能?
  • RQ2为何现有 Datalog 引擎在不同应用领域中无法扩展,其架构特性如何导致这种差异?
  • RQ3通过针对性优化,关系数据库后端在多大程度上能够支持高效、可扩展的 Datalog 处理?
  • RQ4不同的优化策略——尤其是查询编译和与 RDBMS 交互——如何影响递归 Datalog 评估中的性能与资源利用率?
  • RQ5现有系统中的关键性能瓶颈是什么,如何通过统一且优化的引擎设计加以缓解?

主要发现

  • 在图分析和程序分析工作负载的复杂且大规模 Datalog 程序上,RecStep 相比最先进并行 Datalog 引擎实现了 4–6× 的性能提升。
  • 在评估的所有系统中,RecStep 是唯一一个在 RMAT 和真实世界图上完整完成所有 REACH、CC 和 SSSP 任务且未发生内存溢出的系统。
  • Souffle 和 BigDatalog 因内存溢出(OOM)错误而无法完成某些工作负载,尤其在大规模数据集上,而 RecStep 保持了稳定且随数据规模扩展的性能。
  • 在 CSPA 程序上,除最小数据集外,RecStep 在所有数据集上均优于 Souffle 和 Graspan,归因于其在递归非线性规则中对数据级和多查询级并行性的有效利用。
  • 在 CSDA 上,由于涉及简单线性规则和大量迭代,RecStep 被 Souffle 和 BigDatalog 超越,原因在于每次迭代的编译与物化开销较高,凸显了规则复杂度对性能的影响。
  • RecStep 实现了高 CPU 效率(定义为运行时间与核心数乘积的倒数),相比 bddbddb 和 BigDatalog 等系统,展现出更优的 CPU 核心利用率。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。