How Tech - Systems Programming

How Tech - Systems Programming

Optimizing Task Latency by Controlling CPU Caching in Schedulers

Jul 01, 2026
∙ Paid

Every time the Linux scheduler migrates your task to another core, it silently hands you a latency bill. The working set your task built up in L1 and L2 — accumulated over milliseconds of careful execution — evaporates the moment the CPU changes. The task resumes on the new core cold, refetching data from L3 or main memory for the next few hundred microseconds. On a busy 32-core server this happens thousands of times per second, invisibly, and it is frequently the actual reason your p99 latency looks nothing like your median.


User's avatar

Continue reading this post for free, courtesy of Systems.

Or purchase a paid subscription.
© 2026 Sumedh S · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture