Two Load Balancing Modes: Compaction vs. Utilization
The Erlang scheduler offers two configurable dynamic load balancing modes: 'compaction of load' (default), which aims to fully utilize schedulers by ensuring they don't run out of work, and 'utilization balancing,' which strives for an equally balanced workload distribution across all schedulers.
The top 3
- Compaction vs. Utilization: Core Design Philosophies Compared: The Erlang scheduler's 'Compaction of Load' mode, the default, prioritizes fully loading a minimum number of scheduler threads to prevent them from running out of work. In contrast, 'Utilization Balancing' aims for an even workload distribution across *all* available schedulers, regardless of individual scheduler idle frequency.
- Default Behavior & Activation Flags for Each Mode: Compaction of Load is the Erlang VM's default load balancing strategy. To switch to Utilization Balancing, users must explicitly enable it via the `+sub true` flag at startup or configure `erlang.schedulers.utilization_balancing` to `true`, which implicitly disables compaction.
- Performance Trade-offs: Power Efficiency vs. Even Spread: Compaction mode can potentially offer better power efficiency by allowing underutilized CPU cores to sleep, concentrating work on fewer, fully active cores. Utilization balancing, however, ensures a more consistent and even distribution of processing tasks across all available CPU resources.
Sources
Open the full topic