Optimizing CPU Usage on the Erlang VM

3
clicks
Optimizing CPU Usage on the Erlang VM

Source: ananthakumaran.in

Type: Post

The article explores the process of fine-tuning the Erlang Virtual Machine (VM) to enhance performance by addressing CPU usage and system-level bottlenecks. The author shares insights from their experience with a production workload on 16-core machines, where CPU utilization was consistently below optimal levels. They provide a step-by-step account of identifying and resolving issues, including the use of Erlang's lock profiler tool, 'lcnt', to analyze lock contention. Key findings include discovering bottlenecks related to memory allocation and the use of ETS tables, particularly under heavy loads. The author highlights several configuration adjustments, such as enabling independent allocators for dirty schedulers and switching to an ETS table per scheduler, which significantly improved CPU utilization and overall system performance.

© HashMerge 2025