Scheduler and Processes
- Schedulers. BEAM runs a scheduler per core: processes preempted by reduction budget, latency kept flat.
- Process heaps. Each process GCs its own heap: pauses tiny and local, never global.
- Mailbox health. A growing mailbox is the classic failure: bounded intake and load shedding keep it flat.
Memory and Profiling
- Binary leaks. Large binaries are shared by reference: a small slice can pin a huge buffer alive.
- Profiling tools. :fprof, :eprof and :recon attribute time and inspect live systems: evidence over folklore.
- Benchee. Benchee benchmarks Elixir honestly: warmup, statistics, memory measurements per scenario.
Production BEAM Performance
- Observer and telemetry. :observer and telemetry metrics watch live nodes: process counts, memory, run queues.
- Bottleneck patterns. BEAM slowness is usually one serialising process: find it, shard it or cache its reads.
- Load testing. Load tests exercise real concurrency: thousands of connections sustained before production tries.
Before and after this level
- Before: Level 13: Testing: ExUnit, Concurrent Testing, Property-Based Testing Concepts.
- Next: Level 15: Releases & Production: Releases, Configuration and Observability, Operating Elixir Systems.
In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See Checkpoints and flashcards.
Frequently asked questions
What does Elixir Level 14: Performance & BEAM cover?
Scheduler and Processes, Memory and Profiling, Production BEAM Performance: 3 lessons and 9 ideas.
What should I know before this level?
The level before it, Level 13: Testing, which covers ExUnit, Concurrent Testing, Property-Based Testing Concepts.