| From: | Bruce Momjian <bruce(at)momjian(dot)us> |
|---|---|
| To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
| Cc: | yigong hu <yigongh(at)gmail(dot)com>, splarv(at)ya(dot)ru, pgsql-docs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: explanation for random_page_cost is outdated |
| Date: | 2020-04-27 16:16:30 |
| Message-ID: | 20200427161630.GB21731@momjian.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-docs |
On Mon, Apr 27, 2020 at 06:02:41AM +0200, Pavel Stehule wrote:
>
>
> ne 26. 4. 2020 v 21:25 odesílatel yigong hu <yigongh(at)gmail(dot)com> napsal:
>
> Sorry to hijack the thread, I also recently have similar observation that
> the statement about random_page_cost on SSD is ambiguous. The current
> document says that
>
> > Storage that has a low random read cost relative to sequential, e.g.
> solid-state drives, might also be better modeled with a lower value for
> random_page_cost.
>
> However, this statement does not clarify what values might be good. For
> some workload, the default value 4.0 would cause bad performance and
> lowering random_page_cost to a value 3.0 or 2.0 does not solve the
> performance problem. Only when the random_page_cost is lowered to below 1.2
> will the bad performance be mitigated. Thus, I would suggest elaborating on
> this description further as:
>
> > Storage that has a low random read cost relative to sequential, e.g.
> solid-state drives, might also be better modeled with a value that is close
> to 1 for random_page_cost.
>
>
> I depends on estimation. Lot of people use random_page_cost as fix of broken
> estimation. Then configures this value to some strange values. Lot of other
> queries with good estimation can be worse then.
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 +
| Attachment | Content-Type | Size |
|---|---|---|
| random.diff | text/x-diff | 980 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2020-04-27 16:24:00 | Re: Rendering pi more nicely in PDF |
| Previous Message | Alexander Lakhin | 2020-04-27 16:00:01 | Re: Rendering pi more nicely in PDF |