Erlang & Hyperthreading

Ryan Rawson ryanobjc@REDACTED
Thu Mar 2 07:22:05 CET 2006


In my circumstance, I run a mnesia database on every node.  Each node
answers questions from its local database.  So running N nodes on a
N-CPU/SMP system ends up with N copies of the database on 1 machine. 
That isn't the end of the world, since practically any Unix/Linux
application on a 32 machine can't use more than 1.5 GB RAM, but the
issue I'd be worried about is the additional communications overhead.

This is part of the reason why I'm interested in the SMP-aware Erlang.

The overall problem I'm trying to solve is one of building a service. 
As in "SOA" - service oriented architecture.

-ryan

On 2/28/06, Thomas Lindgren <thomasl_erlang@REDACTED> wrote:
>
>
> --- Ryan Rawson <ryanobjc@REDACTED> wrote:
>
> > As for performance - surely on a multicpu system
> > with a SMP aware
> > erlang running, one can expect better performance
> > just by using
> > multiple kernel threads and gaining the ability to
> > run on several
> > CPUs?  Actual performance on a single cpu, I
> > wouldn't expect any
> > performance benefit.
>
> There is the extra cost of locking access to shared
> data inside the VM; contention between threads;
> waiting for sequential, global background tasks like
> memory management [parallel GCs exist, though; not
> sure what OTP uses], etc.
>
> These problems are not specific to Erlang, naturally,
> but do tend to turn up in most parallel applications,
> particularly those that aren't designed to get around
> it. Symptoms: First, a multithreaded application on a
> single CPU will normally see a slowdown compared to
> the single-threaded version (depending on hardware,
> language and implementation, the precise number varies
> widely). Second, contention and sequentialization
> limits potential speedup, both relative to the
> multithreaded and the (faster) single-threaded base.
>
> If the application permits it, you could also try a
> less convenient and less flexible solution: running
> several distributed erlang nodes on the same SMP host.
> Since the nodes run at arm's length, the performance
> trade off is different.
>
> Best,
> Thomas
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>



More information about the erlang-questions mailing list