Level Up Your Game: OS Kernel and Game Interactions revealed with Perfetto
summary
Perfetto collects ftrace events (sched_switch, sched_waking, sched_wakeup, IRQ and softirq entry/exit) and a minimal config yields ~2–3% tracing overhead while exposing scheduler and interrupt impact. A Pixel 8 trace of Angry Birds shows 41.48s of 90s (~46% CPU utilization) with IRQs 4.05s (~10% of time), frame cadence at 16.6ms (60 FPS), and scheduler overhead around 10–15%. Use trace_processor SQL or Python bindings to compute true thread runtime and detect memory leaks via periodic snapshots.
AI-written summary · about
chapters (12)
- 0:00Introduction to Perfetto
- 1:06Why Perfetto for gaming
- 7:09Perfetto basics and config
- 9:13CPU utilization analysis
- 11:22Frame rate and timing
- 12:28Interrupt and softirq impact
- 14:36Thread wakeup dependencies
- 17:35OS scheduler overhead
- 19:42CPU idle states
- 20:47Trace processor deep dive
- 22:12Memory leak detection
- 24:15Q&A on trace collection
related talks
18mScheduler Tracing With ftrace + eBPF
52mEffectively Measure and Reduce Kernel Latencies for Real-time Constraints
43mAdvanced System Profiling Tracing and Trace Analysis with Perfetto
31mFantastic tracepoints and where to find them
49mDebugging Methodologies for Realtime Issues in Linux Systems
32mIs Your Kernel Being Honest? Understanding & measuring low level bottlenecks
45mPerformance lab. The power of the perf tool!
46mOptimizing Scheduler for Linux Gaming
