BEAM's GC vs. Global GC Faults
Unlike runtimes with global garbage collectors (e.g., JVM, Go) where a memory leak or 'stop-the-world' (STW) pause can affect the entire application, BEAM's per-process GC ensures faults remain isolated to individual processes.
The top 3
- BEAM's Local GC vs. Global "Stop-the-World" Pauses: BEAM's per-process garbage collection ensures that memory-related faults or pauses only affect the specific process, preventing system-wide "stop-the-world" interruptions common with global garbage collectors like those in Java.
- Independent Heaps: BEAM's Core GC Isolation: The fundamental reason for BEAM's fault isolation is that each Erlang/Elixir process operates with its own isolated heap and stack, complete with an independent garbage collector, effectively preventing memory issues from spreading across the system.
- Erlang/Elixir's Uptime Edge: Fault-Tolerant GC: This unique, isolated GC design is a cornerstone of Erlang and Elixir systems, enabling them to achieve "five nines" (99.999%) or higher availability by containing memory issues to individual, easily restartable processes, thus minimizing system downtime.
Sources
Open the full topic