Re: Prefetch the next tuple's memory during seqscans

From: sirisha chamarthi <sirichamarthi22(at)gmail(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Subject: Re: Prefetch the next tuple's memory during seqscans
Date: 2022-11-23 08:27:08
Message-ID: CAKrAKeUQ_2bqmCxO6+dUjO+adrrcnZn-+Nz5O8ok0Yb2h=LS_w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 22, 2022 at 11:44 PM David Rowley <dgrowleyml(at)gmail(dot)com> wrote:

> On Wed, 23 Nov 2022 at 20:29, sirisha chamarthi
> <sirichamarthi22(at)gmail(dot)com> wrote:
> > I ran your test1 exactly like your setup except the row count is 3000000
> (with 13275 blocks). Shared_buffers is 128MB and the hardware configuration
> details at the bottom of the mail. It appears Master + 0001 + 0005
> regressed compared to master slightly .
>
> Thank you for running these tests.
>
> Can you share if the plans used for these queries was a parallel plan?
> I had set max_parallel_workers_per_gather to 0 to remove the
> additional variability from parallel query.
>
> Also, 13275 blocks is 104MBs, does EXPLAIN (ANALYZE, BUFFERS) indicate
> that all pages were in shared buffers? I used pg_prewarm() to ensure
> they were so that the runs were consistent.
>

I reran the test with setting max_parallel_workers_per_gather = 0 and with
pg_prewarm. Appears I missed some step while testing on the master, thanks
for sharing the details. New numbers show master has higher latency
than *Master +
0001 + 0005*.

*Master*

Before vacuum:
latency average = 452.881 ms

After vacuum:
latency average = 393.880 ms

*Master + 0001 + 0005*
Before vacuum:
latency average = 441.832 ms

After vacuum:
latency average = 369.591 ms

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2022-11-23 08:36:31 Re: [DOCS] Stats views and functions not in order?
Previous Message Justin Pryzby 2022-11-23 08:17:19 Re: New docs chapter on Transaction Management and related changes