Re: explanation for random_page_cost is outdated - Mailing list pgsql-docs

From Bruce Momjian
Subject Re: explanation for random_page_cost is outdated
Date
Msg-id 20200427162659.GD21731@momjian.us
Whole thread Raw
In response to Re: explanation for random_page_cost is outdated  (Олег Самойлов <splarv@ya.ru>)
List pgsql-docs
On Mon, Apr 27, 2020 at 07:24:45PM +0300, Олег Самойлов
wrote:
> Yes, I saw recommendations for 1.1 early, but why? Why such exactly
> precision number, why 1.1? Is here ever a theoretical or experimental
> prof?

Well, SSD random performance is slightly slower than sequential, so the
value should be slighly larger than 1.1.  Clearly 2.0 or higher is not
recommended.  Could it be 1.05 or 1.01 or 1.15?  Yeah, but probably
giving 1.1 is at least a good suggestion to start with.

> As for me, random_page_cost depended not only not characteristic of a
> storage device (hdd or ssd), but also on assumptions about how much of
> the database is in memory cache (90% by default). And this is a very
> rough assumption (of cause in ideal whole database must fit in the
> memory cache).

True.

> And so I don't see any reason to recommend exactly value 1.1, simple 1
> is good too, especially for an ideal server with huge memory cache.

Uh, well, 1.0 is fine for non-SSDs too if all the data is in cache, and
there are no database writes.

---------------------------------------------------------------------------

>
>
> > 27 апр. 2020 г., в 19:16, Bruce Momjian <bruce@momjian.us>
> > написал(а):
> >
> > I have been recommending 1.1 as a value for random_page_cost for
> > SSDs for years, and I think it would be helpful to suggest that
> > value, so doc patch attached.
> >
> > -- Bruce Momjian <bruce@momjian.us> https://momjian.us EnterpriseDB
> > https://enterprisedb.com
> >
> > + As you are, so once was I.  As I am, so you will be. + + Ancient
> > Roman grave inscription + <random.diff>
>

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +



pgsql-docs by date:

Previous
From: Олег Самойлов
Date:
Subject: Re: explanation for random_page_cost is outdated
Next
From: Michael Paquier
Date:
Subject: Re: Roles for pg_basebackup