Re: scale parallel_tuple_cost by tuple width

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: scale parallel_tuple_cost by tuple width
Date: 2026-04-01 19:27:54
Message-ID: 3068588.1775071674@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> macOS/M4-Pro:

> Width Parallel(ms) Serial(ms) Speedup Gather rows
> ----- ------------ ---------- ------- -----------
> 8 299.464 769.130 2.57x 242549
> 16 310.361 787.629 2.54x 243643
> 32 344.541 839.589 2.44x 242419
> 64 413.330 967.512 2.34x 238771
> 128 519.794 1185.757 2.28x 241440
> 256 1479.766 1823.559 1.23x 238615
> 384 2022.882 2326.823 1.15x 240617
> 512 2423.938 2778.995 1.15x 244752
> 768 3511.425 3934.384 1.12x 235814
> 1024 9905.073 12214.577 1.23x 10000000

On closer review, it looks like I carelessly allowed this test
to run in parallel with a buildfarm run. Here are numbers
with an idle machine:

Width Parallel(ms) Serial(ms) Speedup Gather rows
----- ------------ ---------- ------- -----------
8 281.881 758.167 2.69x 242549
16 300.997 791.184 2.63x 243643
32 340.815 842.715 2.47x 242419
64 401.282 985.711 2.46x 238771
128 507.066 1183.727 2.33x 241440
256 718.008 1667.830 2.32x 238615
384 1774.601 2224.726 1.25x 240617
512 2439.593 2784.242 1.14x 244752
768 3254.088 3698.615 1.14x 235814
1024 8990.584 12176.341 1.35x 10000000

This is interesting because while the speedup ratio was
pretty insensitive to row width on the x86_64 box, that's
far from true on the Apple box.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2026-04-01 19:38:23 Re: Introduce XID age based replication slot invalidation
Previous Message Jacob Champion 2026-04-01 19:10:18 Re: [PATCH] libpq: try all addresses for a host before moving to next on target_session_attrs mismatch