Crash consistency using persistent memory programming libraries requires programmers to use complex transactions and manual annotations. In contrast, the failure-atomic msync() (FAMS) interface is much simpler as it transparently tracks updates and guarantees that modified data is atomically durable on a call to the failure-atomic variant of msync(). However, FAMS suffers from several drawbacks, like the overhead of msync() and the write amplification from page-level dirty data tracking. To address these drawbacks while preserving the advantages of FAMS, we propose Snapshot, an efficient userspace implementation of FAMS. Snapshot uses compiler-based annotation to transparently track updates in userspace and syncs them with the backing byte-addressable storage copy on a call to msync(). By keeping a copy of application data in DRAM, Snapshot improves access latency. Moreover, with automatic tracking and syncing changes only on a call to msync(), Snapshot provides crash-consistency guarantees, unlike the POSIX msync() system call. For a KV-Store backed by Intel Optane running the YCSB benchmark, Snapshot achieves at least 1.2$\times$ speedup over PMDK while significantly outperforming conventional (non-crash-consistent) msync(). On an emulated CXL memory semantic SSD, Snapshot outperforms PMDK by up to 10.9$\times$ on all but one YCSB workload, where PMDK is 1.2$\times$ faster than Snapshot. Further, Kyoto Cabinet commits perform up to 8.0$\times$ faster with Snapshot than its built-in, msync()-based crash-consistency mechanism.
翻译:使用持久内存编程库实现崩溃一致性要求程序员采用复杂的事务和手动标注。相比之下,故障原子性msync()接口更为简洁,它能够透明追踪数据更新,并在调用故障原子性msync()变体时保证修改数据原子性持久化。然而,传统FAMS存在msync()系统调用开销和页级脏数据追踪导致的写放大问题。为在保留FAMS优势的同时解决这些缺陷,我们提出Snapshot——一种高效的FAMS用户态实现方案。该方案通过编译器级标注在用户态透明追踪数据更新,并在调用msync()时将修改内容同步至后端字节寻址存储副本。通过在DRAM中保留应用数据副本,Snapshot显著降低访问延迟。与POSIX msync()系统调用不同,该机制仅在调用msync()时自动追踪并同步变更内容,从而提供崩溃一致性保障。在基于Intel Optane运行YCSB基准测试的KV-Store场景中,Snapshot相较PMDK实现至少1.2倍加速,同时显著优于传统(非崩溃一致)msync()。在模拟CXL内存语义SSD环境下,除某项YCSB工作负载外(该场景PMDK比Snapshot快1.2倍),Snapshot在所有测试中均实现最高达10.9倍的性能提升。此外,Kyoto Cabinet采用Snapshot时的提交操作速度较其内置的基于msync()的崩溃一致性机制提升达8.0倍。