[erlang-questions] How many scheduler threads to I need?

Convey Christian J NPRI ConveyCJ@REDACTED
Tue Mar 11 12:53:04 CET 2008


Could someone clear this up for me please?

When I run a simple, single-process Erlang function from the erl shell, I light up both CPU cores on my computer. So...

* How does a single process light up two cores?  Is one core busy with garbage collection or something?
* If I can light up two cores with just a simple invocation of the erl shell, then why does the "-smp +S n" option exist?

Thanks,
Christian

BTW, here's the code I ran:


countdown(X) -> countdown(X, 0).

countdown(0, Acc) ->
   Acc
;
countdown(X, Acc) ->
   countdown(X-1, Acc+1)
.

countdown(50000000).



More information about the erlang-questions mailing list