On-demand-fork: a microsecond fork for memory-intensive and latency-sensitive applications
Kaiyang Zhao, Sishuai Gong, Pedro Fonseca
Abstract
Fork has long been the process creation system call for Unix. At its inception, fork was hailed as an efficient system call due to its use of copy-on-write on memory shared between parent and child processes. However, application memory demand has increased drastically since the early days and the cost incurred by fork to simply set up virtual memory (e.g., copy page tables) is now a concern, even for applications that only require hundreds of MBs of memory. In practice, fork performance already holds back system efficiency and latency across a range of uses cases that fork large processes, such as fault-tolerant systems, serverless frameworks, and testing frameworks.
This paper proposes On-demand-fork, a fast implementation of the fork system call specifically designed for applications with large memory footprints. On-demand-fork relies on the observation that copy-on-write can be generalized to page tables, even on commodity hardware. On-demandfork executes faster than the traditional fork implementation by additionally sharing page tables between parent and child at fork time and selectively copying page tables in small chunks, on-demand, when handling page faults. Ondemand-fork is a drop-in replacement for fork that requires no changes to applications or hardware.
We evaluated On-demand-fork on a range of microbenchmarks and real-world workloads. On-demand-fork significantly reduces the fork invocation time and has improved scalability. For processes with 1 GB of allocated memory, On-demand-fork has a 65× performance advantage over Fork. We also evaluated On-demand-fork on testing, fuzzing, and snapshotting workloads of well-known applications, obtaining execution throughput improvements between 59% and 226% and up to 99% invocation latency reduction.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 127f0fc9-5176-4f21-9a16-ff7fafd3ea6cCited by top-tier papers18
- No Provisioned Concurrency: Fast RDMA-codesigned Remote Fork for Serverless ComputingXingda Wei, Fangming Lu, Tianxia Wang, Jinyu Gu et al.OSDI 2023 · 78 citations
- Serialization/Deserialization-free State Transfer in Serverless WorkflowsFangming Lu, Xingda Wei, Zhuobin Huang, Rong Chen et al.EuroSys 2024 · 31 citations
- Snowboard: Finding Kernel Concurrency Bugs through Systematic Inter-thread Communication AnalysisSishuai Gong, Deniz Altinbüken, Pedro Fonseca, Petros ManiatisSOSP 2021 · 26 citations
- KIT: Testing OS-Level Virtualization for Functional Interference BugsCongyu Liu, Sishuai Gong, Pedro FonsecaASPLOS 2023 · 16 citations
- CXLfork: Fast Remote Fork over CXL FabricsChloe Alverti, Stratos Psomadakis, Burak Ocalan, Shashwat Jaiswal et al.ASPLOS 2025 · 14 citations
Builds on6
- kAFL: Hardware-Assisted Feedback Fuzzing for OS KernelsSergej Schumilo, Cornelius Aschermann, Robert Gawlik, Sebastian Schinzel et al.USENIX Security 2017 · 324 citations
- Catalyzer: Sub-millisecond Startup for Serverless Computing with Initialization-less BootingDong Du, Tianyi Yu, Yubin Xia, Binyu Zang et al.ASPLOS 2020 · 280 citations
- Full-Speed Fuzzing: Reducing Fuzzing Overhead through Coverage-Guided TracingStefan Nagy, Matthew HicksS&P 2019 · 156 citations
- Designing New Operating Primitives to Improve Fuzzing PerformanceWen Xu, Sanidhya Kashyap, Changwoo Min, Taesoo KimCCS 2017 · 139 citations
- FuZZan: Efficient Sanitizer Metadata Design for FuzzingYuseok Jeon, Wookhyun Han, Nathan Burow, Mathias PayerUSENIX ATC 2020 · 52 citations
Related papers
- Async-fork: Mitigating Query Latency Spikes Incurred by the Fork-based Snapshot Mechanism from the OS LevelPu Pang, Gang Deng, Kaihao Bai, Quan Chen et al.VLDB 2023 · 10 citations
- μFork: Supporting POSIX fork Within a Single-Address-Space OSJohn Alistair Kressel, Hugo Lefeuvre, Pierre OlivierSOSP 2025
- Nephele: Extending Virtualization Environments for Cloning Unikernel-based VMsCostin Lupu, Andrei Albisoru, Radu Nichita, Doru-Florin Blânzeanu et al.EuroSys 2023 · 10 citations
- Every Mapping Counts in Large Amounts: Folio AccountingDavid Hildenbrand, Martin Schulz, Nadav AmitUSENIX ATC 2024
- Mitosis: Transparently Self-Replicating Page-Tables for Large-Memory MachinesReto Achermann, Ashish Panwar, Abhishek Bhattacharjee, Timothy Roscoe et al.ASPLOS 2020 · 62 citations
