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

From ocie@paracel.com
Subject Re: [HACKERS] Safe/Fast I/O ...
Date
Msg-id 9804130050.AA26208@dolomite.paracel.com
Whole thread Raw
In response to Re: [HACKERS] Safe/Fast I/O ...  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian wrote:
>
> >
> > 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.

I have heard the glibc version 2.0 will support the Posix AIO spec.
Solaris currently has AN implementation of AIO, but it is not the
POSIX one.  This prefetch could be done in another process or thread,
rather than tying the code to a given AIO implementation.

Ocie

pgsql-hackers by date:

Previous
From: Ryan Kirkpatrick
Date:
Subject: Re: [HACKERS] Linux/Alpha and pgsql....
Next
From: Michal Mosiewicz
Date:
Subject: Re: [HACKERS] Safe/Fast I/O ...