caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: David Allsopp <dra-news@metastack.com>
To: Edgar Friendly <thelema314@gmail.com>,
	"caml-list@yquem.inria.fr" <caml-list@yquem.inria.fr>
Subject: RE: [Caml-list] SMP multithreading
Date: Wed, 17 Nov 2010 16:34:24 +0000	[thread overview]
Message-ID: <E51C5B015DBD1348A1D85763337FB6D92C589A1C@Remus.metastack.local> (raw)
In-Reply-To: <4CE228CA.3030503@gmail.com>

Edgar Friendly wrote:
> It looks like high-performance computing of the near future will be built
> out of many machines (message passing), each with many cores (SMP).  One
> could use message passing for all communication in such a system, but a
> hybrid approach might be best for this architecture, with use of shared
> memory within each box and message passing between.  Of course the best
> choice depends strongly on the particular task.

Absolutely - and the problem in OCaml seems to be that shared memory parallelism is just branded as evil and ignored...

> In the long run, it'll likely be a combination of a few large, powerful
> cores (Intel-CPU style w/ the capability to run a single thread as fast as
> possible) with many many smaller compute engines (GPGPUs or the like,
> optimized for power and area, closely coupled with memory) that provides
> the highest performance density.

I think the central thing that we can be utterly sure about is that desktops will always have *> 1* general purpose CPU. Maybe not be an ever-increasing number of cores but definitely more than one.

> The question of how to program such an architecture seems as if it's being
> answered without the functional community's input. What can we contribute?

It has often seemed to me when SMP has been discussed in the past on this list that it almost gets dismissed out of hand because it doesn't look future-proof or because we're worried about what's round the corner in technology terms.

To me the principal question is not about whether a parallel/thread-safe GC will scale to 12, 16 or even the 2048 cores on something like http://www.hpc.cam.ac.uk/services/darwin.html but whether it will hurt a single-threaded application - i.e. whether you will still be able to implement message passing libraries and other scalable techniques without the parallel GC getting in the way of what you're doing. A parallel/thread-safe GC should be aiming to provide the same sort of contract as the present one - it "just works" for most things and in a few borderline cases (like HPC - yes, it's a borderline case) you'll need to tune your code or tweak GC parameters because it's causing some problems or because in your particular application squeezing every cycle out of the CPU is important. As long as the GC isn't (hugely) slower than the present one in OCaml then we can continue to use libraries, frameworks and technologies-still-to-come on top of a parallel/thread-safe GC which simply ignores shared memory thread-level parallelism just by not instantiating threads.

The argument always seems to focus on utterly maxing out all possible available resources (CPU time, memory bandwidth, etc.) rather than on whether it's simply faster than what we're doing able to do at the moment on the same system. Of course, it may be that the only way to do that is to have different garbage collectors - one invoked when threads.cmxa is linked and then the normal one otherwise (that's so easy to type out as a sentence, summarising a vast amount of potential work!!)

Multithreading in OCaml seems to be focused on jumping the entire width of the river of concurrency in one go, rather than coming up with stepping stones to cross it in bits...


David


  parent reply	other threads:[~2010-11-18 13:09 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-15 17:27 Wolfgang Draxinger
2010-11-16  6:46 ` [Caml-list] " Edgar Friendly
2010-11-16 17:04   ` Gerd Stolpmann
2010-11-16 20:35     ` Eray Ozkural
2010-11-16 22:13       ` Gerd Stolpmann
2010-11-16 23:04         ` Eray Ozkural
2010-11-16 23:52           ` Wolfgang Draxinger
2010-11-17  1:55             ` Eray Ozkural
2010-11-17  3:41             ` Jon Harrop
2010-11-17  3:47           ` Jon Harrop
2010-11-17  4:27             ` Eray Ozkural
2010-11-17  6:50               ` Gabriel Kerneis
2010-11-17 13:41                 ` Eray Ozkural
2010-11-17 21:15                   ` Jon Harrop
2010-11-18  0:28                     ` Eray Ozkural
2010-11-18  1:00                       ` Eray Ozkural
2010-11-16 19:07   ` Norman Hardy
2010-11-17 16:34   ` David Allsopp [this message]
2010-11-19 13:57     ` Eray Ozkural
2010-11-16 12:47 ` Sylvain Le Gall
2010-11-17 11:12   ` [Caml-list] " Goswin von Brederlow
2010-11-17 11:34     ` Sylvain Le Gall
2010-11-17 23:08       ` [Caml-list] " Christophe Raffalli
2010-11-19  9:01         ` Christophe TROESTLER
2010-11-19 15:58           ` Goswin von Brederlow
2010-11-20 11:55             ` Jon Harrop
2010-11-20 20:57               ` Goswin von Brederlow
     [not found] ` <AANLkTinyN2hHxm6ha2Yq4nx6NxY3So=BhFN_-EHKYfyc@mail.gmail.com>
2010-11-16 14:11   ` Wolfgang Draxinger

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=E51C5B015DBD1348A1D85763337FB6D92C589A1C@Remus.metastack.local \
    --to=dra-news@metastack.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=thelema314@gmail.com \
    /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).