English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Asynchronous IO programming in OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-10-27 (15:30)
From: Jérémie Dimino <jeremie@d...>
Subject: Re: [Caml-list] Asynchronous IO programming in OCaml
On Wed, Oct 27, 2010 at 03:43:37PM +0200, Goswin von Brederlow wrote:
> But then you tune your benchmark to give you the result you want instead
> of benchmarking what normaly happens.

That's true for read or write. The point i wanted to make is that in the
general case, i.e. for a system call that blocks, wrapping it into a
thread might not be a good solution because it degrades performances too

> And don't forget. Multi core systems are more and more widely
> spread. What is wrong with 2 cores doing memcpy twice as fast?

I don't think you can read or write in parallel the RAM with current
architectures, but i may be wrong.

> Do you have a different solution for writes that will avoid threads when
> a write won't block? And how do you restart jobs once the data has
> actually been commited to disk? (i.e. how do you do fsync()?)

Unfortunately no, we have no solution for write. The main problem i see
with doing write in parallels with threads is to handle errors.