Re: Parallel heap vacuum

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Melanie Plageman <melanieplageman(at)gmail(dot)com>, John Naylor <johncnaylorls(at)gmail(dot)com>, Tomas Vondra <tomas(at)vondra(dot)me>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Parallel heap vacuum
Date: 2025-03-11 21:47:00
Message-ID: CAD21AoC+pw3_YzW0uZWvWCrw38bVzqqJCv7wm8gn6BCwr--YYA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 11, 2025 at 5:51 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Tue, Mar 11, 2025 at 5:00 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> >
> > On Sun, Mar 9, 2025 at 11:28 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> > >
> > >
> > > Does phase 3 also use parallelism? If so, can we try to divide the
> > > ring buffers among workers or at least try vacuum with an increased
> > > number of ring buffers. This would be good to do for both the phases,
> > > if they both use parallelism.
> >
> > No, only phase 1 was parallelized in this test. In parallel vacuum,
> > since it uses (ring_buffer_size * parallel_degree) memory, more pages
> > are loaded during phase 1, increasing cache hits during phase 3.
> >
>
> Shouldn't we ideally try with a vacuum without parallelism with
> ring_buffer_size * parallel_degree to make the comparison better?

Right. I'll share the benchmark test results with such configuration.

> Also, what could be the reason for the variation in data of phase-I?
> Do you restart the system after each run to ensure there is nothing in
> the memory? If not, then shouldn't we try at least a few runs by
> restarting the system before each run to ensure there is nothing
> leftover in memory?

I dropped all page caches by executing 'echo 3 >
/proc/sys/vm/drop_caches' before each run and these results are the
median of 3 runs. I'll investigate it further.

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alena Rybakina 2025-03-11 22:24:22 Re: Adding skip scan (including MDAM style range skip scan) to nbtree
Previous Message Masahiko Sawada 2025-03-11 21:42:13 Re: Parallel heap vacuum