PeeR: First-Class Scheduling for Latency-Critical eBPF Applications
Jeremy Carin, Ben Holmes, Weiyang Wang, Ankit Bhardwaj, Manya Ghobadi
摘要
We present PeeR, a novel eBPF runtime that makes latency-critical eBPF programs preemptable and schedulable while maintaining low overhead. As eBPF programs grow more complex, they expose a fundamental gap: performance-critical hooks execute in a non-preemptable softirq context, which is invisible to the scheduler. These programs bypass resource controls, break isolation, and cause head-of-line blocking, degrading tail latency. PeeR exploits two key properties of eBPF: the verifier enforces clean program state at helper function boundaries, making these sites natural preemption points, and non-trivial programs frequently call helpers, ensuring fine-grained preemption opportunities. Building on these properties, PeeR brings cooperative preemption to eBPF: lightweight budget checks, inserted at each helper call, force programs exceeding their budget to yield and resume later on per-CPU kernel threads. To handle a wide variety of workloads, PeeR uses a two-level scheduling model that integrates with sched e xt, where the outer level controls aggregate CPU time for eBPF workloads, while an inner micro-scheduler orders individual tasks according to an operator-defined policy. Our evaluation on Redis, Memcached, echo-server, and TPC-C workloads shows that PeeR reduces p99 latency for latency-sensitive requests by 3× to 19.8× over the current eBPF runtime, without starving competing long-running requests.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
脉络
- ghOSt: Fast & Flexible User-Space Delegation of Linux Scheduling 引用了 Caladan: Mitigating Interference at Microsecond Timescales
- Electrode: Accelerating Distributed Protocols with eBPF 引用了 Caladan: Mitigating Interference at Microsecond Timescales
- Electrode: Accelerating Distributed Protocols with eBPF 引用了 BMC: Accelerating Memcached using Safe In-kernel Caching and Pre-stack Processing
- Electrode: Accelerating Distributed Protocols with eBPF 引用了 XRP: In-Kernel Storage Functions with eBPF
- XRP: In-Kernel Storage Functions with eBPF 引用了 Caladan: Mitigating Interference at Microsecond Timescales
- XRP: In-Kernel Storage Functions with eBPF 引用了 BMC: Accelerating Memcached using Safe In-kernel Caching and Pre-stack Processing
- XRP: In-Kernel Storage Functions with eBPF 引用了 ghOSt: Fast & Flexible User-Space Delegation of Linux Scheduling
它引用的 Paper18
- Caladan: Mitigating Interference at Microsecond TimescalesJoshua Fried, Zhenyuan Ruan, Amy Ousterhout, Adam BelayOSDI 2020 · 213 次引用
- XRP: In-Kernel Storage Functions with eBPFYuhong Zhong, Haoyu Li, Yu Jian Wu, Ioannis Zarkadas 等OSDI 2022 · 100 次引用
- BMC: Accelerating Memcached using Safe In-kernel Caching and Pre-stack ProcessingYoann Ghigoff, Julien Sopena, Kahina Lazri, Antoine Blin 等NSDI 2021 · 79 次引用
- Electrode: Accelerating Distributed Protocols with eBPFYang Zhou, Zezhou Wang, Sowmya Dharanipragada, Minlan YuNSDI 2023 · 78 次引用
- ghOSt: Fast & Flexible User-Space Delegation of Linux SchedulingJack Tigar Humphries, Neel Natu, Ashwin Chaugule, Ofir Weisse 等SOSP 2021 · 60 次引用
相关 Paper
- VEP: A Two-stage Verification Toolchain for Full eBPF ProgrammabilityXiwei Wu, Yueyang Feng, Tianyi Huang, Xiaoyang Lu 等NSDI 2025 · 8 次引用
- Prove It to the Kernel: Precise Extension Analysis via Proof-Guided Abstraction RefinementHao Sun, Zhendong SuSOSP 2025
- Compiler-based timing for extremely fine-grain preemptive parallelismSouradip Ghosh, Michael Cuevas, Simone Campanoni, Peter A. DindaSC 2020 · 7 次引用
- Virtualizing eBPF with Late-BindingJing Zhang, Xiaguannan Song, Dong Du, Yubin Xia 等OSDI 2026
- SoK: Challenges and Paths Toward Memory Safety for eBPFKaiming Huang, Mathias Payer, Zhiyun Qian, Jack Sampson 等S&P 2025
