---
title: "Taming the tail utilization of ads inference at Meta scale"
description: "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."
url: "https://swe.quest/articles/taming-the-tail-utilization-of-ads-inference-at-meta-scale-01fc8f077015384a"
canonical: "https://engineering.fb.com/2024/07/10/production-engineering/tail-utilization-ads-inference-meta/"
source: "Meta Engineering"
published: "2024-07-10"
difficulty: "hard"
kind: "Case study"
reading_minutes: 11
tags: ["load-balancing","inference","capacity-planning","multi-tenancy","performance"]
---

# Taming the tail utilization of ads inference at Meta scale

A post on [Meta Engineering](https://swe.quest/sources/meta.md), published 2024-07-10, 11 min read, Case study. Original: [https://engineering.fb.com/2024/07/10/production-engineering/tail-utilization-ads-inference-meta/](https://engineering.fb.com/2024/07/10/production-engineering/tail-utilization-ads-inference-meta/)

## Summary

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. Routing-side fixes used power-of-two-choices with polled rather than piggybacked load to avoid staleness, and tuned Shard Manager placement bands and thresholds. Deeper system changes treated memory bandwidth as a placement resource, since memory latency climbs sharply above roughly 65-70% utilization. Other changes included a per-model 'outstanding examples CPU' load counter to fix multi-tenant imbalance, budgets that gate snapshot transitions on utilization, a feedback controller balancing traffic across hardware tiers, and predictive replica scaling up to two hours ahead. CPU utilization proved a poor load signal because it is time-aggregated and misses I/O-bound work.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Load balancing](https://swe.quest/tags/load-balancing.md) (Infrastructure)
- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [Capacity planning](https://swe.quest/tags/capacity-planning.md) (Reliability & operations)
- [Multi-tenancy](https://swe.quest/tags/multi-tenancy.md) (Architecture & design)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)

## Prerequisites

- load balancing algorithms ([easy posts on Load balancing](https://swe.quest/tags/load-balancing.md?difficulty=easy))
- sharded services
- tail latency percentiles ([easy posts on Performance engineering](https://swe.quest/tags/performance.md?difficulty=easy))
- ML model serving ([easy posts on Machine learning](https://swe.quest/tags/machine-learning.md?difficulty=easy))

## Keywords

ServiceRouter, Shard Manager, power of two choices, ReplicaEstimator, dynolog, Meta ads

## Related posts

- [Turning Opportunistic AI Inference Capacity Into Better Ads Recommendations](https://swe.quest/articles/turning-opportunistic-ai-inference-capacity-into-better-ads-recommendations-a2893f4d3d62c2b4.md): Meta Engineering · 2026-10-12 · Medium · 10 min read · Ads, Inference & serving, Recommendations & ranking, Resilience, Capacity planning
  Meta aggregates locally idle inference capacity, stranded by peak provisioning, delivery timing, resource-ratio and accelerator-type mismatches, into a preemptible opportunistic pool used to improve ads recommendations.
- [Intelligent Delivery: Making Every Unit of Compute Serve Better Ads](https://swe.quest/articles/intelligent-delivery-making-every-unit-of-compute-serve-better-ads-e2f91280ba29b622.md): Meta Engineering · 2026-11-11 · Medium · 9 min read · Ads, Recommendations & ranking, Inference & serving, Capacity planning, AI agents
  Meta's Intelligent Delivery is an ML-driven layer that allocates serving compute across requests, models, hardware fleets and ranking stages by predicting the marginal utility of each unit of compute, adding about 10% ads ranking performance since 2017.
- [Meta Adaptive Ranking Model: Bending the Inference Scaling Curve to Serve LLM-Scale Models for Ads](https://swe.quest/articles/meta-adaptive-ranking-model-bending-the-inference-scaling-curve-to-serve-llm-b02b370caa05f2c4.md): Meta Engineering · 2026-03-31 · Hard · 9 min read · Recommendations & ranking, Inference & serving, Ads, Performance engineering, Hardware
  Meta Adaptive Ranking Model serves LLM-scale ads ranking models (O(10 GFLOPs) per token, O(1T) parameters) at O(100 ms) latency by routing each request to an appropriately complex model and computing user signals once per request instead of once per ad candidate.
- [Maintaining large-scale AI capacity at Meta](https://swe.quest/articles/maintaining-large-scale-ai-capacity-at-meta-239fd709265a559c.md): Meta Engineering · 2024-06-12 · Easy · 8 min read · Datacenters, Deployment, Model training, SRE, Hardware
  Meta keeps its GPU training fleet, planned to reach 600,000 GPUs, current by rolling firmware, driver and network upgrades through "maintenance trains".
- [Meta’s Infrastructure Evolution and the Advent of AI](https://swe.quest/articles/meta-s-infrastructure-evolution-and-the-advent-of-ai-5db1ff27f9423ca7.md): Meta Engineering · 2025-09-29 · Easy · 17 min read · Datacenters, Model training, Hardware, Scaling, Distributed systems
  Meta's infrastructure grew from a LAMP stack with per-university databases to a global fleet of millions of machines.

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)
