[erlang-questions] "processor affinity" for processes

Zvi exta7@REDACTED
Thu Jan 17 12:26:59 CET 2008


Hi David,

thanks,

but what if I want to run two Erlang nodes on on dual CPU machine?
Will commands bellow work?

~/Desktop/tmp% erl -sname cpu1 +S 1
~/Desktop/tmp% erl -sname cpu2 +S 1

Will each of them grab it's own CPU, or this will be left to the mercy of
OS?

Zvi


David King-6 wrote:
> 
>> There are also need to control number of CPUs/cores Erlang VM using,  
>> then
>> the rest we can use for ports or another non-Erlang external  
>> processes.
> 
> You can already do this.
> 
> ~/Desktop/tmp% erl
> Erlang (BEAM) emulator version 5.6 [source] [smp:2]
> 
> <snip>
> 
> ~/Desktop/tmp% erl +S 1
> Erlang (BEAM) emulator version 5.6 [source] [smp:1]
> 
> 
>  From the man page:
> 
>           +S Number:
> 
> 
>               Sets the number of scheduler threads to use when SMP  
> support has been enabled. Valid range is 1-1024. If the Erlang
>               runtime  system is able to determine the number of  
> processor cores available, the default value will equal the this
>               value; otherwise, the default value will be one.
> 
>               This flag will be ignored if the emulator doesn't have  
> SMP support enabled (see the -smp flag).
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
> 
> 

-- 
View this message in context: http://www.nabble.com/%22processor-affinity%22-for-processes-tp9956818p14916816.html
Sent from the Erlang Questions mailing list archive at Nabble.com.




More information about the erlang-questions mailing list