Averages hide the tail
One healthy average can coexist with a handful of slow events that users actually feel.
eBPF-powered Linux performance diagnostics
rand-fast measures scheduler latency for a specific process, turning a vague slowdown into a signal you can investigate.
$ sudo fast sched --pid 1234 --duration 10s
Example output
Scheduler latency
The problem
CPU graphs can tell you that a service is busy. They rarely tell you why one request waited longer than the next. Scheduler latency makes that hidden wait measurable.
One healthy average can coexist with a handful of slow events that users actually feel.
Start with the process that regressed, then follow its threads and the CPUs they wait for.
Wakeups and context switches show the gap between work becoming runnable and actually running.
How it works
Three kernel events. One answer to the question: how long did this process wait?
sched_wakeuprand-fast records when a target thread is woken and ready to compete for CPU time.
runnableThe elapsed time between wakeup and execution becomes a scheduler latency event.
sched_switchEvents are aggregated by percentile, threshold, process, and CPU for a useful signal.
v0.1 / Scheduler
Start with the process you care about. Keep the output small enough to act on.
Focus on one PID and its threads instead of drowning in host-wide averages.
p50, p95, p99, and max expose the waits that an average keeps hidden.
Break scheduler latency down by CPU to reveal where runnable work is waiting.
Trace wakeups and switches with eBPF, without adding application instrumentation.
Quick start
Point fast at a PID, give it a measurement window, and inspect the scheduler latency tail.
$ sudo fast sched --pid 1234 --duration 10sThe roadmap
Scheduler latency is the first instrument. The roadmap expands rand-fast from a focused probe into a complete Linux performance flight recorder.
Validated in QEMU (7.2.0-rc6): idle vs contention shows clear scheduler latency increase.
Validated: CPU usage, on-CPU hot stacks, and scheduler correlation.
Validated: disk latency per device and per-process I/O bottlenecks.
Validated: TCP RTT, retransmissions, and slow endpoints.
Validated: futex/lock waits and off-CPU stacks.
Validated: PSI, page faults, reclaim, and swap pressure.
Validated: one-command ranked diagnosis with evidence.
Validated: low-cost rolling history with incident preservation.
The first measurement is the fastest way in.