From: Bruce Momjian <bruce@momjian.us>
To: Олег Самойлов <splarv@ya.ru>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: yigong hu <yigongh@gmail.com>
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: explanation for random_page_cost is outdated
Date: Mon, 27 Apr 2020 12:26:59 -0400
Message-ID: <20200427162659.GD21731@momjian.us> (raw)
In-Reply-To: <729A1432-9FF9-485F-8643-ED0F3D5ECDD6@ya.ru>
References: <20200319205646.GB28431@momjian.us>
<72492300-BFD4-4CCF-9136-20CC41A18A10@ya.ru>
<CAOxFffcourucFqSk+tZA13ErS3XRYkDy6EeaPff4AvHGiEEuug@mail.gmail.com>
<CAFj8pRA35t++NeQ2mbT=3O9=o7M0hrsRZUmPOCRErZR7Am5A_A@mail.gmail.com>
<20200427161630.GB21731@momjian.us>
<729A1432-9FF9-485F-8643-ED0F3D5ECDD6@ya.ru>
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 +
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-docs@postgresql.org
Cc: bruce@momjian.us, splarv@ya.ru, pavel.stehule@gmail.com, yigongh@gmail.com, pgsql-docs@lists.postgresql.org
Subject: Re: explanation for random_page_cost is outdated
In-Reply-To: <20200427162659.GD21731@momjian.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