Maximum number of parallel processes

One thing to be very much aware of is that the BEAM puts a lot of effort into making sure that processes will not block the system, even if they do a lot of continual work!

For example after 4000 reductions (function calls) a process is automatically rescheduled and its scheduler will take the next process in its run-queue and execute that. There is never a need to explicity try and make a process yield in some way. Also processes suspend when waiting for messages and are rescheduled when a message arrives or the receive timesout so there is no busy wait.

Also processes are automatically load-balanced over all the schedulers so no scheduler will sit dormant while the other schedulers are doing a lot of work.

These are some reasons why it is perfectly reasonable to run systems with hundreds of thousands or even millions of processes. This is why the most important thing when structuring the system is to look at the concurrency the problem and your solution have and from that work with which processes you need and what they should.

EDIT: One of the major requirements we had from the very beginning when developing Erlang was that the system should never block.

12 Likes