[erlang-questions] multicore performance fine grained concurrency

Kenneth Lundin kenneth.lundin@REDACTED
Thu May 6 23:52:57 CEST 2010


On Thu, May 6, 2010 at 8:06 PM, G.S. <corticalcomputer@REDACTED> wrote:
> Hello,
>
> I've had the same problems in my distributed systems, as Joe put it in his
> book: "Big computations, small messages" is the way to leverage your
> distributed systems in Erlang.
> Also, creating separate nodes for every core, without smp in many cases let
> me operate at full speed.
>
> But as it stands something needs to be done about smp.
>
On the other hand there are many examples of real applications that
really run well
 in a single smp enabled VM on a multicore HW,

I don't know if your particular system also is a benchmark thing but I
think there is a clear
pattern that benchmark systems tend to perform or scale bad. I think
the reason for that
mostly is that they are not doing much computations between the
process creations, message passings , ets-accesses and so which all
requires some kind of locking. This tesult in that the total amount of
lock requests will be a large part of the total work.

The SMP performance is improved in every release and it is mostly
about reducing or removing
the need for locking. We know quite a lot about which bottlenecks
there are and will
tick them off  one by one.

/Kenneth Erlang/OTP Ericsson

> Regards,
> -Gene
>
> On Thu, May 6, 2010 at 10:50 AM, David N Murray <dmurray@REDACTED>wrote:
>
>> On May 6, Johan Montelius scribed:
>>
>> >
>> >
>> >
>> > smp 4:4 -> 126 ms
>> > smp 2:2 -> 143 ms
>> > smp disabled -> 65 ms
>> >
>> > :-(
>> >
>>
>> I saw something similar using the Ring benchmark on both AMD (OpenBSD) and
>> Intel (Vista) dual cores.  Both cores get utilized in the 40-50% range
>> with smp enabled.  It takes 1/4 the time to run the benchmark with smp
>> disabled as it does when smp is enabled. Takes advantage of two cores just
>> fine if you run two OS processes with SMP disabled.  Doesn't do so well
>> SMP enabled.  The ring benchmark just spawns and sends messages.
>>
>> smp 2:2 -> 18003 ms
>> smp disabled -> 4867 ms
>> 2 os processes -> ~5900 ms
>>
>> hth,
>> Dave
>>
>>
>> ________________________________________________________________
>> erlang-questions (at) erlang.org mailing list.
>> See http://www.erlang.org/faq.html
>> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>>
>>
>


More information about the erlang-questions mailing list