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

From Heikki Linnakangas
Subject Re: Multi CPU Queries - Feedback and/or suggestions wanted!
Date
Msg-id 49017045.4050600@enterprisedb.com
Whole thread Raw
In response to Re: Multi CPU Queries - Feedback and/or suggestions wanted!  ("Jonah H. Harris" <jonah.harris@gmail.com>)
List pgsql-hackers
Jonah H. Harris wrote:
> On Thu, Oct 23, 2008 at 8:44 PM, Bruce Momjian <bruce@momjian.us> wrote:
>> True, it is a kludge but if it gives us 95% of the benfit with 10% of
>> the code, it is a win.
> 
> I'd say, optimistically, maybe 30-45% the benefit over a proper
> multi-block read using O_DIRECT.

Let's try to focus. We're not talking about using O_DIRECT, we're 
talking about using asynchronous I/O or posix_fadvise(). And without 
more details on what you mean by benefit, under what circumstances, any 
numbers like that is just unmeasurable handwaving.

In terms of getting the RAID array busy, in Greg's tests posix_fadvise() 
on Linux worked just as well as async I/O works on Solaris. So it 
doesn't seem like there's any inherent performance advantage in the 
async I/O interface over posix_fadvise() + read(),

There is differences between different OS implementations of the 
interfaces. But we're developing software for the future, and for a wide 
range of platforms, and I'm sure operating systems will develop as well. 
The decision should not be made on what is the fastest interface on a 
given operating system in 2008.

Async I/O might have a small potential edge on CPU usage, because less 
system calls are needed. However, let me remind you all that we're 
talking about how to utilize RAID array to do physical, random, I/O as 
fast as possible. IOW, the bottleneck is I/O, by definition. The CPU 
efficiency of the kernel interface to initiate the I/O is insignificant, 
until we reach a large enough random read throughput to saturate the 
CPU, and even then there's probably more significant CPU savings to be 
made elsewhere.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Multi CPU Queries - Feedback and/or suggestions wanted!
Next
From: Zdenek Kotala
Date:
Subject: Re: Any reason to have heap_(de)formtuple?