From: Alexy Khrabrov <deliverable@gmail.com>
To: caml-list <caml-list@inria.fr>
Subject: [Caml-list] walking a graph in parallel
Date: Tue, 29 Mar 2011 18:56:28 -0400 [thread overview]
Message-ID: <3CE6E368-B103-472C-B622-672616E7CAB8@gmail.com> (raw)
I have a giant graph of Twitter data which takes several gigabytes in RAM, as a Hashtbl. I need to walk it, collecting various statistics, and building equally huge data structures under each node. Currently I do it all in a single OCaml program, which uses up to 60 GB of RAM and works fine. However, out of the 8 powerful CPUs the box has, only 1 is used.
Having seen Joel's tasty bites of ZeroMQ and Thrift and Piqi, I'm thinking of exploring 0MQ as a parallel MPI/Erlang-like way to walk the graph. I'd move the graph into a server, and walkers would be separate processes. I only need inter-process communication, IPC, for the box. I could do threads and inter-thread in 0MQ if OCaml would allow real parallel threads.
How would you manage 7 identical worker processes and 1 server, so that in the end, the results of the workers are all reduced together? What's the best way to set up the server? Some ideas:
-- hold the graph in MongoDB, it allows for parallel queries
-- keep the graph in an OCaml process, it allows for custom queries; but will 0MQ try to fork and copy it when replying to several workers? Copying is impossible, too big
Or, is it possible to use a huge chunk of shared memory, to place the read-only graph there and query it somehow separately from each worker, then use 0MQ for the reduce communication phase?
-- Alexy
next reply other threads:[~2011-03-29 22:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-29 22:56 Alexy Khrabrov [this message]
2011-03-30 0:35 ` Gerd Stolpmann
2011-03-30 19:36 ` Richard W.M. Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3CE6E368-B103-472C-B622-672616E7CAB8@gmail.com \
--to=deliverable@gmail.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox