arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 2303.09774cs.DB
收藏

S/C:使用有限内存加速数据物化

S/C: Speeding up Data Materialization with Bounded Memory

Zhaoheng Li, Xinyu Pi, Yongjoo Park

摘要:

有了数据管道工具和SQL的表达能力,管理相互依赖的物化视图(MV)变得越来越容易。这些MV在新数据摄取时被重复更新(例如,每天),数据库管理员可以从中观察性能度量(例如,每个MV的刷新时间、磁盘上的大小),以一致的方式针对不同类型的更新(完整与增量)和不同的系统(单节点、分布式、云托管)。一个错失的机会是,现有的数据系统将这些MV更新视为独立的SQL语句,而没有充分利用它们的依赖关系信息和性能指标。但是,如果我们知道SQL语句的结果将在后续操作之后立即被消耗,那么这些后续操作不必等到早期结果在存储上完全具体化,因为结果在内存中已经很容易获得。当然,这可能是有代价的,因为将结果保存在内存中(即使是暂时的)将减少可用内存的数量;因此,我们的决定应该小心。在本文中,我们介绍了一个新的系统,称为S/C,它解决了这个问题,通过有效地创建和更新一组MV与它们之间的非循环依赖关系。S/C明智地使用有界内存,通过缩短昂贵的读取和写入来减少端到端MV刷新时间; S/C的目标函数准确地估计将中间数据保留在内存中特定时间段所节省的时间。我们的解决方案共同优化了MV刷新顺序、在内存中保留哪些数据以及何时从内存中释放数据。在高级别上,S/C仍然完全按照MV定义中的定义来具体化所有数据;因此,它不会影响任何服务级别协议。在我们对TPC-DS数据集(高达1 TB)的实验中,我们表明S/C的优化可以在1.6GB内存的情况下将端到端运行时间加速1.04倍-5.08倍。

英文摘要:

With data pipeline tools and the expressiveness of SQL, managing interdependent materialized views (MVs) are becoming increasingly easy. These MVs are updated repeatedly upon new data ingestion (e.g., daily), from which database admins can observe performance metrics (e.g., refresh time of each MV, size on disk) in a consistent way for different types of updates (full vs. incremental) and for different systems (single node, distributed, cloud-hosted). One missed opportunity is that existing data systems treat those MV updates as independent SQL statements without fully exploiting their dependency information and performance metrics. However, if we know that the result of a SQL statement will be consumed immediately after for subsequent operations, those subsequent operations do not have to wait until the early results are fully materialized on storage because the results are already readily available in memory. Of course, this may come at a cost because keeping results in memory (even temporarily) will reduce the amount of available memory; thus, our decision should be careful. In this paper, we introduce a new system, called S/C, which tackles this problem through efficient creation and update of a set of MVs with acyclic dependencies among them. S/C judiciously uses bounded memory to reduce end-to-end MV refresh time by short-circuiting expensive reads and writes; S/C's objective function accurately estimates time savings from keeping intermediate data in memory for particular periods. Our solution jointly optimizes an MV refresh order, what data to keep in memory, and when to release data from memory. At a high level, S/C still materializes all data exactly as defined in MV definitions; thus, it doesn't impact any service-level agreements. In our experiments with TPC-DS datasets (up to 1TB), we show S/C's optimization can speedup end-to-end runtime by 1.04x-5.08x with 1.6GB memory.

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

↑