Intel CAT (Cache Allocation Technology): How CPUs Let You Partition L3 Between Workloads

2026-08-24

The shared last-level cache (LLC) is a tragedy of the commons. One noisy neighbor streaming through 40MB of data can evict every hot line a latency-sensitive process depends on. Cache Allocation Technology (CAT), introduced in Xeon Broadwell and standard on modern server chips, is Intel's hardware answer: partition the LLC into ways and assign each workload a subset.

The mechanism is a bitmask per class of service (CLOS). A typical Xeon exposes 16 CLOS IDs and an LLC with 11–20 ways. Each CLOS gets a capacity bitmask (CBM) — one bit per way. If CLOS 1's mask is 0x0FF and CLOS 2's mask is 0xF00, cache fills from CLOS 1 can only land in the low 8 ways and CLOS 2 in the high 4. Reads still hit anywhere (isolation is on allocation, not lookup), so cold sharing works, but a streaming workload can't trample your hot data.

You program it via MSRs. IA32_L3_MASK_n (0xC90 + n) sets each CLOS's bitmask; IA32_PQR_ASSOC (0xC8F) tags the current logical core with a CLOS. Linux exposes this via resctrl — mount /sys/fs/resctrl, mkdir a group, write a schemata like L3:0=0ff;1=f00, and echo PIDs into tasks.

Real-world example: A trading firm colocates a market-data feed handler (latency-critical) with a risk-analytics batch job (bandwidth-hungry) on the same socket. Without CAT, the analytics job's 200GB scan flushes the feed handler's order book from L3, and tail latency spikes from 800ns to 12µs on every batch iteration. With CAT giving the feed handler exclusive access to 6 of 20 ways, its working set stays resident and tail latency drops back to ~1µs — with the batch job losing only ~8% throughput because its working set was larger than the whole cache anyway.

Rule of thumb: if your latency-critical workload's hot data is W KB and your LLC is C KB with N ways, allocate at least ceil(W / (C/N)) + 1 ways to it. The +1 absorbs conflict misses within the partition. Going wider wastes silicon; going narrower means eviction churn even without noisy neighbors.

Caveats: CAT only controls the LLC, not L1/L2 or memory bandwidth (that's MBA, a separate feature). Two CLOSes sharing a way still evict each other in that way. And prefetchers respect CAT masks — aggressive prefetch on a narrow partition just makes the trampling internal.

Key Takeaway: CAT turns the shared LLC from a free-for-all into a way-granular resource you can partition per workload, trading a few percent of aggregate throughput for order-of-magnitude better tail latency on noisy servers.

All newsletters