Meta Modernizes Ads Service with Open-Source Kernel Scheduler
Meta enhances ad performance using an open-source kernel scheduler.
1Introduction
Meta is using an open-source kernel scheduler, sched_ext, to improve the performance of its ad services. This method ensures ads are delivered faster and more efficiently.
2Importance of Ads Latency
Meta's ad servers handle over 5 million requests per second. Every millisecond reduction in latency makes ads more relevant and provides better ROI for advertisers.
3Role of sched_ext
sched_ext is a BPF-based scheduler framework officially included in Linux kernel v6.12. Meta developed a custom scheduling policy tailored to its ad delivery workload using this framework.
4Custom Scheduling Policy
sched_ext soft-partitions CPUs into two pools: one for latency-critical tasks and another for less latency-sensitive work. This keeps related tasks on the same CPUs, enhancing performance.
5Results and Impact
Using sched_ext resulted in a 1.1% increase in ads ranked, 3.28 megawatts of power savings across the fleet, and a 28% reduction in ads retrieval path latency.
6Forward-Looking Developments
Two subsequent scheduler policy updates delivered an additional 60% reduction in service p99 latency and an 18% reduction in timeout errors on the critical path.
7Strategic Asset
What started as a solution to an operational issue has become a strategic asset for Meta, serving as a continuous optimization platform for ad delivery.