---
title: "Modernizing the Meta Ads Service With an Open-Source Kernel Scheduler"
description: "Meta replaced the default Linux CFS/EEVDF scheduler on its ads serving fleet with a custom sched_ext BPF scheduling policy after EEVDF in kernel 6.6+ caused a latency regression that kept some hosts stuck on kernel 6.4."
url: "https://swe.quest/articles/modernizing-the-meta-ads-service-with-an-open-source-kernel-scheduler-30126df600f3a60b"
canonical: "https://engineering.fb.com/2026/07/13/ml-applications/modernizing-the-meta-ads-service-with-an-open-source-kernel-scheduler/"
source: "Meta Engineering"
published: "2026-07-13"
difficulty: "medium"
kind: "Case study"
reading_minutes: 5
tags: ["linux","performance","operating-systems","ads"]
---

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

A post on [Meta Engineering](https://swe.quest/sources/meta.md), published 2026-07-13, 5 min read, Case study. Original: [https://engineering.fb.com/2026/07/13/ml-applications/modernizing-the-meta-ads-service-with-an-open-source-kernel-scheduler/](https://engineering.fb.com/2026/07/13/ml-applications/modernizing-the-meta-ads-service-with-an-open-source-kernel-scheduler/)

## Summary

Meta replaced the default Linux CFS/EEVDF scheduler on its ads serving fleet with a custom sched\_ext BPF scheduling policy after EEVDF in kernel 6.6+ caused a latency regression that kept some hosts stuck on kernel 6.4. The policy soft-partitions CPUs into dynamically sized pools for latency-critical request threads and background work, improving L3 cache locality, and ships as a user-space loader so policy changes deploy by restarting a process rather than rebuilding the kernel. The initial launch cut ads retrieval p99 latency by 28%, saved 3.28 MW of power and raised ads ranked by 1.1%. Follow-on user-space policy updates delivered a further 60% p99 reduction and 18% fewer timeouts.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Linux](https://swe.quest/tags/linux.md) (Infrastructure)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Operating systems](https://swe.quest/tags/operating-systems.md) (Infrastructure)
- [Ads](https://swe.quest/tags/ads.md) (Domains)

## Prerequisites

- Linux CPU scheduling basics ([easy posts on Linux](https://swe.quest/tags/linux.md?difficulty=easy))
- eBPF ([easy posts on Linux](https://swe.quest/tags/linux.md?difficulty=easy))
- tail latency ([easy posts on Performance engineering](https://swe.quest/tags/performance.md?difficulty=easy))

## Keywords

sched\_ext, eBPF, EEVDF, CFS, Linux kernel 6.12, Meta Ads

## Related posts

- [Taming the tail utilization of ads inference at Meta scale](https://swe.quest/articles/taming-the-tail-utilization-of-ads-inference-at-meta-scale-01fc8f077015384a.md): Meta Engineering · 2024-07-10 · Hard · 11 min read · Load balancing, Inference & serving, Capacity planning, Multi-tenancy, Performance engineering
  Meta tightened the server utilization distribution of its ads inference fleet, letting it absorb 35% more load with no added capacity, cut timeout errors by two-thirds and halve p99 latency.
- [Kubernetes v1.37: DRA Updates](https://swe.quest/articles/kubernetes-v1-37-dra-updates-eaa100a22253245f.md): Kubernetes Blog · 2026-09-03 · Hard · 6 min read · Kubernetes, Scheduling, Hardware
  Kubernetes 1.37 graduates DRA Extended Resource support to GA, letting DRA drivers satisfy classic extended-resource requests like \`example.com/gpu\` through a DeviceClass so existing workloads migrate without changes.
- [F3 Lightning: How Meta Accelerates Ads ML Features to Production at Scale](https://swe.quest/articles/f3-lightning-how-meta-accelerates-ads-ml-features-to-production-at-scale-22b2343e1fb13d44.md): Meta Engineering · 2026-11-03 · Medium · 10 min read · ML platforms, Recommendations & ranking, Performance engineering, Deployment, Ads
  F3 Lightning decouples feature releases from shared execution in Meta's ads ML feature framework, so each of 20,000+ features is compiled, validated, deployed and rolled back independently instead of shipping as one all-or-nothing merged DAG.
- [KernelEvolve: How Meta’s Ranking Engineer Agent Optimizes AI Infrastructure](https://swe.quest/articles/kernelevolve-how-meta-s-ranking-engineer-agent-optimizes-ai-infrastructure-d31b329bdf84a06a.md): Meta Engineering · 2026-04-02 · Hard · 14 min read · AI agents, Performance engineering, Hardware, Compilers, Recommendations & ranking
  KernelEvolve is Meta's agentic kernel-authoring system that treats kernel optimization as a search problem instead of one-shot LLM code generation.
- [Kubernetes v1.36: More Drivers, New Features, and the Next Era of DRA](https://swe.quest/articles/kubernetes-v1-36-more-drivers-new-features-and-the-next-era-of-dra-4c45f2c4f5da1f6d.md): Kubernetes Blog · 2026-05-07 · Hard · 6 min read · Kubernetes, Hardware, Scheduling
  Kubernetes v1.36 graduates several Dynamic Resource Allocation features: prioritized device lists go stable, and extended resource support, partitionable devices, device taints, binding conditions and resource health status reach beta.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
