arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.04698cs.DBcs.PF
收藏

用于图数据库系统的一跳子查询结果缓存

One-Hop Sub-Query Result Caches for Graph Database Systems

Hieu Nguyen, Jun Li, Shahram Ghandeharizadeh

AI总结:

本文面向图数据库读取事务提出一跳子查询结果缓存,通过键值缓存、异步事务填充及读写事务失效更新减少存储访问,并在生产电商负载中显著降低尾延迟。

摘要:

本文介绍了一种新颖的一跳子查询结果缓存,用于在图数据库系统中处理图读取事务 gR-Txs。一跳导航是从一个顶点出发,利用其入边或出边,并使用选择谓词对边和顶点进行过滤。其缓存条目标识唯一的一跳子查询(键)以及由不可变顶点 id 组成的结果集(值)。在处理 gR-Tx 时,查询处理器识别其由独立一跳子查询组成的序列,并在缓存中查找这些子查询的结果。缓存命中会减少从存储管理器获取的数据量,并消除处理该一跳子查询的需要。缓存未命中会以异步且事务性的方式填充缓存,从而维持我们事务性存储管理器的读取路径与写入路径相分离。图读写事务 gRW-Tx 会识别受影响的缓存条目,并删除或更新它们。我们对该缓存的实现位于图查询处理引擎内部,并且对用户应用程序透明。我们使用自身的电子商务生产工作负载,并结合用于重写图查询的规则来评估该缓存,以最大化借助缓存观察到的性能提升。所得结果表明,该缓存分别将查询响应时间的第 95 和第 99 百分位提升至少 2 倍和 1.63 倍。当与查询重写结合时,提升分别至少达到 2.33 倍和 4.48 倍。一个有趣的结果是,缓存的间接受益者——即不引用一跳子查询的 gRW-Tx 和 gR-Tx——也观察到显著的性能提升。缓存释放了系统资源,从而显著加快了它们的处理。

英文摘要:

This paper introduces a novel one-hop sub-query result cache for processing graph read transactions, gR-Txs, in a graph database system. The one-hop navigation is from a vertex using either its in-coming or out-going edges with selection predicates that filter edges and vertices. Its cache entry identifies a unique one-hop sub-query (key) and its result set consisting of immutable vertex ids (value). When processing a gR-Tx, the query processor identifies its sequence of individual one-hop sub-queries and looks up their results in the cache. A cache hit fetches less data from the storage manager and eliminates the requirement to process the one-hop sub-query. A cache miss populates the cache asynchronously and in a transactional manner, maintaining the separation of read and write paths of our transactional storage manager. A graph read and write transaction, gRW-Tx, identifies the impacted cache entries and either deletes or updates them. Our implementation of the cache is inside the graph query processing engine and transparent to a user application. We evaluate the cache using our eCommerce production workload and with rules that re-write graph queries to maximize the performance enhancements observed with the cache. Obtained results show the cache enhances 95th and 99th percentile of query response times by at least 2x and 1.63x, respectively. When combined with query re-writing, the enhancements are at least 2.33x and 4.48x, respectively. An interesting result is the significant performance enhancement observed by the indirect beneficiaries of the cache, gRW-Txs and gR-Txs that do not reference one-hop sub-queries. The cache frees system resources to expedite their processing significantly.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑