pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jesper Krogh <jesper@krogh.cc>
Cc: pgsql-performance@postgresql.org
Subject: Re: planner costs in "warm cache" tests
Date: Mon, 31 May 2010 15:55:33 -0400
Message-ID: <18310.1275335733@sss.pgh.pa.us> (raw)
In-Reply-To: <4C040488.30906@krogh.cc>
References: <4C02A342.40801@krogh.cc>
	<14644.1275244491@sss.pgh.pa.us>
	<4C040488.30906@krogh.cc>

Jesper Krogh <jesper@krogh.cc> writes:
> On 2010-05-30 20:34, Tom Lane wrote:
>> Well, hmm, I really doubt that that represents reality either.  A page
>> access is by no means "free" even when the page is already in cache.
>> I don't recall anyone suggesting that you set these numbers to less
>> than perhaps 0.01.
>> 
> Thank you for the prompt response. Is it a "false assumption" that the
> cost should in some metric between different plans be a measurement
> of actual run-time in a dead-disk run?

Well, the default cost parameters (seq_page_cost=1, random_page_cost=4)
are intended to model the non-cached state where most page fetches
actually do require a disk access.  They are definitely too large
relative to the cpu_xxx_cost parameters when you have a fully-cached
database, but what I've seen people recommending for that condition
is to set them both to the same value in the vicinity of 0.1 or 0.01
or so.  If it's only mostly cached you might try intermediate settings.

			regards, tom lane



view thread (7+ messages)  latest in thread

Message-ID: <18310.1275335733@sss.pgh.pa.us>
Permalink:  ../18310.1275335733@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18310.1275335733@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jesper@krogh.cc
  Subject: Re: planner costs in "warm cache" tests
  In-Reply-To: <18310.1275335733@sss.pgh.pa.us>

* 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