From: | Robert Klemme <shortcutter(at)googlemail(dot)com> |
---|---|
To: | Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: [PERFORMANCE] expanding to SAN: which portion best to move |
Date: | 2011-05-17 13:29:51 |
Message-ID: | BANLkTind_8bB55w2LeTr=N4c9O311Qmg5A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-performance |
On Tue, May 17, 2011 at 11:47 AM, Craig Ringer
<craig(at)postnewspapers(dot)com(dot)au> wrote:
> On 05/17/2011 03:00 PM, Robert Klemme wrote:
>
>> The main point is that you do not benefit from the larger IO bandwidth
>> if access patterns do not permit parallel access to both disks (e.g.
>> because you first need to read index blocks in order to know the table
>> blocks to read).
>
> This makes me wonder if Pg attempts to pre-fetch blocks of interest for
> areas where I/O needs can be known in advance, while there's still other
> works or other I/O to do. For example, pre-fetching for the next iteration
> of a nested loop while still executing the prior one. Is it even possible?
>
> I'm guessing not, because (AFAIK) Pg uses only synchronous blocking I/O, and
> with that there isn't really a way to pre-fetch w/o threads or helper
> processes. Linux (at least) supports buffered async I/O, so it'd be possible
> to submit such prefetch requests ... on modern Linux kernels. Portably doing
> so, though - not so much.
There is a much more serious obstacle than the mere technical (if that
was one at all): prefetching is only reasonable if you can predict
which data you need with high probability (say >= 80%). If you can't
you'll have much more IO than without prefetching and overall
performance likely suffers. Naturally that probability depends on the
data at hand and the access pattern. As Cédric wrote, there seems to
be at least one case where it's done.
Cheers
robert
--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2011-05-17 13:30:45 | Re: ordering of join using ON expression = any (array) |
Previous Message | Phil Couling | 2011-05-17 13:24:08 | Re: find the greatest, pick it up and group by |
From | Date | Subject | |
---|---|---|---|
Next Message | Cédric Villemain | 2011-05-17 13:52:33 | Re: Fill Factor |
Previous Message | Scott Marlowe | 2011-05-17 13:23:41 | Re: Fill Factor |