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
ocamlnet and kernel poll
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-09-11 (15:33)
From: Markus Mottl <markus.mottl@g...>
Subject: Re: [Caml-list] ocamlnet and kernel poll
On Thu, Sep 11, 2008 at 10:37 AM, Mattias Engdegård
<mattias@virtutech.se> wrote:
> There's nothing wrong with serving myriads of connections from a
> single process, especially when using a strongly typed language, but
> parallelism can be useful. On the other hand, one process per
> connection may be inefficient as well - a hybrid N:M solution is
> probably best.

Note that if your application is I/O-intensive, you can already
exploit parallelism within one process.  Use bigstrings as buffers and
perform I/O outside of the OCaml-lock if releasing it (depends on
I/O-size) is more efficient.  That way you can have many threads
performing I/O-system calls simultaneously.


Markus Mottl http://www.ocaml.info markus.mottl@gmail.com