pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: yigongh@gmail.com
Subject: Adding description about the random_page_cost and parallel_leader_participation
Date: Tue, 01 Sep 2020 17:26:50 +0000
Message-ID: <159898121004.3375.8319924957147010903@wrigleys.postgresql.org> (raw)

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/12/runtime-config-query.html
Description:

I recently have an observation that the combination of random_page_cost and
parallel_leader_participation can cause a performance regression. However,
based on the official website, it seems that these two configurations seem
not to have a very straight relationship. 
   I run the PostgreSQL 11 on Ubuntu 18.04. When I create a database with
about 16MB and run a select query by pgbench. If I set the random_page_cost
as 4 and parallel_leader_participation is on, the average latency of select
query is about 72 ms for five clients. However, if we change the
random_page_cost to 1 or turn off the parallel_leader_participation, the
average latency is only 54ms. However, If I manually run the query on a
client, changing the value of random_page_cost doesn't change the
performance
   I check the workload and find that if the random_page_cost is 4 and
parallel_leader_participation is on, query planer would tend to choose Merge
gather join for select clause, which would require more memory to do
sorting. If the random_page_cost is 1 and parallel_leader_participation is
on, the query plan would choose nest loop, which requires less memory. I
guess this might be the root cause of performance regression. 
   If my guess is true, I would suggest mentioning that the combination of
random_page_cost and paraller_leader_participation would cause the query to
use more memory in the official document


view thread (2+ messages)  latest in thread

Message-ID: <159898121004.3375.8319924957147010903@wrigleys.postgresql.org>
Permalink:  ../159898121004.3375.8319924957147010903@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/159898121004.3375.8319924957147010903@wrigleys.postgresql.org

 · 

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-docs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, yigongh@gmail.com
  Subject: Re: Adding description about the random_page_cost and parallel_leader_participation
  In-Reply-To: <159898121004.3375.8319924957147010903@wrigleys.postgresql.org>

* 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