Async-fork: Mitigating Query Latency Spikes Incurred by the Fork-based Snapshot Mechanism from the OS Level
Pu Pang, Gang Deng, Kaihao Bai, Quan Chen, Shixuan Sun, Bo Liu, Yu Xu, Hongbo Yao, Zhengheng Wang, Xiyu Wang, Zheng Liu, Zhuo Song
摘要
In-memory key-value stores (IMKVSes) serve many online applications because of their efficiency. To support data backup, popular industrial IMKVSes periodically take a point-in-time snapshot of the in-memory data with the system call fork. However, this mechanism can result in latency spikes for queries arriving during the snapshot period because fork leads the engine into the kernel mode in which the engine is out-of-service for queries. In contrast to existing research focusing on optimizing snapshot algorithms, we optimize the fork operation to address the latency spikes problem from the operating system (OS) level, while keeping the data persistent mechanism in IMKVSes unchanged. Specifically, we first conduct an in-depth study to reveal the impact of the fork operation as well as the optimization techniques on query latency. Based on findings in the study, we propose Async-fork to offload the work of copying the page table from the engine (the parent process) to the child process as copying the page table dominates the execution time of fork. To keep data consistent between the parent and the child, we design the proactive synchronization strategy. Async-fork is implemented in the Linux kernel and deployed into the online Redis database in public clouds. Our experiment results show that compared with the default fork method in OS, Async-fork reduces the tail latency of queries arriving during the snapshot period by 81.76% on an 8GB instance and 99.84% on a 64GB instance.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper3
- BUDAlloc: Defeating Use-After-Free Bugs by Decoupling Virtual Address Management from KernelJunho Ahn, Jaehyeon Lee, Kanghyuk Lee, Wooseok Gwak 等USENIX Security 2024 · 被引用 6 次
- Practical DB-OS Co-Design with Privileged Kernel BypassXinjing Zhou, Viktor Leis, Jinming Hu, Xiangyao Yu 等SIGMOD 2025 · 被引用 4 次
- The Case for DBMS Live PatchingMichael Fruth, Stefanie ScherzingerVLDB 2024 · 被引用 2 次
它引用的顶会 Paper2
- Mitosis: Transparently Self-Replicating Page-Tables for Large-Memory MachinesReto Achermann, Ashish Panwar, Abhishek Bhattacharjee, Timothy Roscoe 等ASPLOS 2020 · 被引用 62 次
- Fast local page-tables for virtualized NUMA servers with vMitosisAshish Panwar, Reto Achermann, Arkaprava Basu, Abhishek Bhattacharjee 等ASPLOS 2021 · 被引用 29 次
相关 Paper
- On-demand-fork: a microsecond fork for memory-intensive and latency-sensitive applicationsKaiyang Zhao, Sishuai Gong, Pedro FonsecaEuroSys 2021 · 被引用 25 次
- μFork: Supporting POSIX fork Within a Single-Address-Space OSJohn Alistair Kressel, Hugo Lefeuvre, Pierre OlivierSOSP 2025
- Enabling Low Tail Latency on Multicore Key-Value StoresLucas Lersch, Ivan Schreter, Ismail Oukid, Wolfgang LehnerVLDB 2020 · 被引用 30 次
- How to Copy Memory? Coordinated Asynchronous Copy as a First-Class OS ServiceJingkai He, Yunpeng Dong, Dong Du, Mo Zou 等SOSP 2025 · 被引用 2 次
- TreeSLS: A Whole-system Persistent Microkernel with Tree-structured State Checkpoint on NVMFangnuo Wu, Mingkai Dong, Gequan Mo, Haibo ChenSOSP 2023 · 被引用 10 次
