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.
QCFuse: Query-Aware Cache Fusion via Compressed View for Efficient RAG Serving
Zhejiang University(浙江大学);East China Normal University(华东师范大学);Ant Group(蚂蚁集团);The Hong Kong Polytechnic University(香港理工大学);Zhejiang Normal University(浙江师范大学);Tongji University(同济大学);The Chinese University of Hong Kong, Shenzhen(香港中文大学(深圳));The Hong Kong University of Science and Technology (Guangzhou)(香港科学与技术大学(广州));The Hong Kong University of Science and Technology(香港科学与技术大学)
Metadata Caching in Presto: Towards Fast Data Processing
Presto是一个用于OLAP的开源分布式SQL查询引擎,旨在实现“SQL on everything”。自2013年开源以来,Presto一直在大规模数据分析中受到欢迎,并吸引了众多企业的采用。从Presto的开发和运行来看,我们目睹了Presto工作节点中解析面向列的数据文件的大量CPU消耗。这阻碍了包括Meta在内的一些公司增加分析数据量。在本文中,我们提出了一个元数据缓存层,建立在Alluxio SDK缓存之上,并合并在每个Presto工作节点中,以缓存文件解析中的中间结果。元数据缓存提供了两种缓存方法:缓存来自原始数据文件的解压缩元数据字节和缓存已格式化的元数据对象。我们对Presto上的TPC-DS基准测试的评估表明,当缓存是热的时,第一种方法可以将查询的CPU消耗减少10%-20%,而第二种方法可以将CPU使用量减少20%-40%。