From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id D1BB7BB84 for ; Thu, 11 Sep 2008 17:33:00 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkIBAEjXyEhKfSwdlGdsb2JhbACDEY8WPgEBAQEJAwoHEQOeJoZPAQKEBw X-IronPort-AV: E=Sophos;i="4.32,380,1217800800"; d="scan'208";a="14836430" Received: from yx-out-2324.google.com ([74.125.44.29]) by mail2-smtp-roc.national.inria.fr with ESMTP; 11 Sep 2008 17:33:00 +0200 Received: by yx-out-2324.google.com with SMTP id 3so146940yxj.3 for ; Thu, 11 Sep 2008 08:32:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=mg2JhhjqQPyKTVx/boG48FfJLkeHL8pmQArLa6qAzII=; b=YMcbB+w6t3qs//8kriz/kcj+ihTgCceAkXvtqgO9J3ddzAenSKRLXdssgfItXaezZv B0B6X5faJT6TukeqCuJKUR7dVOSiiLO5yNi3f6Tq4Vtt4G30nr1SEoTF90GFheHmGi3o 8fUYlkkSA/JNALcpEO/HWGZbj6+e9dIF1bl8o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=N5MyUchA6yLSOe3DfhCRdxzL1R4q5rm8ct1kC2v3A+qRXI0yCUCyYdlnubFtJzul9R 9VP0Bet9J9b82YlelpG5d+r0pG9SfKXiWEy+lMM4N/9k0G6LgJstNc44F7I712l6lIYR KxKRJr16bUHyyM6ifq4TncPcjmT8EhuU7WO1Y= Received: by 10.142.140.15 with SMTP id n15mr1010906wfd.168.1221147178985; Thu, 11 Sep 2008 08:32:58 -0700 (PDT) Received: by 10.143.35.6 with HTTP; Thu, 11 Sep 2008 08:32:58 -0700 (PDT) Message-ID: Date: Thu, 11 Sep 2008 11:32:58 -0400 From: "Markus Mottl" To: "=?ISO-8859-1?Q?Mattias_Engdeg=E5rd?=" Subject: Re: [Caml-list] ocamlnet and kernel poll Cc: joelr1@gmail.com, caml-list@yquem.inria.fr In-Reply-To: <20080911143735.EF7EC29B2A@kicki.hq.vtech> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <01677251-3A8D-4DCA-9E39-7D17FAC92645@gmail.com> <20080911143735.EF7EC29B2A@kicki.hq.vtech> X-Spam: no; 0.00; markus:01 mottl:01 markus:01 mottl:01 ocamlnet:01 mattias:01 mattias:01 parallelism:01 parallelism:01 ocaml:01 threads:01 wrote:01 caml-list:01 inefficient:02 kernel:02 On Thu, Sep 11, 2008 at 10:37 AM, Mattias Engdeg=E5rd 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. Regards, Markus --=20 Markus Mottl http://www.ocaml.info markus.mottl@gmail.com