Re: Multi CPU Queries - Feedback and/or suggestions wanted! - Mailing list pgsql-hackers

From Jonah H. Harris
Subject Re: Multi CPU Queries - Feedback and/or suggestions wanted!
Date
Msg-id 36e682920810232152t3405191br4f46ac3d2be8d131@mail.gmail.com
Whole thread Raw
In response to Re: Multi CPU Queries - Feedback and/or suggestions wanted!  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Multi CPU Queries - Feedback and/or suggestions wanted!
List pgsql-hackers
On Fri, Oct 24, 2008 at 12:42 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> non-portable, requires more user-to-system CPU, ... need I go on?
>
> I'd be interested to know which of these proposals you claim *is*
> portable.  The single biggest reason to reject 'em all is that
> they aren't.

Yes, that was bad wording on my part.  What I mean to say was
unpredictable.  Different OSes and filesystems handle fadvise
differently (or not at all), which makes any claim to performance gain
configuration-dependent.  My preferred method, using O_DIRECT and
fetching directly into shared buffers, is not without its issues or
challenges as well.  However, by abstracting the multi-block read
interface, we could use more optimal calls depending on the OS.

Having done a bit of research and testing in this area (AIO and buffer
management), I don't see any easy solution.  fadvise will work on some
systems and will likely give some gain on them, but won't work for
everyone.  The alternative is to abstract prefetching and allow
platform-specific code, which we rarely do.  While we could build an
abstract prefetch interface and simply use fadvise for it now (rather
than OS-specific code), I don't see an easy win in any case.

-- 
Jonah H. Harris, Senior DBA
myYearbook.com


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Multi CPU Queries - Feedback and/or suggestions wanted!
Next
From: Greg Stark
Date:
Subject: Re: Multi CPU Queries - Feedback and/or suggestions wanted!