Modernizing the Meta Ads Service With an Open-Source Kernel Scheduler
- Linux kernel
- sched_ext
- CFS
- EEVDF
AI Summary
Meta tackled latency regressions caused by Linux kernel upgrades in its ad serving fleet by adopting sched_ext, an upstream BPF-based extensible scheduling framework. By encoding workload awareness into a custom scheduling policy, Meta achieved a 28% reduction in p99 retrieval latency, saved 3.28 megawatts of power, and increased ranked ads by 1.1%, all without requiring kernel redeployments.
Key Takeaways
- Sched_ext allows developers to implement custom scheduling policies via BPF programs, avoiding the need for custom kernel builds.
- Meta's custom policy soft-partitions CPUs into pools based on latency-critical paths, improving L3 cache locality and lowering DRAM access costs.
- User-space BPF packaging enables continuous experimentation and rapid iteration, reducing deployment cycles from months to days.
Why it matters
General-purpose kernel schedulers often fail to optimize for complex, specialized workloads like large-scale ad delivery. This article demonstrates how engineers can leverage BPF-based extensible scheduling (sched_ext) to build custom, user-space-managed scheduling policies that significantly improve performance, energy efficiency, and operational agility.
Conversation0
What would you add from your experience?
Checking your session…
Every good conversation starts with one perspective.