In modern large-scale distributed systems, analytics jobs submitted by various users often share similar work, for example scanning and processing the same subset of data. Instead of optimizing jobs independently, which may result in redundant and wasteful processing, multi-query optimization techniques can be employed to save a considerable amount of cluster resources. In this work, we introduce a novel method combining in-memory cache primitives and multi-query optimization, to improve the efficiency of data-intensive, scalable computing frameworks. By careful selection and exploitation of common (sub)expressions, while satisfying memory constraints, our method transforms a batch of queries into a new, more efficient one which avoids unnecessary recomputations. To find feasible and efficient execution plans, our method uses a cost-based optimization formulation akin to the multiple-choice knapsack problem. Extensive experiments on a prototype implementation of our system show significant benefits of worksharing for both TPC-DS workloads and detailed micro-benchmarks.
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%。