Go routines optimization
summary
Explains a concrete library: a resource manager with polling that implements a Resource interface (ID, Start, Available, GetProgress) and uses a heartbeat milliseconds poll to avoid expensive queries. Uses a buffered channel semaphore to limit concurrent goroutines, example: cap temp directory writes at 100 files, observed ~20,000 failed attempts vs 11 successes when full. Shows runtime inspection (runtime callers, /proc) and a live goroutine/resource graph; approach works and surfaces tuning numbers and bottlenecks.
AI-written summary · about
chapters (24)
- 0:00Intro
- 1:23Workday
- 3:48Go routines
- 5:59Go maxprocs
- 7:15Go scheduler
- 10:01Threads
- 10:26Context switching
- 11:11Runtime latency
- 12:49Worker go routines
- 13:54Overusing
- 14:39Scalability
- 14:57Go process
- 16:39Horizontal scalability
- 17:47Vertical scalability
- 20:00Resources
- 21:07Limit power
- 22:27Dispatcher
- 23:13Resource
- 29:26Resource Manager
- 32:10Resource Visualization
- 34:36Runtime Colors
- 35:09Visualizations
- 36:25Summary
- 38:25Questions
related talks
27mProduction Ready Concurrency
22mTales of Go Runtime Scheduler
47mQueues, Fairness, and The Go Scheduler
47mDeadlocks: The Dark Side of Concurrency
24mMastering Concurrency in Go: From Patterns to Production
25mTackling Contention : The Monster in sync.Locker
26mConcurrency primitives of Golang - how to use and how not to
31mCoroutines and Go
