pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Yves Weißig <weissig@rbg.informatik.tu-darmstadt.de>
To: Greg Smith <greg@2ndquadrant.com>
Cc: pgsql-general@postgresql.org
Subject: Re: effective_io_concurrency
Date: Sun, 06 Feb 2011 15:14:37 +0100
Message-ID: <4D4EACCD.9040002@rbg.informatik.tu-darmstadt.de> (raw)
In-Reply-To: <4D4AD490.7020709@2ndquadrant.com>
References: <4D49C9BA.8020801@rbg.informatik.tu-darmstadt.de>
	<4D4AD490.7020709@2ndquadrant.com>

Thanks for the detailed answer and explanation.
I am curious if there is another way to force this behaviour. As a part
of my masters thesis I am trying to develop an index which heavily
relies on requesting blocks in parallel. Without knowing the code, do I
have to dive into it and change it manually or can I accomplish this any
other way?

Am 03.02.2011 17:15, schrieb Greg Smith:
> Yves Weißig wrote:
>> I was wondering if there is more information about this switch in the
>> configuration. Does it really work? Where in the source code can I
>> follow how it works? "sgmgr.c" seems to be an entry point, but where
>> exactly is it used?
>>   
> 
> Currently the code only kicks in when you're doing a Bitmap Heap Scan,
> which is really helpful for them, but of no help for any other type of
> query.  This style of heap scan already knows in advance exactly what
> blocks it needs from the database, and normally it just asks for them
> one at a time.  That can turn into a fair amount of random I/O, and it's
> done serially:  the next block isn't requested until the last one
> arrives.  What effective_io_concurrency does is advise the operating
> system of the next few blocks the database is going to ask for, before
> the actual read requests, in hopes that it might grab them if it happens
> to be nearby that area of the disk.e
> 
> I've only seen this feature work at all on Linux. It might work on BSD
> and Mac OS X systems, it certainly doesn't do anything on Solaris and
> Windows.
> 
> The basic idea is that you start with setting the value to the number of
> working drives in the disk array the database is on and see if I/O
> performance goes up and/or query speed drops afterwards. If it does you
> might try further increases beyond that even. As for why there isn't a
> better tuning guide than just those simple guidelines, it's not that
> easy to show a situation where the type of bitmap scan this parameter
> impacts is used on a generated data set, even though it's not that
> uncommon in real-world data. It's hard both to make generic suggestions
> here and to even demonstrate the feature at work.
> 
> Moving up the source code chain from smgr,
> src/backend/storage/buffer/bufmgr.c has PrefetchBuffer, and the one
> place the executor calls that is BitmapHeapNext inside
> src/backend/executor/nodeBitmapHeapscan.c
> 



view thread (7+ messages)  latest in thread

Message-ID: <4D4EACCD.9040002@rbg.informatik.tu-darmstadt.de>
Permalink:  ../4D4EACCD.9040002@rbg.informatik.tu-darmstadt.de/
Also on:    postgresql.org/message-id/4D4EACCD.9040002@rbg.informatik.tu-darmstadt.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: weissig@rbg.informatik.tu-darmstadt.de, greg@2ndquadrant.com
  Subject: Re: effective_io_concurrency
  In-Reply-To: <4D4EACCD.9040002@rbg.informatik.tu-darmstadt.de>
  References: <4D49C9BA.8020801@rbg.informatik.tu-darmstadt.de> <4D4AD490.7020709@2ndquadrant.com> <4D4EACCD.9040002@rbg.informatik.tu-darmstadt.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox