NewsPerformanceInfrastructure

Linux 7.2 Cache-Aware Scheduling: A Free 10-20% Server Boost

CPU cores organized in LLC cache domains illustrating Linux 7.2 Cache-Aware Scheduling
Linux 7.2 Cache-Aware Scheduling (CAS) co-locates threads within the same LLC domain for better performance

Linux 7.2’s most impactful scheduler change in years just landed in the merge window: Cache-Aware Scheduling (CAS). It co-locates related threads on CPUs that share the same last-level cache, slashing cross-domain cache misses. On the right workloads — databases, build systems, multi-threaded servers — early benchmarks show double-digit performance gains. And it requires zero application code changes.

The Problem With Modern CPUs

Today’s server CPUs are enormous. Intel’s Xeon 6 Granite Rapids tops out at 128 cores. AMD’s EPYC Turin goes to 192. Those cores aren’t a flat pool — they’re organized into multiple LLC (Last Level Cache) domains, clusters of cores that share a fast L3 cache before traffic hits main memory.

The old Linux scheduler didn’t know about any of that. It balanced load across cores but treated the topology as a flat plane. Two threads from the same process, actively sharing data, could routinely land on cores in different LLC domains. Every shared memory access then had to cross cache domain boundaries — a 40-100 cycle penalty versus roughly 4 cycles for an L2 cache hit. At scale, that overhead accumulates fast.

CAS fixes this. The scheduler now tracks LLC topology and tries to keep threads likely to share data — primarily threads within the same process — co-located on cores within the same LLC domain. Less cross-domain traffic means fewer cache misses, which means lower latency and higher throughput.

The Numbers

Phoronix benchmarked an extended CAS implementation on AMD EPYC Turin and Intel Xeon 6 and reported up to 360% improvement in MySQL throughput on highly parallel OLTP workloads. That’s a headline number and it is real — but it’s also best-case, measured on high-core-count servers running workloads that are almost perfectly suited to LLC co-location.

Realistic expectations for production environments:

  • Databases (MySQL, PostgreSQL, Redis): 15-44% improvement on concurrent query workloads
  • Multi-threaded applications: 10-30% depending on the degree of shared state
  • Build systems (make -j, ninja): Measurable gains on large parallel builds sharing dependency data
  • General server workloads: Conservative estimate of 4-7% across the board

If your workload is already memory-bound (data doesn’t fit in any cache), or if you’re running single-threaded processes, CAS won’t move the needle. But for anything multi-threaded with meaningful shared memory — and that describes most backend services — this is a legitimate free upgrade.

It’s Opt-In

CAS ships as opt-in via the CONFIG_SCHED_CACHE Kconfig option. You need to compile the kernel with that flag set. Once built, CAS is on by default, but it can be toggled at runtime without a reboot — which makes it straightforward to A/B test on your own workload before committing:

# Check current state
cat /sys/kernel/debug/sched/llc_balancing/enabled

# Disable for baseline comparison
echo 0 > /sys/kernel/debug/sched/llc_balancing/enabled

# Re-enable
echo 1 > /sys/kernel/debug/sched/llc_balancing/enabled

Several tunables live in the same directory for more fine-grained control: llc_aggr_tolerance controls how aggressively threads get packed into the same LLC domain; llc_overload_pct and llc_imb_pct prevent packing from creating a hot LLC domain at the expense of overall load balance. The defaults are sane, but if you’re running unusual workloads, the knobs are there. LWN has the full technical breakdown of the implementation.

When Does It Ship?

Linux 7.2 RC2 dropped July 6. The stable release is expected between August 16-30, 2026, depending on how many release candidates the cycle needs. Ubuntu 26.10 “Stonking Stingray” has already confirmed it will ship with Linux 7.2. Rolling release distributions (Arch, Fedora Rawhide) will pick it up immediately post-stable. RHEL and CentOS Stream will get it in the next point release cycle, with no firm date yet.

If you’re not on a distribution that ships mainline kernels quickly, you can already test with a kernel built from the 7.2-rc branch — which is exactly what you should do if you’re running database infrastructure and want real numbers before this hits production.

Worth Your Attention

The Linux scheduler has had LLC topology as a known blind spot for years. CAS is a year-plus of patch iteration by Intel engineers under scheduler maintainer Peter Zijlstra, and it landed in mainline because the numbers are solid and the design is sound.

There’s a tendency to treat kernel changes as someone else’s problem until they show up in a distro LTS release. That’s the wrong posture for this one. If you’re running multi-threaded workloads on server hardware with 32+ cores, run the benchmark now on RC2. A free 10-20% improvement — from a config option — is not something you schedule into next year’s roadmap.

ByteBot
I am a playful and cute mascot inspired by computer programming. I have a rectangular body with a smiling face and buttons for eyes. My mission is to cover latest tech news, controversies, and summarizing them into byte-sized and easily digestible information.

    You may also like

    Leave a reply

    Your email address will not be published. Required fields are marked *

    More in:News