How to set parallel_tuple_cost

Jeff Janes <[email protected]> Fri, 20 Dec 2019 13:03:29 -0500
Newsgroups gmane.comp.db.postgresql.performance
Message-ID <CAMkU=1ziWTO_OBmFYkwhdtpc_JrM2Eroip=8vS3CNtgJs6KcoQ@mail.gmail.com>
--0000000000007420aa059a267f4c
Content-Type: text/plain; charset="UTF-8"

The docs for parallel_tuple_cost are quite terse, as the reference section
of the docs usually are:

"Sets the planner's estimate of the cost of transferring one tuple from a
parallel worker process to another process. The default is 0.1."

Usually you can find more extensive discussion of such settings in
informal resources like blog posts or mailing lists, but Googling the name
I don't find much for this setting.  Is there good information out there
somewhere?

If you were take the doc description literally, then the default value
seems much too high, as it doesn't take 10x the (default) cpu_tuple_cost to
transfer a tuple up from a parallel worker.  On the other hand, you
probably don't want a query which consumes 8x the CPU resources just to
finish only 5% faster (on an otherwise idle server with 8 CPUs).  Maybe
this Amdahl factor is what inspired the high default value?

Cheers,

Jeff

--0000000000007420aa059a267f4c
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">The docs for parallel_tuple_cost are quite terse, as the r=
eference section of the docs usually are:<div><br></div><div>&quot;Sets the=
 planner&#39;s estimate of the cost of transferring one tuple from a parall=
el worker process to another process. The default is 0.1.&quot;<br></div><d=
iv><br></div><div>Usually you can find more extensive discussion of such se=
ttings in informal=C2=A0resources like blog posts or mailing lists, but Goo=
gling the name I don&#39;t find much for this setting.=C2=A0 Is there good =
information out there somewhere?</div><div><br></div><div>If you were take =
the doc description literally, then the default value seems much too high, =
as it doesn&#39;t take 10x the (default) cpu_tuple_cost to transfer a tuple=
 up from a parallel worker.=C2=A0 On the other hand, you probably don&#39;t=
 want a query=C2=A0which consumes 8x the CPU resources just to finish only =
5% faster (on an otherwise idle server with 8 CPUs).=C2=A0 Maybe this=C2=A0=
Amdahl factor is what inspired the high default value?</div><div><br></div>=
<div>Cheers,</div><div><br></div><div>Jeff</div></div>

--0000000000007420aa059a267f4c--