# Modernizing the Meta Ads Service With an Open-Source Kernel Scheduler

[Meta](https://yomu.fyi/company/meta) · Jul 13, 2026

## Summary

Meta's ad serving fleet encountered latency regressions and technical debt after Linux kernel upgrades introduced the default EEVDF scheduler. To resolve these performance drops across billions of daily requests, the engineering team implemented sched\_ext, an open-source, BPF-based scheduling framework integrated into Linux kernel v6.12. The custom scheduling policy uses domain knowledge to soft-partition CPUs dynamically into separate pools for latency-critical request threads and background work, enhancing L3 cache locality. Packaged as a user-space binary, the scheduler allows policy iterations and rollouts via process restarts without kernel rebuilds. The deployment achieved a 28% reduction in p99 ads retrieval latency, a 1.1% increase in ranked ads, and 3.28 megawatts in fleet-wide power savings.

## Takeaways

- Custom sched\_ext policies soft-partition CPUs dynamically to separate latency-critical requests from less sensitive work, improving L3 cache locality and minimizing DRAM access.
- Packaging the BPF scheduler within a user-space binary enables policy updates and rollouts via process restarts in days rather than requiring multi-month kernel upgrade cycles.
- Replacing general-purpose kernel scheduling with an ads-optimized sched\_ext policy reduced ads retrieval p99 latency by 28% and saved 3.28 megawatts of power across Meta's fleet.

**Tags:** [Architecture](https://yomu.fyi/topic/architecture), [Open Source](https://yomu.fyi/topic/open-source), [Performance](https://yomu.fyi/topic/performance), [Scalability](https://yomu.fyi/topic/scalability)

[Read original post](https://engineering.fb.com/2026/07/13/ml-applications/modernizing-the-meta-ads-service-with-an-open-source-kernel-scheduler)
