From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id CBEEABBAF for ; Mon, 26 Jul 2010 21:58:15 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjYCAC+FTUxKfVK0kGdsb2JhbACfWwgVAQEBAQkJDAcRAx+0W4YSiQIBAQMFhTEEhAiEXIdh X-IronPort-AV: E=Sophos;i="4.55,263,1278280800"; d="scan'208";a="64442586" Received: from mail-wy0-f180.google.com ([74.125.82.180]) by mail1-smtp-roc.national.inria.fr with ESMTP; 26 Jul 2010 21:58:15 +0200 Received: by wyb33 with SMTP id 33so3010403wyb.39 for ; Mon, 26 Jul 2010 12:58:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=2sRdzftAfrPMvtEZ3iQJsEjUjpyhbx9p2ibjqnXdauA=; b=ATqWoVflM6WwMd7CpUHXeArG1TFX3wkkZe+xtAp8CnTvYUrsoEjCnwehEkbvQeRMHB mouHMZM3DmG/Yq2v7pv5Eq/dVov+i6By3244XfOn+w2XZ9Y1XBzVOu4sMWeSKfERe9GP aIe2O5j4ByYd79WKZ5HjaFopsSbwdEWON3K/c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=qOqoOV3NJlons+tJNTZh7yNoPe7V5J3MwuyAn8SEyh0NYwJVGfbXv+Nx63Bvfm/dni eWjgaVl76ZODhVu160cOmt3X0GRjfDJ37drRYY7tciwke/s+SkiK0kSz3zwen286GwyV +pfuYXzVl1uJFUDbRN/l4qFVnmrSMpm3IcFOw= Received: by 10.216.93.16 with SMTP id k16mr7943541wef.78.1280174295189; Mon, 26 Jul 2010 12:58:15 -0700 (PDT) MIME-Version: 1.0 Sender: jake.donham@gmail.com Received: by 10.216.186.17 with HTTP; Mon, 26 Jul 2010 12:57:55 -0700 (PDT) In-Reply-To: <20100726075901.GA5561@aurora> References: <914B9960-EBC8-439B-B7F8-A852859B522F@gmail.com> <407966.39005.qm@web111512.mail.gq1.yahoo.com> <20100726102904.10ed4768@deb0> <20100726075901.GA5561@aurora> From: Jake Donham Date: Mon, 26 Jul 2010 12:57:55 -0700 X-Google-Sender-Auth: whgKonZI9nBb-qWMls8OO52ehTE Message-ID: Subject: Re: [Caml-list] scalable web apps To: =?ISO-8859-1?Q?J=E9r=E9mie_Dimino?= Cc: =?ISO-8859-1?Q?T=F6r=F6k_Edwin?= , caml-list@yquem.inria.fr Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; scalable:01 26,:98 threads:01 wrote:01 caml-list:01 off-topic:02 slower:02 btw:03 threaded:03 asynchronous:03 apps:04 overhead:04 blocking:04 perhaps:05 jul:05 On Mon, Jul 26, 2010 at 12:59 AM, J=E9r=E9mie Dimino w= rote: > 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. 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? > BTW it is planed to add some kind of asynchronous file I/O support in > Lwt by using mmap and mincore. How would this work? Is it possible to be notified when the page comes into core (mincore appears to support only polling)? Is it possible to request a page without blocking (by reading from it)? Just curious. Jake