views:

357

answers:

4

My app runs well on my quad-core machine. It is 'embarrasingly parallel', with about 100K processes, and thus nicely suited to run on a cluster of machines. However, I have trouble finding documentation on how to spread all those processes out on all available nodes in the cluster.

The documentation for distributed Erlang seems to focus on server-client apps, where each node is a client running a single app, and you specify manually which node runs which process.

+8  A: 

You can certainly distribute an Erlang program across multiple cores and computers in a cluster. It was designed for that sort of thing.

Rick Copeland
A: 

Is there at all support in Erlang for making a single parallel app run on distributed processor cores?

Certainly! But it depends on how you designed your app. An "ideal" distributable Erlang application is actually built from a number of independent (Erlang) processes that communicate with each other via the messaging system, in order to perform computations.

mipadi
A: 

I like to use the word "transparent" when describing Erlang processes. There is no code you need to change if you decide to run the process on another host.

Flinkman
A: 

I think my question was a bit too general, and not quite to the point. However, asking it made me realize what it was that I wanted to know, and then realize I already knew how to do it:

What I need to do is to explicitly say, when I spawn my processes, is: for each node in the cluster, spawn a fraction of the processes on it.

For example, if I have nine identical machines, and one that is twice as fast, I start two nodes on that one, and spawn one eleventh of the total number of processes on each node.

@memius, I think you should ask this question in new thread...
gleber