caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gerd Stolpmann <gerd@gerd-stolpmann.de>
To: Hugo Ferreira <hmf@inescporto.pt>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] OC4MC : OCaml for Multicore architectures
Date: Fri, 25 Sep 2009 23:39:03 +0200	[thread overview]
Message-ID: <1253914743.10967.50.camel@flake.lan.gerd-stolpmann.de> (raw)
In-Reply-To: <4ABC720A.7060706@inescporto.pt>

> Rethinking our application/algorithmic structure may not be a real
> deterrent. An application does not require parallel/concurrent
> processing everywhere. It is really a question of identifying where
> and when this is useful. Much like selecting the most "appropriate" 
> data-structure for any application. It's not an all or nothing
> proposition.

Well, if you get many cores for free it sounds logical to get the most
out of it. If you have to pay for extra cores, it becomes quickly a bad
deal. Imagine you can parallelize 50% of the runtime of the application.
Even if you have as many cores as you want, and the runtime of the
sped-up part drops to almost 0, the other still-sequential 50% limit the
overall improvement to only 50%. (That's known as Amdahl's law, Xavier
also mentioned it.) So, especially when you have many cores, it is not
the number of cores that limit the speed-up in practice, but the
fraction of the algorithm that can be parallelized at all.

I'm working for a company that uses Ocaml in a highly parallelized
world. We are running it on grid-style compute clusters to process text
and symbolic data. We are using multi-processing, which is easy to do
with current Ocaml. Programs we write often run on more than 100 cores.
Guess what our biggest problem is? Getting all the cores busy. Because
there is always also some sequential part, or buggy parallel part that
limits the overall throughput. We are constantly searching for these
"bottlenecks" as our managers call this phenomenon (and we get a lot of
pressure because the company pays a lot for these many cores, and they
want to see them utilized).

We have the big advantage that our data sets are already organized in an
easy-to-parallelize way, i.e. you can usually split it up into
independent portions, and process them independently (but not always).
If you cannot do this (like in a multi-core-capable GC where always some
part of the heap is shared by all cores), things become quickly very
complicated. So I generally do not expect much from such a GC.

We are also using Java with its multi-core GC. However, we are sometimes
seeing better performance when we don't scale it to the full number of
cores the system has, but also combine it with multi-processing (i.e.
start several Javas). I simply guess the GC runs at some time into lock
contention, and has to do many things sequentially.

So, I'm a professional and massive user of multi-core programming.
Nevertheless, my first wish is not to get a multi-core GC for
shared-memory parallelism, because I doubt we ever get a satisfactory
solution. My first wish is to make single-threaded execution as fast as
possible. The second one is to make RPC's cheaper, especially between
processes on the same system (or put it this way: I'd like to see that
the processes normally have their private heaps and are fully separated,
but also that they can use a shared memory segment by explicitly moving
values there - in the direction of Richard's Ancient module - so that it
is possible to make an RPC call by moving data to this special segment).

Of course, I appreciate any work on multi-core improvements, so applause
to Philippe and team.

Gerd
-- 
------------------------------------------------------------
Gerd Stolpmann, Bad Nauheimer Str.3, 64289 Darmstadt,Germany 
gerd@gerd-stolpmann.de          http://www.gerd-stolpmann.de
Phone: +49-6151-153855                  Fax: +49-6151-997714
------------------------------------------------------------


  parent reply	other threads:[~2009-09-25 21:34 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-22 21:30 Philippe Wang
2009-09-23 10:53 ` [Caml-list] " Goswin von Brederlow
2009-09-23 12:21   ` Jon Harrop
2009-09-23 13:00     ` Jon Harrop
2009-09-23 14:26       ` Philippe Wang
2009-09-24  0:21   ` Jon Harrop
2009-09-23 23:15     ` Philippe Wang
2009-09-24  0:05       ` Jon Harrop
2009-09-24  0:01         ` Philippe Wang
2009-09-24  1:47           ` Jon Harrop
2009-09-24  9:49             ` Richard Jones
2009-09-24 10:00               ` rixed
2009-09-24 10:40               ` Florian Hars
2009-09-24 11:45               ` Jon Harrop
2009-09-24 10:00             ` kcheung
2009-09-24 11:52               ` Jon Harrop
2009-09-24 11:55                 ` Rakotomandimby Mihamina
2009-09-24 12:11                 ` rixed
2009-09-24 15:58                   ` Jon Harrop
2009-09-24 12:39                 ` Stefano Zacchiroli
2009-09-24 13:09                   ` Jon Harrop
2009-09-24 16:49                     ` Richard Jones
2009-09-24 16:56                       ` Philippe Wang
2009-09-24 17:36                         ` Richard Jones
2009-09-24 19:39                         ` rixed
2009-09-24 21:09                       ` Jon Harrop
2009-09-24 21:26                         ` rixed
2009-09-25  4:07                         ` Jacques Garrigue
2009-09-25  7:32                           ` Hugo Ferreira
2009-09-25 10:17                             ` Jon Harrop
2009-09-25 13:04                               ` kcheung
2009-09-25 21:39                             ` Gerd Stolpmann [this message]
2009-09-25  9:33                           ` Philippe Wang
2009-09-25 21:39                           ` Jon Harrop
2009-09-26 16:55                             ` Jon Harrop
2009-09-25  8:08                         ` Stéphane Glondu
2009-09-25 15:05                     ` Xavier Leroy
2009-09-25 23:26                       ` Benjamin Canou
2009-09-26  0:45                         ` kcheung
2009-09-26  1:53                           ` Jon Harrop
2009-09-26 13:51                             ` kcheung
2009-09-26 14:46                               ` Jon Harrop
2009-10-10  4:01                         ` Jon Harrop
2009-09-24 13:40                   ` Rakotomandimby Mihamina
2009-09-24 14:22                     ` Philippe Wang
2009-09-24 14:49                     ` Stefano Zacchiroli
2009-09-24 13:55                   ` Mike Lin
2009-09-24 14:52                     ` Stefano Zacchiroli
2009-09-24 15:36                 ` Philippe Wang
2009-09-24 15:50                   ` Jon Harrop
2009-09-24 12:14             ` Philippe Wang
2009-09-24 13:11               ` Jon Harrop
2009-09-24 14:51                 ` Philippe Wang
2009-09-24 14:57       ` Philippe Wang
2009-09-24 14:11 ` Dario Teixeira
2009-09-24 14:38   ` Philippe Wang
2009-09-24 15:20     ` Dario Teixeira
2009-09-24 23:28     ` Jon Harrop
2009-09-24 23:25       ` Philippe Wang
2009-09-25 14:11       ` Philippe Wang
2009-11-08 18:12       ` Jon Harrop
2009-09-24 18:24 ` David Teller
     [not found] <20090924154716.BCD0ABC5A@yquem.inria.fr>
2009-09-24 16:02 ` Pascal Cuoq
2009-09-24 16:30   ` Philippe Wang

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=1253914743.10967.50.camel@flake.lan.gerd-stolpmann.de \
    --to=gerd@gerd-stolpmann.de \
    --cc=caml-list@yquem.inria.fr \
    --cc=hmf@inescporto.pt \
    /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;
as well as URLs for NNTP newsgroup(s).