[erlang-questions] How erlang processes get mapped to OS threads with SMP erlang

Rick Pettit rpettit@REDACTED
Thu May 27 21:11:06 CEST 2010


On Thu, May 27, 2010 8:36 am, Rick Pettit wrote:
> I've seen R13B-03 SMP erlang under load on a solaris system with multiple
> cores hit one core particularly hard for just a few seconds before load
> gets evenly distributed across all available cores as I would expect.  By
> hard, I mean one CPU drops to 0% idle for a few seconds before load
> becomes very evenly spread across all available cores.
>
> Are there documents available which describe how erlang processes get
> mapped to OS threads with SMP erlang? Does this sound like something I
> might want to tune at the OS level, or on the erlang side? (I've already
> started work on throttling the work done by SMP erlang so that the
> distribution of load across cores can happen more smoothly, but am looking
> for any other pointers on how to address this problem).
>
> On solaris I've managed to isolate this SMP erlang node by placing it in
> its own processor set, but I would rather not have to restrict it to a
> subset of available cores (which are then unavailable to other processes
> running on the server).
>
> I'm happy to RTFM if someone could point me in the right direction for
> this particular problem.

Sorry for answering my own question, but the following seems to answer my
question:

http://erlang.2086793.n4.nabble.com/Some-facts-about-Erlang-and-SMP-td2108770.html

In particular:

"The schedulers in the Erlang VM are run on one OS-thread each and it is
the OS that decides if the threads are executed on different Cores.
Normally the OS will do this just fine
and will also keep the thread on the same Core throughout the execution. "

"The Erlang processes will be run by different schedulers because they are
picked from a common run-queue by the first scheduler that becomes
available. "

-Rick



More information about the erlang-questions mailing list