[erlang-questions] A problem with ETS + SMP

Gene Sher corticalcomputer@REDACTED
Thu Mar 27 09:51:33 CET 2008

I've rewriten the code to use process dictionary, and noticed an interesting
Single core cpu results:
ets based net takes 300us with smp disabled, and 400us with smp enabled, but
still only 1 core in both cases, and 1 scheduler.
process dict based: 200us with smp disabled, and 300us with smp enabled,
same as above only 1 core.

quad core cpu results:
ets based net takes 200us with smp disabled, and 350us with smp enabled, 4
cores 4 schedulers.
process dictionary based:150us with smp disabled, 250us with smp enabled, 4
cores 4 schedulers,
and 6424us with 4 cores 8 schedulers smp enabled.

The only thing that seems to speed up as you add cores is the dict solution,
I still don't see why.


On 27 Mar 2008 08:50:03 +0100, Bjorn Gustavsson <bjorn@REDACTED>

> "Gene Sher" <corticalcomputer@REDACTED> writes:
> > Bjorn,
> >
> > I see, so then no matter what, the more cpus, the Slower it will be for
> me?
> > Do you suggest that I use the Process Dictionary or Dict (which is about
> 3
> > times slower in my case than ETS, but it does go faster and faster as
> more
> > cpus are added, and this will eventually run on a server/workstation
> with at
> > least 8cores, and most likely 16+).
> For the moment, yes, the process dictionary or dict could be a better
> choice.
> /Bjorn
> --
> Björn Gustavsson, Erlang/OTP, Ericsson AB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080327/2b4f8e06/attachment.htm>

More information about the erlang-questions mailing list