<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/modernizing-the-meta-ads-service-with-an-open-source-kernel-scheduler-p1rwskot7" -->

---
title: Modernizing the Meta Ads Service With an Open-Source...
description: 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...
canonical: https://daily.dev/posts/modernizing-the-meta-ads-service-with-an-open-source-kernel-scheduler-p1rwskot7
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Modernizing the Meta Ads Service With an Open-Source Kernel Scheduler | daily.dev
og:description: 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...
og:url: https://daily.dev/posts/modernizing-the-meta-ads-service-with-an-open-source-kernel-scheduler-p1rwskot7
og:image: https://api.daily.dev/og/posts/P1rWSKOt7.png
og:image:alt: Modernizing the Meta Ads Service With an Open-Source Kernel Scheduler
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

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

**[Facebook Engineering
](https://daily.dev/sources/facebook_code)** · 6 min read · 4 upvotes · 1 comments

## Summary

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.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://engineering.fb.com/2026/07/13/ml-applications/modernizing-the-meta-ads-service-with-an-open-source-kernel-scheduler>

## Questions this post answers

### Why did upgrading to Linux kernel 6.9 cause latency regressions in a high-throughput service?

Kernel 6.9 includes the Earliest Eligible Virtual Deadline First (EEVDF) scheduler, introduced in Linux kernel 6.6 to replace CFS, which caused latency regressions for Meta's ads serving workload because it balances threads across CPUs with no awareness of the workload's priorities. This forced a subset of ads hosts to remain on the older kernel 6.4, creating operational fragmentation until a custom sched_ext policy replaced the general-purpose scheduler.

_Teams weighing kernel upgrades against workload-specific performance risks can track cases like this on daily.dev._

### What is sched_ext and when did it become part of the mainline Linux kernel?

Sched_ext is an upstream, BPF-based extensible scheduling framework that officially entered the Linux kernel in version 6.12, developed in partnership with the authors of Google's ghOSt. It lets developers implement custom scheduling policies as BPF programs that hook into thread wake-up, enqueue, dispatch, and idle-transition events, without needing to patch or rebuild the kernel itself.

_Developers evaluating custom kernel schedulers can follow sched_ext adoption stories on daily.dev._

### What performance gains came from replacing the default Linux scheduler with a custom sched_ext policy for ads serving?

Switching from kernel 6.4 with CFS to kernel 6.9 with a custom sched_ext policy delivered a 28% reduction in p99 latency on the ads retrieval path, 3.28 megawatts of fleet-wide power savings, and a 1.1% increase in weighted ads ranked. Two subsequent user-space-only policy updates added a further 60% p99 latency reduction and cut timeout errors on the critical path by 18%.

_Engineers quantifying scheduler tuning wins can compare real-world benchmarks like this on daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@palalet** · 0 upvotes

> Good, now you can serve more scam ads...

## Similar posts on daily.dev

- [Sched\_EXT With Linux 6.19 Improves Recovering For Misbehaving eBPF Schedulers](https://daily.dev/posts/sched-ext-with-linux-6-19-improves-recovering-for-misbehaving-ebpf-schedulers-4onfweyno) · Phoronix · 0 upvotes · 0 comments
- [Infinity Scheduler Aims To Be A Better Linux Scheduler](https://daily.dev/posts/infinity-scheduler-aims-to-be-a-better-linux-scheduler-i6zaof8bl) · Phoronix · 0 upvotes · 0 comments
- [stalld’s BPF Backend: Breaking Free from debugfs](https://daily.dev/posts/stalld-s-bpf-backend-breaking-free-from-debugfs-fqhox0vcy) · Red Hat Developer · 0 upvotes · 0 comments
- [Linux 7.1 sched\_ext Brings cgroup Sub-Scheduler Groundwork, Idle SMT Sibling Improvement](https://daily.dev/posts/linux-7-1-sched-ext-brings-cgroup-sub-scheduler-groundwork-idle-smt-sibling-improvement-uqbkhed7j) · Phoronix · 0 upvotes · 0 comments

---

Tags: [#linux](https://daily.dev/tags/linux), [#performance](https://daily.dev/tags/performance)

[View this post on daily.dev](https://daily.dev/posts/modernizing-the-meta-ads-service-with-an-open-source-kernel-scheduler-p1rwskot7)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Modernizing the Meta Ads Service With an Open-Source Kernel Scheduler","url":"https://daily.dev/posts/modernizing-the-meta-ads-service-with-an-open-source-kernel-scheduler-p1rwskot7","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/modernizing-the-meta-ads-service-with-an-open-source-kernel-scheduler-p1rwskot7"},"datePublished":"2026-07-13T16:01:33.222Z","dateModified":"2026-09-14T06:25:14.387Z","description":"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...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/eb7485d8d9a3b17a95597aab107625ea?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/eb7485d8d9a3b17a95597aab107625ea?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Facebook Engineering\n","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Facebook Engineering\n","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/facebook","url":"https://daily.dev/sources/facebook_code"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/modernizing-the-meta-ads-service-with-an-open-source-kernel-scheduler-p1rwskot7","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"linux,performance","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Facebook Engineering\n","item":"https://daily.dev/sources/facebook_code"},{"@type":"ListItem","position":3,"name":"Modernizing the Meta Ads Service With an Open-Source Kernel Scheduler"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/modernizing-the-meta-ads-service-with-an-open-source-kernel-scheduler-p1rwskot7","comment":[{"@type":"Comment","text":"Good, now you can serve more scam ads…","datePublished":"2026-07-15T06:19:45.228Z","url":"https://daily.dev/posts/P1rWSKOt7#c-YSpvoVAev","author":{"@type":"Person","name":"Radek Havelka","url":"https://daily.dev/palalet","image":"https://lh3.googleusercontent.com/a-/ACNPEu-o8MElSN4ROMgrqyjqrarlLqksiGLna5TAfYA1Jw=s100"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/modernizing-the-meta-ads-service-with-an-open-source-kernel-scheduler-p1rwskot7#faq","mainEntity":[{"@type":"Question","name":"Why did upgrading to Linux kernel 6.9 cause latency regressions in a high-throughput service?","acceptedAnswer":{"@type":"Answer","text":"Kernel 6.9 includes the Earliest Eligible Virtual Deadline First (EEVDF) scheduler, introduced in Linux kernel 6.6 to replace CFS, which caused latency regressions for Meta's ads serving workload because it balances threads across CPUs with no awareness of the workload's priorities. This forced a subset of ads hosts to remain on the older kernel 6.4, creating operational fragmentation until a custom sched_ext policy replaced the general-purpose scheduler. Teams weighing kernel upgrades against workload-specific performance risks can track cases like this on daily.dev."}},{"@type":"Question","name":"What is sched_ext and when did it become part of the mainline Linux kernel?","acceptedAnswer":{"@type":"Answer","text":"Sched_ext is an upstream, BPF-based extensible scheduling framework that officially entered the Linux kernel in version 6.12, developed in partnership with the authors of Google's ghOSt. It lets developers implement custom scheduling policies as BPF programs that hook into thread wake-up, enqueue, dispatch, and idle-transition events, without needing to patch or rebuild the kernel itself. Developers evaluating custom kernel schedulers can follow sched_ext adoption stories on daily.dev."}},{"@type":"Question","name":"What performance gains came from replacing the default Linux scheduler with a custom sched_ext policy for ads serving?","acceptedAnswer":{"@type":"Answer","text":"Switching from kernel 6.4 with CFS to kernel 6.9 with a custom sched_ext policy delivered a 28% reduction in p99 latency on the ads retrieval path, 3.28 megawatts of fleet-wide power savings, and a 1.1% increase in weighted ads ranked. Two subsequent user-space-only policy updates added a further 60% p99 latency reduction and cut timeout errors on the critical path by 18%. Engineers quantifying scheduler tuning wins can compare real-world benchmarks like this on daily.dev."}}]}
```

