Version franaise
Home About Download Resources Contact us
Browse thread
scalable web apps
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Török Edwin <edwintorok@g...>
Subject: Re: [Caml-list] scalable web apps
On Mon, 26 Jul 2010 12:57:55 -0700
Jake Donham <jake@donham.org> wrote:

> On Mon, Jul 26, 2010 at 12:59 AM, Jérémie Dimino <jeremie@dimino.org>
> 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.
> 
> 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)?

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.
> 
> Jake