VM Tuning, Know Your Engine - Part III: The Scheduler
summary
A real debugging story about the Erlang scheduler: a single scheduler falls asleep and then runs term_to_binary on 600 megabyte rows while that function only charges 20 reductions, so the process never yields and heartbeat kills the node; the quick fix is to bump reductions per iteration. Later an R15 change adds line-number stack traces and produces 60,000 stack traces/sec (each cheap in reductions), causing widespread timeouts until those traces are stopped. Scheduling, timing-wheel size, and load‑balancer intervals are explained.
AI-written summary · about
chapters (6)
- 0:00Start
- 12:45Process Control Block
- 14:06ERTS as components: The BEAM interpreter Processes
- 18:49Process State Reductions Que Handling Timing wheels
- 33:20Load Balancing
- 36:29Reduction count problems BIFs uses an arbitrary amount of reductions








