[erlang-questions] "processor affinity" for processes

David King <>
Thu Jan 17 09:28:34 CET 2008


> 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).



More information about the erlang-questions mailing list