Erlang / Erlang Advanced Interview questions
Why might increasing the number of BEAM schedulers not improve throughput linearly?
Adding scheduler threads only helps if there's enough independent, ready-to-run work to actually fill them, and if nothing else becomes the new bottleneck once CPU contention eases. Several factors commonly cap the gains well before scheduler count matches core count:
- Contended shared resources — a single ETS table or process (like a central counter or a poorly-partitioned queue) that many processes hit becomes the bottleneck regardless of how many schedulers are free to run other work.
- NIFs or dirty work saturating their own separate pools — adding regular schedulers doesn't help if the real limit is dirty CPU/IO scheduler capacity.
- I/O-bound work — if processes are mostly waiting on network or disk, more schedulers just means more idle threads, not more completed work per second.
- Diminishing returns from work-stealing overhead and cache effects — beyond the actual number of physical cores, extra scheduler threads add coordination overhead without adding real parallel capacity.
Because of this, scaling Erlang throughput usually means finding and fixing the specific contended resource first (partitioning a hot ETS table, adding dirty scheduler capacity, reducing a chatty bottleneck process) rather than just raising the scheduler count and expecting proportional gains.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
