[Fwd: Message passing benchmark on smp emulator]

Rickard Green rickard.s.green@REDACTED
Tue Mar 7 17:52:26 CET 2006


Trying again...

-------- Original Message --------
Subject: Message passing benchmark on smp emulator
Date: Tue, 07 Mar 2006 17:30:40 +0100
From: Rickard Green <rickard.s.green@REDACTED>
Newsgroups: erix.mailing-list.erlang-questions

The message passing benchmark used in estone (and bstone) isn't very
well suited for the smp emulator since it sends a message in a ring
(more or less only 1 process runnable all the time).

In order to be able to take advantage of an smp emulator I wrote another
message passing benchmark. In this benchmark all participating processes
sends a message to all processes and waits for replies on the sent messages.

I've attached the benchmark. Run like this:
big:bang(NoOfParticipatingProcesses).

I ran the benchmark on a machine with two hyperthreaded Xeon 2.40GHz
processors.

big:bang(50):
* r10b completed after about 0.014 seconds.
* p11b with 4 schedulers completed after about 0.018 seconds.

big:bang(100):
* r10b completed after about 0.088 seconds.
* p11b with 4 schedulers completed after about 0.088 seconds.

big:bang(300):
* r10b completed after about 2.6 seconds.
* p11b with 4 schedulers completed after about 1.0 seconds.

big:bang(500):
* r10b completed after about 10.7 seconds.
* p11b with 4 schedulers completed after about 3.5 seconds.

big:bang(600):
* r10b completed after about 18.0 seconds.
* p11b with 4 schedulers completed after about 5.8 seconds.

big:bang(700):
* r10b completed after about 27.0 seconds.
* p11b with 4 schedulers completed after about 9.3 seconds.

Quite a good result I guess.

Note that this is a special case and these kind of speedups are not
expected for an arbitrary Erlang program.

If you want to try yourself download a P11B snapshot at:
http://www.erlang.org/download/snapshots/
remember to enable smp support:
./configure --enable-smp-support --disable-lock-checking

You can change the number of schedulers used by passing the
+S<NO_OF_SCHEDULERS> command line argument to erl or by calling:
erlang:system_flag(schedulers, NoOfSchedulers) -> {ok|PosixError,
CurrentNo, OldNo}

/Rickard Green, Erlang/OTP


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: big.erl
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20060307/045845ac/attachment.ksh>


More information about the erlang-questions mailing list