Re: explanation for random_page_cost is outdated

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Олег Самойлов <splarv(at)ya(dot)ru>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, yigong hu <yigongh(at)gmail(dot)com>, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: explanation for random_page_cost is outdated
Date: 2020-04-27 16:26:59
Message-ID: 20200427162659.GD21731@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)momjian(dot)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(at)momjian(dot)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(at)momjian(dot)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 +

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Michael Paquier 2020-04-28 04:37:55 Re: Roles for pg_basebackup
Previous Message Олег Самойлов 2020-04-27 16:24:45 Re: explanation for random_page_cost is outdated