Tales of Go Runtime Scheduler
summary
Shows how Go maps goroutines onto OS threads with concrete mechanics: the P G M model, work-stealing, and the scheduler’s states. Explains how blocking channels and blocking system calls are handled, walks through actual scheduler traces and diagrams, and demonstrates a few live examples that reveal when N goroutines on M threads degrades performance and when it scales. Ends with actionable rules for interpreting trace output and fixing common contention cases like syscall blocking and runqueue imbalance.
AI-written summary · about
chapters (7)
- 0:00Introduction to Go runtime
- 3:46Problem statement explained
- 8:11System call basics
- 12:16Scheduler challenges
- 15:44Modeling the scheduler
- 20:39Optimizing performance
- 21:23Q&A and summary
related talks
14mDr Gopher, Anatomy of the Scheduler
47mQueues, Fairness, and The Go Scheduler
14mGo's work stealing scheduler
49mDeep dive into the Go scheduler, or Why would I steal goroutines?
35mGoroutines: the dark side of the runtime
50mUnderstanding the Go runtime
16mIn the land of Gophers from age 3
34mGolang: Specific Performance Issues
