From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id B0BC8BBAF for ; Mon, 26 Jul 2010 22:03:20 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtcBAA6HTUzRVaE0mGdsb2JhbACDFJxHCBUBAQEBAQgJDAcRIrIOO4IQhhAuiFQBAQMFgSGDHXMEhAOHKA X-IronPort-AV: E=Sophos;i="4.55,263,1278280800"; d="scan'208";a="54769482" Received: from mail-fx0-f52.google.com ([209.85.161.52]) by mail3-smtp-sop.national.inria.fr with ESMTP; 26 Jul 2010 22:02:56 +0200 Received: by fxm8 with SMTP id 8so324158fxm.39 for ; Mon, 26 Jul 2010 13:02:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type:content-transfer-encoding; bh=0gR5j4eLIkn0KTZhrx/cgpALfaWuslZwTY+0Bp1HQKw=; b=vBXKtUYF7cLDCMUDP5n1HMFelw5Mgekvm+6gpH7ssF52xvZBSj6YZQa2nfdmjKtYdg OCiInMOB3YkF/qcrB7XSCpcrAMaRk/Hk3IjEArsro9Ddl9rOG+TsC7PwqDcwSeMBbIRX V1LEVxj/wMKGu/gF/P7dQVHJkRbStmMSSqmGo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=kt4QtIQ0R06VdmpBKUvvt3FXtJdE+bJzvhLD2GdTtAzTkeS2asZqfFSuAuu+R8unJf mbDHK0Hnw/9XN/m9Ktgol64NhF1DaEi5kFSFLKmFn7c+yNPuluIOX1NBv2/N6kH3X7JE nSB/Cd2dKesAXpIrpQr2h5xgQg0c4HJ2B4z+Y= Received: by 10.223.113.13 with SMTP id y13mr6916131fap.37.1280174575660; Mon, 26 Jul 2010 13:02:55 -0700 (PDT) Received: from deb0 ([79.114.80.43]) by mx.google.com with ESMTPS id p2sm1578807fak.46.2010.07.26.13.02.55 (version=SSLv3 cipher=RC4-MD5); Mon, 26 Jul 2010 13:02:55 -0700 (PDT) Date: Mon, 26 Jul 2010 23:02:53 +0300 From: =?UTF-8?B?VMO2csO2aw==?= Edwin To: Jake Donham Cc: =?UTF-8?B?SsOpcsOpbWll?= Dimino , caml-list@yquem.inria.fr Subject: Re: [Caml-list] scalable web apps Message-ID: <20100726230253.029c215d@deb0> In-Reply-To: References: <914B9960-EBC8-439B-B7F8-A852859B522F@gmail.com> <407966.39005.qm@web111512.mail.gq1.yahoo.com> <20100726102904.10ed4768@deb0> <20100726075901.GA5561@aurora> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; scalable:01 edwin:98 26,:98 threads:01 wrote:01 wrote:01 caml-list:01 off-topic:02 slower:02 btw:03 threaded:03 asynchronous:03 apps:04 overhead:04 blocking:04 On Mon, 26 Jul 2010 12:57:55 -0700 Jake Donham wrote: > On Mon, Jul 26, 2010 at 12:59 AM, J=C3=A9r=C3=A9mie Dimino > wrote: > > Yes, i tried it some time ago with two small C programs which were > > just reading a file on the disk. One doing read operations in a > > simple loop, and one launching a thread for each read operation (or > > reusing the same thread). The threaded version was about 100 times > > slower than the non-threaded one. >=20 > This is perhaps off-topic for the list, but what is the reason for > this? I can imagine that launching a thread might be heavy, but is the > context-switch overhead for threads so bad? >=20 > > BTW it is planed to add some kind of asynchronous file I/O support > > in Lwt by using mmap and mincore. >=20 > How would this work? Is it possible to be notified when the page comes > into core (mincore appears to support only polling)? With AIO I think so, without it I don't know how. > Is it possible to > request a page without blocking (by reading from it)? Just curious. >=20 > Jake