A scheduler is the BEAM runtime component that manages concurrent Erlang processes. It assigns each process an execution time slot, then switches to another process when the slot ends. By distributing processes across schedulers and available CPU cores, BEAM supports highly concurrent server systems without relying on one OS thread per task. section 1.1.2 section 5.1
The scheduler’s production behavior follows several practical principles:
- BEAM uses as many schedulers as available CPU cores by default; each scheduler runs in its own OS thread while the VM remains one OS process. section 5.1
- Preemptive scheduling performs frequent context switches, favors short-running processes, and prevents long-running processes from significantly blocking the rest of the system. section 1.3.1
- As demand exceeds available capacity, requests can take longer while the system continues operating; additional hardware can increase capacity. section 1.3.1
- Schedulers make lightweight BEAM processes practical for parallel server tasks, while process isolation limits the effects of individual crashes. section 1.1.2 section 5.1
Quad-core execution
On a quad-core machine, BEAM uses four schedulers by default. Each scheduler runs in a separate OS thread and takes turns executing the VM’s much larger pool of lightweight processes. section 5.1
The figure shows how one BEAM OS process and a small number of scheduler threads execute many concurrent processes. section 5.1











