Re: Show WAL write and fsync stats in pg_stat_io

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
Cc: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Melanie Plageman <melanieplageman(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, "bharath(dot)rupireddyforpostgres(at)gmail(dot)com" <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Subject: Re: Show WAL write and fsync stats in pg_stat_io
Date: 2025-02-05 05:30:12
Message-ID: Z6L3ZNGCljZZouvN@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 04, 2025 at 05:40:06PM +0300, Nazir Bilal Yavuz wrote:
> Hi,
>
> On Tue, 4 Feb 2025 at 17:29, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> wrote:
> >
> > Thanks! My benchmark results are the same [1]. I could not see the
> > noticable difference between master and patched version. I run the
> > benchmark a couple of times, sometimes the patched version, sometimes the
> > master version is better. I think the differences are due to margin of
> > error. Sharing the latest benchmark run at the bottom [1].
> >
> > [1]
> > pgbench -n -c8 -j8-T60 -f <(echo "SELECT pg_logical_emit_message(true, 'test', repeat('0', ${emit_bytes}));";)
> > with emit bytes being 10 and 8192 for the 'acpi_pm', 'hpet' and 'tsc' clock sources.
> >
> > (I hope that table gets rendered correctly in the mailing list.)
>
> It did not get rendered correctly, so attached as a text file.

Thanks for this summary.

track_io_timing=on and track_wal_io_timing=off are the most
interesting lines to me, for HEAD vs the patch. The number for tsc
with 10 bytes is the most pronounced one, but there is a similar
variance even when using "off" for the two GUCs, where I would not
have expected any differences. So yeah, the variance looks like
mostly noise here.

Please note that I have marked the CF entry at [1] as committed as the
main goal of this thread has been achieved. Do you want to pursue the
topic about the potential refactorings in pgstat_tracks_io_op() and
pgstat_tracks_io_object()? There is a second one with the elimination
of the write & sync columns for pg_stat_wal. Both should have their
own thread if worked on, and this thread has been already quite long.

[1]: https://commitfest.postgresql.org/51/4950/
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2025-02-05 05:56:36 Re: Increased work_mem for "logical replication tablesync worker" only?
Previous Message Dilip Kumar 2025-02-05 05:24:09 Re: Conflict detection for update_deleted in logical replication