Re: [SPAM?] Re: Asynchronous I/O Support

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, mark(at)mark(dot)mielke(dot)cc, NikhilS <nikkhils(at)gmail(dot)com>, Mark Kirkwood <markir(at)paradise(dot)net(dot)nz>, Luke Lonergan <llonergan(at)greenplum(dot)com>, Raja Agrawal <raja(dot)agrawal(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [SPAM?] Re: Asynchronous I/O Support
Date: 2006-10-21 18:00:19
Message-ID: 200610211800.k9LI0JM01154@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Martijn van Oosterhout wrote:
-- Start of PGP signed section.
> On Fri, Oct 20, 2006 at 03:04:55PM -0400, Merlin Moncure wrote:
> > On 10/20/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > >So far I've seen no evidence that async I/O would help us, only a lot
> > >of wishful thinking.
> >
> > is this thread moot? while researching this thread I came across this
> > article: http://kerneltrap.org/node/6642 describing claims of 30%
> > performance boost when using posix_fadvise to ask the o/s to prefetch
> > data. istm that this kind of improvement is in line with what aio can
> > provide, and posix_fadvise is cleaner, not requiring threads and such.
>
> Hmm, my man page says:
>
> POSIX_FADV_WILLNEED and POSIX_FADV_NOREUSE both initiate a
> non-blocking read of the specified region into the page cache.
> The amount of data read may be decreased by the kernel depending
> on VM load. (A few megabytes will usually be fully satisfied,
> and more is rarely useful.)
>
> This appears to be exactly what we want, no? It would be nice to get
> some idea of what systems support this.

See our xlog.c for our experience in trying to use it:

/*
* posix_fadvise is problematic on many platforms: on older x86 Linux it
* just dumps core, and there are reports of problems on PPC platforms as
* well. The following is therefore disabled for the time being. We could
* consider some kind of configure test to see if it's safe to use, but
* since we lack hard evidence that there's any useful performance gain to
* be had, spending time on that seems unprofitable for now.
*/

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-10-21 19:09:35 Re: [COMMITTERS] pgsql: Fix up some problems in handling of
Previous Message Richard Broersma Jr 2006-10-21 15:25:54 Re: [HACKERS] Bug?