Affinity Tailor: Dynamic Locality-Aware Scheduling at Scale

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Ng, Jin Xin, Livneh, Ori, O'Grady, Richard, Don, Josh, Ding, Peng, Grossman, Samuel, Otero, Luis, Kennelly, Chris, Lo, David, Villavieja, Carlos
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866918475826462720
author Ng, Jin Xin
Livneh, Ori
O'Grady, Richard
Don, Josh
Ding, Peng
Grossman, Samuel
Otero, Luis
Kennelly, Chris
Lo, David
Villavieja, Carlos
author_facet Ng, Jin Xin
Livneh, Ori
O'Grady, Richard
Don, Josh
Ding, Peng
Grossman, Samuel
Otero, Luis
Kennelly, Chris
Lo, David
Villavieja, Carlos
contents Modern large multicore systems often run multiple workloads that share CPUs under schedulers such as Linux CFS. To keep CPUs busy, these schedulers load-balance runnable work, causing each workload to execute on many cores. This weakens locality at the microarchitectural level: workloads lose reuse in caches, branch predictors, and prefetchers, and interfere more with one another - especially on chiplet-based systems, where spreading execution across cores also spreads it across LLC boundaries. A natural alternative is strict CPU partitioning, but hard partitions leave capacity idle when workloads do not fully use their reserved CPUs. We present Affinity Tailor, a userspace-guided kernel scheduling system built on a key insight: the kernel can preserve locality for workloads that share CPUs by treating demand-sized, topologically compact CPU sets as affinity hints rather than hard partitions. A userspace controller estimates each workload's CPU demand online and assigns a preferred CPU set sized to that demand, chosen to be as disjoint as possible from other workloads while spanning as few LLC domains as possible. The kernel then uses this set as an affinity hint, steering threads toward those CPUs while still allowing execution elsewhere when needed to preserve utilization. Deployed at Google, Affinity Tailor delivers geometric-mean per-CPU throughput gains of 12% on chiplet-based systems and 3% on non-chiplet systems over Linux CFS. Furthermore, faster execution reduces memory residency, yielding per-GB throughput gains of 3-7%. Our findings suggest that future schedulers should treat spatial locality as a first-class objective, even at the expense of work-conservation.
format Preprint
id arxiv_https___arxiv_org_abs_2604_27915
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Affinity Tailor: Dynamic Locality-Aware Scheduling at Scale
Ng, Jin Xin
Livneh, Ori
O'Grady, Richard
Don, Josh
Ding, Peng
Grossman, Samuel
Otero, Luis
Kennelly, Chris
Lo, David
Villavieja, Carlos
Operating Systems
Hardware Architecture
Distributed, Parallel, and Cluster Computing
Modern large multicore systems often run multiple workloads that share CPUs under schedulers such as Linux CFS. To keep CPUs busy, these schedulers load-balance runnable work, causing each workload to execute on many cores. This weakens locality at the microarchitectural level: workloads lose reuse in caches, branch predictors, and prefetchers, and interfere more with one another - especially on chiplet-based systems, where spreading execution across cores also spreads it across LLC boundaries. A natural alternative is strict CPU partitioning, but hard partitions leave capacity idle when workloads do not fully use their reserved CPUs. We present Affinity Tailor, a userspace-guided kernel scheduling system built on a key insight: the kernel can preserve locality for workloads that share CPUs by treating demand-sized, topologically compact CPU sets as affinity hints rather than hard partitions. A userspace controller estimates each workload's CPU demand online and assigns a preferred CPU set sized to that demand, chosen to be as disjoint as possible from other workloads while spanning as few LLC domains as possible. The kernel then uses this set as an affinity hint, steering threads toward those CPUs while still allowing execution elsewhere when needed to preserve utilization. Deployed at Google, Affinity Tailor delivers geometric-mean per-CPU throughput gains of 12% on chiplet-based systems and 3% on non-chiplet systems over Linux CFS. Furthermore, faster execution reduces memory residency, yielding per-GB throughput gains of 3-7%. Our findings suggest that future schedulers should treat spatial locality as a first-class objective, even at the expense of work-conservation.
title Affinity Tailor: Dynamic Locality-Aware Scheduling at Scale
topic Operating Systems
Hardware Architecture
Distributed, Parallel, and Cluster Computing
url https://arxiv.org/abs/2604.27915