[erlang-questions] SMP support in OpenBSD
Angel
clist@REDACTED
Mon Aug 10 12:22:22 CEST 2009
El Domingo, 9 de Agosto de 2009 10:18:14 Nikolay Epifanov escribió:
> > Try using a finite number of processes say between 4 and 256 and see if
> > your
> > cpu-utilization increases.
> >
> I tried running
>
> run() ->
> spawn(fun() -> p(999, 999999) end),
> spawn(fun() -> p(999, 999999) end),
> spawn(fun() -> p(999, 999999) end),
> spawn(fun() -> p(999, 999999) end).
>
> but it's all happened same way. It's probably OpenBSD's fault.
>
>
>
> So when Erlang is being run on SMP system only _one_ beam.smp process is
> started? And its threads are put on different cores?
>
> OpenBSD process affinity is coming soon.
> http://undeadly.org/cgi?action=article&sid=20090324210236
>
> But it is unknown when threads will go multicore.
> http://groups.google.com/group/comp.unix.bsd.openbsd.misc/browse_thread/thread/cbea9c8b273ac0d6
>
> But threads able to run on different cores are necessary, right?
>
By reading above you can see OpenBSD seems to lack kernel mode threads where Linux provides Linuxthreads
SMP Erlang seems to take advantage from N:M where N processes are scheduled on M kernel threads that can be
bound to every core on the system so you can fully spread erlang schedulers across all processors.
So until then you can fully exploit multiples core by running several erlang nodes on the same machine using "pool"
and the like to spread computation to all cores thus achieving a N:M model where M are erlang nodes instead of erlang schedulers.
--
Este correo no tiene dibujos. Las formas extrañas en la pantalla son letras.
__________________________________________
Clist UAH a.k.a Angel
__________________________________________
Tú lo compras, yo lo copio. Todo legal.
More information about the erlang-questions
mailing list