A 15-millisecond pause in the BEAM virtual machine can stall millions of peak-shopping payments, potentially triggering a high-stakes post-mortem for a company like Klarna. To address these types of production-critical bottlenecks, Dr. Erik Stenman has released 'The BEAM Book,' a comprehensive guide designed to help engineers understand the underlying mechanics of the Erlang and Elixir runtimes.

The BEAM Book cover showing the title and subtitle regarding the Erlang Runtime System
The cover of 'The BEAM Book,' a comprehensive guide to the Erlang Runtime System (ERTS).www.amazon.com

This image identifies the primary subject of the article, the newly released technical manual.

Motivation and Development History

The project began in October 2012 as a single DocBook file and underwent a decade of iterative rewrites and structural changes. The author faced significant hurdles, including two cancelled publishing deals with O’Reilly and Pragmatic Bookshelf, which led to a massive 6,622-file repository and over a million lines of text.

Two physical copies of The BEAM Book displayed together
Physical copies of the book, which survived a decade of development and multiple publishing hurdles.happihacking.com

This visual supports the narrative of the book's long development history and eventual release.

Development History of The BEAM Book: 12 October 2012 Project opened with a lone DocBook file; 2013 Convinced O’Reilly to publish; 10 March 2015 Smashing chapters into sections; 20 January 2017 Imported everything into a new repo; 23 March 2017 Started fresh with Asciidoctor; April 7, 2017 Flipped the repository public
Development History of The BEAM Bookhappihacking.com

Chart drawn by HN Digest from figures reported by happihacking.com; values are shown as written in the source.

In 2017, the project was moved to a public GitHub repository under a Creative Commons BY-4.0 license. This transition allowed the community to contribute corrections and diagrams, helping the project reach its current state as a definitive reference for the BEAM runtime.

A GitHub stars milestone graphic showing the project surpassing 3,000 stars
A milestone graphic celebrating the project's community support on GitHub.happihacking.com

This image illustrates the community engagement and growth of the project since its move to GitHub.

“I wrote The BEAM Book so the next engineer fixes that pause before the coffee cools.”

— Why I Wrote the BEAM Book

Core Technical Coverage

The book focuses on the mechanics of how the BEAM VM executes and optimizes code. It covers how the system schedules and prioritizes processes under heavy load, as well as how process heaps, stacks, and binaries are managed in memory.

Specific technical deep-dives include the tagging schemes for data types like integers and floats, and the behavior of per-process and global garbage collectors. It also explains how the compiler turns code into instructions and how the emulator executes those instructions.

Practical Application and Scoping

Designed for engineers operating large-scale Erlang or Elixir systems, the book serves as a manual for answering 'why the VM behaves like this' during production failures. It includes practical guidance on using tools like 'erlang:trace' to identify bottlenecks and track real-world latency.

To maintain focus, the author intentionally excluded certain complex topics from the core text, such as the new JIT compiler and dirty schedulers. This scoping ensures the book remains a concentrated reference for the fundamental subsystems that power the Erlang Runtime System (ERTS).