Re: [HACKERS] Safe/Fast I/O ... - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] Safe/Fast I/O ...
Date
Msg-id 199804121328.JAA21693@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] Safe/Fast I/O ...  ("Matthew N. Dodd" <winter@jurai.net>)
Responses Re: [HACKERS] Safe/Fast I/O ...
Re: [HACKERS] Safe/Fast I/O ...
Re: [HACKERS] Safe/Fast I/O ...
List pgsql-hackers
>
> On Sun, 12 Apr 1998, The Hermit Hacker wrote:
> >     I hate to have to ask, but how is MMAP or AIO better then sfio?  I
> > haven't had enough time to research any of this, and am just starting to
> > look at it...
>
> If its simple to compile and works as a drop in replacement AND is faster,
> I see no reason why PostgreSQL shouldn't try to link with it.
>
> Keep in mind though that in order to use MMAP or AIO you'd be
> restructuring the code to be more efficient rather than doing more of the
> same old thing but optimized.
>
> Only testing will prove me right or wrong though. :)

As David Gould mentioned, we need to do pre-fetching of data pages
somehow.

When doing a sequential scan on a table, the OS is doing a one-page
prefetch, which is probably enough.  The problem is index scans of the
table.  Those are not sequential in the main heap table (unless it is
clustered on the index), so a prefetch would help here a lot.

That is where we need async i/o.  I am looking in BSDI, and I don't see
any way to do async i/o.  The only way I can think of doing it is via
threads.

--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

pgsql-hackers by date:

Previous
From: "Boersenspielteam"
Date:
Subject: Re: [HACKERS] subselect and optimizer
Next
From: Bruce Momjian
Date:
Subject: Book recommendation, was Re: [HACKERS] Safe/Fast I/O ...