一句话:提出 MemSnap,用内核逐线程脏集和虚拟内存实现细粒度 μCheckpoint,让单层存储无需 WAL 持久化并发写事务。
现有单层存储(SLS)通过应用检查点替代文件 API,但检查点粒度粗,仍需 WAL 等文件持久化机制,削弱了 SLS 的设计优势。MemSnap 引入 μCheckpoints,以写事务为单位持久化内存更新,并可与其它线程并发执行;它在内核中实现逐线程脏集跟踪,利用虚拟内存技术阻止对进行中 μCheckpoint 的修改且不阻塞应用。评估显示,其持久化延迟比基于文件的随机 IO 低 4.5×–30×,接近直接磁盘 IO 的 2×以内;集成 SQLite、RocksDB 和 PostgreSQL 后保持 ACID,SQLite 吞吐较文件 API 提升 5×,RocksDB 较 Aurora 提升 4×。
Single level stores (SLSes) have recently resurfaced as a system for persisting application data. SLSes like EROS, Aurora, and TreeSLS use application checkpointing to replace file-based APIs. These systems checkpoint at a coarse granularity and must be combined with file persistence mechanisms like WALs, undermining the benefits of their SLS design. We present MemSnap, a new system that completes the single level store vision by eliminating the need for the WAL API. MemSnap introduces μCheckpoints that persist updates to memory for individual write transactions concurrently with other threads. We introduce a novel per-thread dirty set tracking mechanism in the kernel and use it to transparently persist application data. We use virtual memory techniques to prevent modifications to in-flight μCheckpoints, without blocking the application. MemSnap-based persistence has 4.5×--30× lower latency than file-based random IO and is within 2×of direct disk IO latency. We integrate MemSnap with the SQLite, RocksDB, and PostgreSQL databases, gaining performance while retaining ACID. MemSnap increases the throughput of SQLite by 5× over file APIs and achieves a 4× throughput improvement for RocksDB compared to Aurora.
@inproceedings{TsalapatisHHM24,
title = {MemSnap μCheckpoints: A Data Single Level Store for Fearless Persistence},
author = {Emil Tsalapatis and Ryan Hancock and Rakeeb Hossain and Ali José Mashtizadeh},
booktitle = {ASPLOS},
year = {2024},
doi = {10.1145/3620666.3651334}
}