Facebook Engineering
Read post

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

Meta's Ads and Linux Kernel teams used sched_ext — the BPF-based extensible scheduler merged in Linux v6.12 — to build a workload-specific scheduling policy for their ads serving fleet. When upgrading to kernel v6.9, the new EEVDF scheduler caused latency regressions, blocking part of the fleet on the older v6.4 kernel. By implementing a custom BPF scheduler that soft-partitions CPUs into latency-critical and background pools with dynamic load-based sizing, they achieved a 28% reduction in p99 latency on the ads retrieval path, 3.28 MW of power savings, and a 1.1% increase in ads ranked. Follow-on user-space-only policy updates added a further 60% p99 latency reduction and 18% fewer timeout errors. Because the scheduler policy lives in user space as a BPF program, iterations ship in days rather than months, turning sched_ext into a continuous optimization platform independent of kernel release cycles.

    #linux#performance
Jul 13•6m read time•From engineering.fb.com
Post cover image
Table of contents
TL; DRWhy Ads Latency MattersResults and ImpactFrom Short-Term Fix to Strategic AssetFuture PlansAcknowledgments
8.3K Impressions1 Comment
Facebook Engineering
's image
Facebook Engineering

144 Followers

•

429 Upvotes

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard