pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sean Chittenden <sean@chittenden.org>
To: Rod Taylor <rbt@rbt.ca>
Cc: Postgresql Performance <pgsql-performance@postgresql.org>
Subject: Re: Moving postgresql.conf tunables into 2003...
Date: Thu, 3 Jul 2003 16:32:38 -0700
Message-ID: <20030703233238.GU72567@perrin.int.nxad.com> (raw)
In-Reply-To: <1057263840.31736.22.camel@jester>
References: <20030703190502.GR72567@perrin.int.nxad.com>
	<1057263840.31736.22.camel@jester>

> > What are the odds of going through and revamping some of the
> > tunables in postgresql.conf for the 7.4 release?  I was just
> > working with someone on IRC and on their 7800 RPM IDE drives,
> > their random_page_cost was ideally suited to be 0.32: a far cry
> > from 4.
> 
> I find it very very hard to believe a random read was cheaper than a
> sequential read.  Something is shifty in your testing.

This is the procedure used to zero in on the number:

SET random_page_cost = 3;
[run query three times]
SET random_page_cost = 2;
[run query three times]
SET random_page_cost = 1;
[run query three times]
SET random_page_cost = 0.01;  -- verify that this tunable would make
			      -- a difference eventually
[run query three times]
SET random_page_cost = 0.5;
[run query three times]
SET random_page_cost = 0.2;   -- this was the 1st query that didn't
			      -- do a seq scan
[run query three times]
SET random_page_cost = 0.4;   -- back to a seq scan
[run query three times]
SET random_page_cost = 0.3;   -- idx scan, how high can I push the rpc?
[run query three times]
SET random_page_cost = 0.35;  -- interesting, the query time jumped to
			      -- about 0.2s... better than 40s, but not as
			      -- nice as the 0.25ms when the rpc was at 0.3
[run query three times]
SET random_page_cost = 0.32;  -- Sweet, 0.25ms for the query
[run query three times]
SET random_page_cost = 0.33;  -- Bah, back up to 0.2s
[run query three times]
SET random_page_cost = 0.31;  -- Down to 0.25ms, too low
[run query three times]
SET random_page_cost = 0.33;  -- Double check that it wasn't an errant
			      -- performance at 0.33
[run query three times]
SET random_page_cost = 0.32;  -- Double check that 0.32 is the magic number
[run query three times]

[edit postgresql.conf && killall -SIGHUP postmaster]

-sc

-- 
Sean Chittenden

view thread (45+ messages)  latest in thread

Message-ID: <20030703233238.GU72567@perrin.int.nxad.com>
Permalink:  ../20030703233238.GU72567@perrin.int.nxad.com/
Also on:    postgresql.org/message-id/20030703233238.GU72567@perrin.int.nxad.com

 · 

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-performance@postgresql.org
  Cc: sean@chittenden.org, rbt@rbt.ca
  Subject: Re: Moving postgresql.conf tunables into 2003...
  In-Reply-To: <20030703233238.GU72567@perrin.int.nxad.com>
  References: <20030703190502.GR72567@perrin.int.nxad.com> <1057263840.31736.22.camel@jester> <20030703233238.GU72567@perrin.int.nxad.com>

* 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