Scalable Tokio timer for multi-core machine
summary
Claims a multi-core timer bottleneck and shows concrete fixes: a pacing-based UDP flow controller, flamegraphs revealed that splitting runtimes oddly cuts timer overhead, controlled performance tests guide iterations, and numbers show large reductions on many-core machines. Implements per-worker wheels, a cross-thread cancellation queue with delayed cancellation, and settles on a simple mutex plus intrusive list for cross-thread cancels. Results improve throughput when using many workers; enable the ALT timer only for timer-heavy, >8-worker deployments.
AI-written summary · about
chapters (11)
- 0:00Tokio timers overview
- 3:04Rust timer limitations
- 6:17Async timer flexibility
- 7:01Default Tokio timer UDP
- 11:16Optimizing timer futures
- 14:05Sharding timer wheel
- 17:58Cancellation queue
- 24:25Inject queue bottleneck
- 28:05Block-in-place impact
- 31:24Performance comparison
- 33:32Alternative timer use
related talks
05m“Using async-profiler to Find Tail Latency Issues”
45mKeynote | Actors with Tokio – a lesson in ownership
01h 03m...Scaling Visualization in concurrent C++ programs
01h 05mDecomposing a Problem for Parallel Execution
27mImproving Rust Performance Through Profiling and Benchmarking
48mReal time 101
32mTechniques for writing concurrent applications with asynchronous I/O
01h 06mTrue parallelism, with no concept of threads
